summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/startup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/startup.sh')
-rwxr-xr-xsdc-os-chef/sdc-cassandra/startup.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/sdc-os-chef/sdc-cassandra/startup.sh b/sdc-os-chef/sdc-cassandra/startup.sh
index 89d95ea022..6107f60396 100755
--- a/sdc-os-chef/sdc-cassandra/startup.sh
+++ b/sdc-os-chef/sdc-cassandra/startup.sh
@@ -1,6 +1,11 @@
#!/bin/bash
cd /root/chef-solo
+mkdir -p /root/chef-solo/cookbooks/cassandra-actions/attributes
+cl_rel=`basename /root/chef-solo/cookbooks/cassandra-actions/files/default/SDC* .zip|awk -F"-" '{print $2}'`
+echo "normal['version'] = \"${cl_rel}\"" > /root/chef-solo/cookbooks/cassandra-actions/attributes/default.rb
+echo "normal['HOST_IP'] = \"${HOST_IP}\"" >> /root/chef-solo/cookbooks/cassandra-actions/attributes/default.rb
+
export CHEFNAME=${ENVNAME}
sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb
@@ -15,14 +20,9 @@ echo "########### starting cassandra ###########"
# start cassandra
/docker-entrypoint.sh cassandra -f &
-chef-solo -c solo.rb -E ${CHEFNAME}
+sleep 10
-cd /tmp/
-/tmp/create_cassandra_user.sh
-/tmp/create_dox_keyspace.sh
-/bin/chmod +x sdctool/scripts/*.sh
-./sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
+chef-solo -c solo.rb -E ${CHEFNAME}
while true; do sleep 2; done
-