Alexis de Talhouƫt | a644558 | 2017-03-08 17:33:55 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 2 | |
| 3 | cd /root/chef-solo |
| 4 | export CHEFNAME=${ENVNAME} |
| 5 | |
| 6 | sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb |
| 7 | sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb |
| 8 | sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb |
| 9 | |
| 10 | chef-solo -c solo.rb -o recipe[cassandra-actions::01-configureCassandra] -E ${CHEFNAME} |
| 11 | rc=$? |
| 12 | |
| 13 | if [[ $rc != 0 ]]; then exit $rc; fi |
| 14 | echo "########### starting cassandra ###########" |
| 15 | # start cassandra |
| 16 | /docker-entrypoint.sh cassandra -f & |
| 17 | |
| 18 | chef-solo -c solo.rb -E ${CHEFNAME} |
| 19 | |
| 20 | cd /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 | |
| 26 | while true; do sleep 2; done |
| 27 | |
ml636r | 0649e65 | 2017-02-20 21:10:54 +0200 | [diff] [blame] | 28 | |