Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 1 | cookbook_file "/tmp/sdctool.tar" do |
| 2 | sensitive true |
| 3 | source "sdctool.tar" |
| 4 | mode 0755 |
| 5 | end |
| 6 | |
| 7 | ## extract sdctool.tar |
| 8 | bash "install tar" do |
| 9 | cwd "/tmp" |
| 10 | code <<-EOH |
| 11 | /bin/tar xf /tmp/sdctool.tar -C /tmp |
| 12 | EOH |
| 13 | end |
| 14 | |
| 15 | |
| 16 | template "titan.properties" do |
| 17 | sensitive true |
| 18 | path "/tmp/sdctool/config/titan.properties" |
| 19 | source "titan.properties.erb" |
| 20 | mode "0755" |
| 21 | variables({ |
| 22 | :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment |
| 23 | }) |
| 24 | end |
| 25 | |
| 26 | |
| 27 | template "/tmp/sdctool/config/configuration.yaml" do |
| 28 | sensitive true |
| 29 | source "configuration.yaml.erb" |
| 30 | mode 0755 |
| 31 | variables({ |
| 32 | :host_ip => node['HOST_IP'], |
| 33 | :catalog_port => node['BE'][:http_port], |
| 34 | :ssl_port => node['BE'][:https_port], |
| 35 | :cassandra_ip => node['Nodes']['CS'], |
| 36 | :rep_factor => 1, |
| 37 | :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, |
| 38 | :titan_Path => "/tmp/sdctool/config" |
| 39 | }) |
| 40 | end |
| 41 | |
| 42 | template "/tmp/sdctool/config/elasticsearch.yml" do |
| 43 | sensitive true |
| 44 | source "elasticsearch.yml.erb" |
| 45 | mode 0755 |
| 46 | variables({ |
| 47 | :elastic_ip => "HOSTIP" |
| 48 | }) |
| 49 | end |
| 50 | |
| 51 | |
| 52 | bash "excuting-titanSchemaCreation.sh" do |
| 53 | code <<-EOH |
| 54 | echo "XXXXXXXXXXXX executing /tmp/sdctool/scripts/titanSchemaCreation.sh XXXXXXXXXXXX" |
| 55 | chmod +x /tmp/sdctool/scripts/titanSchemaCreation.sh |
| 56 | /tmp/sdctool/scripts/titanSchemaCreation.sh /tmp/sdctool/config |
| 57 | EOH |
| 58 | end |
| 59 | |
| 60 | |
| 61 | |