mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 22:58:44 +05:00
updated vagrant and started smg simplification
This commit is contained in:
2
data/vagrant/Vagrantfile
vendored
2
data/vagrant/Vagrantfile
vendored
@@ -38,7 +38,7 @@ Vagrant.configure(2) do |config|
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
||||
config.vm.synced_folder "../../", "/home/vagrant/code/src/github.com/cgrates/cgrates", owner: "vagrant", group: "vagrant"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
- name: install dependency
|
||||
apt: pkg={{ item }} update_cache=yes state=latest
|
||||
with_items:
|
||||
- git
|
||||
- bzr
|
||||
- git
|
||||
- mercurial
|
||||
- redis-server
|
||||
- mysql-server
|
||||
@@ -33,10 +32,11 @@
|
||||
- mongodb-org
|
||||
- freeswitch-meta-vanilla
|
||||
- freeswitch-mod-json-cdr
|
||||
- libyuv-dev
|
||||
- libyuv-dev
|
||||
- python-mysqldb
|
||||
|
||||
- name: update mysql root password for root account
|
||||
mysql_user: name=cgrates host=localhost password={{ root_db_password }}
|
||||
mysql_user: name=root host=localhost password={{ root_db_password }} state=present
|
||||
|
||||
- name: copy .my.cnf
|
||||
template: src=my.cnf dest=/root/.my.cnf mode=0600
|
||||
@@ -47,35 +47,25 @@
|
||||
go_version: 1.6
|
||||
|
||||
tasks:
|
||||
- name: create cgrates path
|
||||
file: path=/home/vagrant/code/src/github.com/cgrates state=directory
|
||||
|
||||
- name: get golang
|
||||
unarchive: src=https://storage.googleapis.com/golang/go{{ go_version }}.linux-amd64.tar.gz dest=~/go creates=~/go copy=no
|
||||
unarchive: src=https://storage.googleapis.com/golang/go{{ go_version }}.linux-amd64.tar.gz dest=~/ creates=~/go copy=no
|
||||
|
||||
- name: add variables to variables /etc/profile
|
||||
copy: src=golang.sh dest=/etc/profile.d/golang.sh
|
||||
become: yes
|
||||
|
||||
- name: get cgrates
|
||||
git: repo=https://github.com/cgrates/cgrates.git dest=/home/vagrant/code/src/github.com/cgrates/cgrates
|
||||
|
||||
- name: get glide
|
||||
shell: GOROOT=/home/vagrant/go GOPATH=/home/vagrant/code ~/go/bin/go get -u -v github.com/Masterminds/glide
|
||||
|
||||
- name: install cgrates
|
||||
shell: cd /home/vagrant/code/src/github.com/cgrates/cgrates; ~/code/bin/glide install
|
||||
|
||||
- name: create cgr-engine link
|
||||
file: src=/home/vagrant/code/bin/cgr-engine dest=/usr/bin/cgr-engine state=link
|
||||
become: yes
|
||||
|
||||
- name: create a link to data dir
|
||||
become: yes
|
||||
- name: create a link to data dir
|
||||
file: src=/home/vagrant/code/src/github.com/cgrates/cgrates/data dest=/usr/share/cgrates state=link
|
||||
become: yes
|
||||
|
||||
- name: expand freeswitch json conf
|
||||
command: tar -xzvf /usr/share/cgrates/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#- name: expand freeswitch json conf
|
||||
# unarchive: src=/usr/share/cgrates/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz dest=/usr/share/cgrates/tutorials/fs_json/freeswitch/etc/ copy=no
|
||||
|
||||
- name: expand freeswitch csv conf
|
||||
command: tar -xzvf /usr/share/cgrates/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#- name: expand freeswitch csv conf
|
||||
# unarchive: src=/usr/share/cgrates/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz dest=/usr/share/cgrates/tutorials/fs_json/freeswitch/etc/ copy=no
|
||||
|
||||
- name: setup database tables
|
||||
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root {{ root_db_password }} localhost
|
||||
|
||||
Reference in New Issue
Block a user