created cassandra initialization scripts

This commit is contained in:
Radu Ioan Fericean
2015-09-24 19:15:59 +03:00
parent 65e1f04e61
commit 04607e429d
5 changed files with 174 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/redis/redis.conf /etc/mysql/my.cnf
echo 'host all all 0.0.0.0/32 md5'>>/etc/postgresql/9.4/main/pg_hba.conf
sed -i 's/ulimit/#ulimit/g' /etc/init.d/cassandra
sed -i 's/AllowAllAuthenticator/PasswordAuthenticator/g' /etc/cassandra/cassandra.yaml
sed -i 's/AllowAllAuthorizer/CassandraAuthorizer/g' /etc/cassandra/cassandra.yaml
/etc/init.d/mysql start
/etc/init.d/postgresql start
@@ -13,9 +15,18 @@ ln -s /root/code/src/github.com/cgrates/cgrates/data /usr/share/cgrates
# create link to cgrates dir
ln -s /root/code/src/github.com/cgrates/cgrates /root/cgr
#setup mysql
cd /usr/share/cgrates/storage/mysql && ./setup_cgr_db.sh root CGRateS.org
# setup postgres
cd /usr/share/cgrates/storage/postgres && ./setup_cgr_db.sh
# setup cassandra
(sleep 20 && \
cqlsh -u cassandra -p cassandra -e "alter user cassandra with password 'CGRateS.org';" && \
cd /usr/share/cgrates/storage/cassandra && ./setup_cgr_db.sh cassandra CGRateS.org && \
cd /root/cgr)&
#env vars
export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
export GO15VENDOREXPERIMENT=1