summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.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/05-titanSchemaCreation.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/05-titanSchemaCreation.rb')
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb61
1 files changed, 61 insertions, 0 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb
new file mode 100644
index 0000000000..a3af2f490f
--- /dev/null
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb
@@ -0,0 +1,61 @@
+cookbook_file "/tmp/sdctool.tar" do
+ sensitive true
+ source "sdctool.tar"
+ mode 0755
+end
+
+## extract sdctool.tar
+bash "install tar" do
+ cwd "/tmp"
+ code <<-EOH
+ /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({
+ :host_ip => node['HOST_IP'],
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port],
+ :cassandra_ip => node['Nodes']['CS'],
+ :rep_factor => 1,
+ :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({
+ :elastic_ip => "HOSTIP"
+ })
+end
+
+
+bash "excuting-titanSchemaCreation.sh" do
+ code <<-EOH
+ echo "XXXXXXXXXXXX executing /tmp/sdctool/scripts/titanSchemaCreation.sh XXXXXXXXXXXX"
+ chmod +x /tmp/sdctool/scripts/titanSchemaCreation.sh
+ /tmp/sdctool/scripts/titanSchemaCreation.sh /tmp/sdctool/config
+ EOH
+end
+
+
+