diff options
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.rb | 26 |
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 |