summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb')
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb27
1 files changed, 25 insertions, 2 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
index 7c40c509c2..5890603829 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
@@ -7,12 +7,24 @@ end
bash "install tar" do
cwd "/tmp"
code <<-EOH
- /bin/tar xvf /tmp/sdctool.tar -C /tmp
+ /bin/tar xf /tmp/sdctool.tar -C /tmp
EOH
end
+template "titan.properties" do
+ sensitive true
+ path "/tmp/sdctool/config/titan.properties"
+ source "titan.properties.erb"
+ mode "0755"
+ variables({
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
+ })
+end
+
+
template "/tmp/sdctool/config/configuration.yaml" do
+ sensitive true
source "configuration.yaml.erb"
mode 0755
variables({
@@ -21,11 +33,14 @@ template "/tmp/sdctool/config/configuration.yaml" do
:ssl_port => node['BE'][:https_port],
:cassandra_ip => node['Nodes']['CS'],
:rep_factor => 1,
- :dc1 => "DC-"+node.chef_environment
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :titan_Path => "/tmp/sdctool/config/"
})
end
+
template "/tmp/sdctool/config/elasticsearch.yml" do
+ sensitive true
source "elasticsearch.yml.erb"
mode 0755
variables({
@@ -33,3 +48,11 @@ template "/tmp/sdctool/config/elasticsearch.yml" do
})
end
+
+bash "excuting-schema-creation" do
+ code <<-EOH
+ cd /tmp
+ chmod +x /tmp/sdctool/scripts/schemaCreation.sh
+ /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
+ EOH
+end