blob: 2bfee3211c14d65d93feb6efa7ff7f65c67bc047 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001#!/bin/sh
2
3cd /root/chef-solo
4export CHEFNAME=${ENVNAME}
5
6sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb
7sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
8sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
9
10chef-solo -c solo.rb -o recipe[cassandra-actions::01-configureCassandra] -E ${CHEFNAME}
11rc=$?
12
13if [[ $rc != 0 ]]; then exit $rc; fi
14echo "########### starting cassandra ###########"
15# start cassandra
16/docker-entrypoint.sh cassandra -f &
17
18chef-solo -c solo.rb -E ${CHEFNAME}
19
20cd /tmp/
21/tmp/create_cassandra_user.sh
22/tmp/create_dox_keyspace.sh
23/bin/chmod +x sdctool/scripts/*.sh
24./sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
25
26while true; do sleep 2; done
27
ml636r0649e652017-02-20 21:10:54 +020028