blob: 58906038291e2107f7516ca15dccd4385123fdcb [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001cookbook_file "/tmp/sdctool.tar" do
2 source "sdctool.tar"
3 mode 0755
4end
5
6## extract sdctool.tar
7bash "install tar" do
8 cwd "/tmp"
9 code <<-EOH
Michael Landoed64b5e2017-06-09 03:19:04 +030010 /bin/tar xf /tmp/sdctool.tar -C /tmp
Michael Lando451a3402017-02-19 10:28:42 +020011 EOH
12end
13
14
Michael Landoed64b5e2017-06-09 03:19:04 +030015template "titan.properties" do
16 sensitive true
17 path "/tmp/sdctool/config/titan.properties"
18 source "titan.properties.erb"
19 mode "0755"
20 variables({
21 :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
22 })
23end
24
25
Michael Lando451a3402017-02-19 10:28:42 +020026template "/tmp/sdctool/config/configuration.yaml" do
Michael Landoed64b5e2017-06-09 03:19:04 +030027 sensitive true
Michael Lando451a3402017-02-19 10:28:42 +020028 source "configuration.yaml.erb"
29 mode 0755
30 variables({
31 :host_ip => node['HOST_IP'],
32 :catalog_port => node['BE'][:http_port],
33 :ssl_port => node['BE'][:https_port],
34 :cassandra_ip => node['Nodes']['CS'],
35 :rep_factor => 1,
Michael Landoed64b5e2017-06-09 03:19:04 +030036 :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
37 :titan_Path => "/tmp/sdctool/config/"
Michael Lando451a3402017-02-19 10:28:42 +020038 })
39end
40
Michael Landoed64b5e2017-06-09 03:19:04 +030041
Michael Lando451a3402017-02-19 10:28:42 +020042template "/tmp/sdctool/config/elasticsearch.yml" do
Michael Landoed64b5e2017-06-09 03:19:04 +030043 sensitive true
Michael Lando451a3402017-02-19 10:28:42 +020044 source "elasticsearch.yml.erb"
45 mode 0755
46 variables({
47 :elastic_ip => "HOSTIP"
48 })
49end
50
Michael Landoed64b5e2017-06-09 03:19:04 +030051
52bash "excuting-schema-creation" do
53 code <<-EOH
54 cd /tmp
55 chmod +x /tmp/sdctool/scripts/schemaCreation.sh
56 /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
57 EOH
58end