summaryrefslogtreecommitdiffstats
path: root/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb')
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
new file mode 100644
index 0000000000..87edf8c358
--- /dev/null
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
@@ -0,0 +1,38 @@
+template "/tmp/create_dox_keyspace.sh" do
+ source "create_dox_keyspace.sh.erb"
+ sensitive true
+ mode 0755
+ variables({
+ :cassandra_ip => node['Nodes']['CS'],
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :cassandra_pwd => node['cassandra'][:cassandra_password],
+ :cassandra_usr => node['cassandra'][:cassandra_user]
+ })
+end
+
+
+remote_directory '/tmp/tools' do
+ source 'tools'
+ mode '0755'
+ files_mode '0755'
+ action :create
+end
+
+
+bash "onboard-db-schema-creation" do
+ ignore_failure true
+ code <<-EOH
+ cd /tmp/tools/build/scripts
+ chmod +x onboard-db-schema-creation.sh
+ bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh
+ EOH
+end
+
+bash "create-DOX-schema" do
+ ignore_failure true
+ code <<-EOH
+ cd /tmp
+ chmod +x /tmp/create_dox_keyspace.sh
+ /tmp/create_dox_keyspace.sh
+ EOH
+end