diff options
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.rb | 35 |
1 files changed, 35 insertions, 0 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 new file mode 100644 index 0000000000..7c40c509c2 --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb @@ -0,0 +1,35 @@ +cookbook_file "/tmp/sdctool.tar" do + source "sdctool.tar" + mode 0755 +end + +## extract sdctool.tar +bash "install tar" do + cwd "/tmp" + code <<-EOH + /bin/tar xvf /tmp/sdctool.tar -C /tmp + EOH +end + + +template "/tmp/sdctool/config/configuration.yaml" do + 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, + :dc1 => "DC-"+node.chef_environment + }) +end + +template "/tmp/sdctool/config/elasticsearch.yml" do + source "elasticsearch.yml.erb" + mode 0755 + variables({ + :elastic_ip => "HOSTIP" + }) +end + |