summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb')
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb26
1 files changed, 25 insertions, 1 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
index 92a81eb7dc..e54932d1c4 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
@@ -1,8 +1,32 @@
template "/tmp/create_dox_keyspace.sh" do
source "create_dox_keyspace.sh.erb"
+ sensitive true
mode 0755
variables({
- :cassandra_ip => "HOSTIP"
+ :cassandra_ip => "HOSTIP",
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
})
end
+
+cookbook_file "/tmp/create_dox_db.cql" do
+ sensitive true
+ source "create_dox_db.cql"
+ mode 0755
+end
+
+cookbook_file "/tmp/alter_dox_db.cql" do
+ sensitive true
+ source "alter_dox_db.cql"
+ mode 0755
+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