blob: e60740fb3d3815c09c77fca09be605cf4a2f7e8b [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
sebdetdf353be2020-09-21 22:13:05 +02006execute "install tar" do
7 command "/bin/tar xf /tmp/sdctool.tar -C /tmp"
Michael Lando451a3402017-02-19 10:28:42 +02008 cwd "/tmp"
sebdetdf353be2020-09-21 22:13:05 +02009 action :run
Michael Lando451a3402017-02-19 10:28:42 +020010end
11
shrikantawachar2623c842019-05-20 12:11:54 +053012template "janusgraph.properties" do
Michael Landoed64b5e2017-06-09 03:19:04 +030013 sensitive true
shrikantawachar2623c842019-05-20 12:11:54 +053014 path "/tmp/sdctool/config/janusgraph.properties"
15 source "janusgraph.properties.erb"
Michael Landoed64b5e2017-06-09 03:19:04 +030016 mode "0755"
17 variables({
k.kedron004fb642019-07-09 13:02:08 +020018 :DC_NAME => node['cassandra']['datacenter_name'],
19 :cassandra_ip => node['Nodes']['CS'].first,
shrek20000594c412020-01-30 14:52:49 +020020 :cassandra_port_num => node['cassandra'][:cassandra_port],
21 :janus_connection_timeout => node['cassandra'][:janusgraph_connection_timeout],
k.kedron004fb642019-07-09 13:02:08 +020022 :cassandra_pwd => node['cassandra'][:cassandra_password],
23 :cassandra_usr => node['cassandra'][:cassandra_user],
k.kedron004fb642019-07-09 13:02:08 +020024 :replication_factor => node['cassandra']['replication_factor']
Michael Landoed64b5e2017-06-09 03:19:04 +030025 })
26end
27
28
Michael Lando451a3402017-02-19 10:28:42 +020029template "/tmp/sdctool/config/configuration.yaml" do
Michael Landoed64b5e2017-06-09 03:19:04 +030030 sensitive true
Michael Lando451a3402017-02-19 10:28:42 +020031 source "configuration.yaml.erb"
32 mode 0755
33 variables({
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020034 :host_ip => node['Nodes']['BE'],
Michael Lando50ffa6b2018-01-08 10:52:07 +020035 :catalog_port => node['BE'][:http_port],
36 :ssl_port => node['BE'][:https_port],
Areli, Fuss (af732p)c033cdc2018-04-24 13:59:00 +030037 :cassandra_ip => node['Nodes']['CS'].first,
Tal Gitelmanc4d387d2019-03-28 11:00:54 +020038 :cassandra_port => node['cassandra']['cassandra_port'],
mahendrrf454e702019-04-18 10:39:30 +000039 :rep_factor => node['cassandra']['replication_factor'],
40 :DC_NAME => node['cassandra']['datacenter_name'],
shrikantawachar2623c842019-05-20 12:11:54 +053041 :janusgraph_Path => "/tmp/sdctool/config/",
Michael Lando50ffa6b2018-01-08 10:52:07 +020042 :socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
43 :socket_read_timeout => node['cassandra']['socket_read_timeout'],
44 :cassandra_pwd => node['cassandra'][:cassandra_password],
45 :cassandra_usr => node['cassandra'][:cassandra_user]
Michael Lando451a3402017-02-19 10:28:42 +020046 })
47end
48
sebdetdf353be2020-09-21 22:13:05 +020049execute "executing-schema-creation" do
50 command "chmod +x /tmp/sdctool/scripts/schemaCreation.sh && /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config"
51 cwd "/tmp"
52 action :run
Michael Landoed64b5e2017-06-09 03:19:04 +030053end
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020054
sebdetdf353be2020-09-21 22:13:05 +020055execute "executing-janusGraphSchemaCreation.sh" do
56 command "chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh && /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config"
57 action :run
58end