splitted in devel/release

This commit is contained in:
Radu Ioan Fericean
2014-02-28 15:06:50 +02:00
parent f717bb9542
commit 4833eb94c3
4 changed files with 64 additions and 15 deletions

View File

@@ -54,7 +54,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# View the documentation for the provider you're using for more
# information on available options.
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible_golang_release.yml"
ansible.playbook = "cgrates_release.yml"
#ansible.verbose = "vvvv"
end
end

View File

@@ -110,6 +110,6 @@ if ! shopt -oq posix; then
fi
export GOROOT=$HOME/go
export GOPATH=$HOME/go_home
export GOPATH=$HOME/code
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

View File

@@ -33,23 +33,11 @@
- freeswitch-meta-vanilla
- freeswitch-mod-json-cdr
- name: add cgrates apt-key
apt_key: url=http://apt.itsyscom.com/conf/cgrates.gpg.key state=present
- name: add cgrates repo
apt_repository: repo='deb http://apt.itsyscom.com/debian wheezy main' state=present
- name: install cgrates
apt: pkg=cgrates update_cache=yes state=latest
- name: update mysql root password for root account
mysql_user: name=root host=localhost password={{ root_db_password }}
- name: copy .my.cnf
template: src=my.cnf dest=/root/.my.cnf mode=0600
- name: setup database tables
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root {{ root_db_password }} localhost
- hosts: all
user: vagrant
@@ -68,4 +56,14 @@
copy: src=bashrc dest=~/.bashrc
- name: get cgrates
shell: GOROOT=~/go GOPATH=~/go_home ~/go/bin/go get -u -v github.com/cgrates/cgrates
shell: GOROOT=~/go GOPATH=~/code ~/go/bin/go get -u -v github.com/cgrates/cgrates
- name: create a link to data dir
file: src=~/code/src/github.com/cgrates/cgrates/data dest=/usr/share/cgrates state=symlink
- name: setup database tables
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root {{ root_db_password }} localhost
- name: create link to cgrates dir
file: src=~/code/src/github.com/cgrates/cgrates dest=~/cgr state=symlink

View File

@@ -0,0 +1,51 @@
---
- hosts: all
user: vagrant
sudo: yes
vars:
root_db_password: CGRateS.org
tasks:
- name: install dependency
apt: pkg={{ item }} state=latest
with_items:
- git
- redis-server
- mysql-server
- python-mysqldb
- name: add freeswitch gpg key
command: gpg --keyserver pool.sks-keyservers.net --recv-key D76EDC7725E010CF
- name: add freeswitch apt key
shell: gpg -a --export D76EDC7725E010CF | sudo apt-key add -
- name: add freeswitch apt repo
apt_repository: repo='deb http://files.freeswitch.org/repo/deb/debian/ wheezy main' state=present
- name: install freeswitch
apt: pkg={{ item }} update_cache=yes state=latest
with_items:
- freeswitch-meta-vanilla
- freeswitch-mod-json-cdr
- name: add cgrates apt-key
apt_key: url=http://apt.itsyscom.com/conf/cgrates.gpg.key state=present
- name: add cgrates repo
apt_repository: repo='deb http://apt.itsyscom.com/debian wheezy main' state=present
- name: install cgrates
apt: pkg=cgrates update_cache=yes state=latest
- name: update mysql root password for root account
mysql_user: name=root host=localhost password={{ root_db_password }}
- name: copy .my.cnf
template: src=my.cnf dest=/root/.my.cnf mode=0600
- name: setup database tables
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root {{ root_db_password }} localhost