blob: 89d95ea0221dc9b9e15e01f911f01c2fcae53195 [file] [log] [blame]
Alexis de Talhouƫta6445582017-03-08 17:33:55 -05001#!/bin/bash
Michael Lando451a3402017-02-19 10:28:42 +02002
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