blob: a3af2f490fb3e51d355c90c4e32d8ed839ba15ce [file] [log] [blame]
Michael Landoed64b5e2017-06-09 03:19:04 +03001cookbook_file "/tmp/sdctool.tar" do
2 sensitive true
3 source "sdctool.tar"
4 mode 0755
5end
6
7## extract sdctool.tar
8bash "install tar" do
9 cwd "/tmp"
10 code <<-EOH
11 /bin/tar xf /tmp/sdctool.tar -C /tmp
12 EOH
13end
14
15
16template "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 })
24end
25
26
27template "/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 })
40end
41
42template "/tmp/sdctool/config/elasticsearch.yml" do
43 sensitive true
44 source "elasticsearch.yml.erb"
45 mode 0755
46 variables({
47 :elastic_ip => "HOSTIP"
48 })
49end
50
51
52bash "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
58end
59
60
61