Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | cookbook_file "/tmp/sdctool.tar" do |
| 2 | source "sdctool.tar" |
| 3 | mode 0755 |
| 4 | end |
| 5 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 6 | execute "install tar" do |
| 7 | command "/bin/tar xf /tmp/sdctool.tar -C /tmp" |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 8 | cwd "/tmp" |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 9 | action :run |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 10 | end |
| 11 | |
shrikantawachar | 2623c84 | 2019-05-20 12:11:54 +0530 | [diff] [blame] | 12 | template "janusgraph.properties" do |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 13 | sensitive true |
shrikantawachar | 2623c84 | 2019-05-20 12:11:54 +0530 | [diff] [blame] | 14 | path "/tmp/sdctool/config/janusgraph.properties" |
| 15 | source "janusgraph.properties.erb" |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 16 | mode "0755" |
| 17 | variables({ |
k.kedron | 004fb64 | 2019-07-09 13:02:08 +0200 | [diff] [blame] | 18 | :DC_NAME => node['cassandra']['datacenter_name'], |
| 19 | :cassandra_ip => node['Nodes']['CS'].first, |
shrek2000 | 0594c41 | 2020-01-30 14:52:49 +0200 | [diff] [blame] | 20 | :cassandra_port_num => node['cassandra'][:cassandra_port], |
| 21 | :janus_connection_timeout => node['cassandra'][:janusgraph_connection_timeout], |
k.kedron | 004fb64 | 2019-07-09 13:02:08 +0200 | [diff] [blame] | 22 | :cassandra_pwd => node['cassandra'][:cassandra_password], |
| 23 | :cassandra_usr => node['cassandra'][:cassandra_user], |
k.kedron | 004fb64 | 2019-07-09 13:02:08 +0200 | [diff] [blame] | 24 | :replication_factor => node['cassandra']['replication_factor'] |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 25 | }) |
| 26 | end |
| 27 | |
| 28 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 29 | template "/tmp/sdctool/config/configuration.yaml" do |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 30 | sensitive true |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 31 | source "configuration.yaml.erb" |
| 32 | mode 0755 |
| 33 | variables({ |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 34 | :host_ip => node['Nodes']['BE'], |
Michael Lando | 50ffa6b | 2018-01-08 10:52:07 +0200 | [diff] [blame] | 35 | :catalog_port => node['BE'][:http_port], |
| 36 | :ssl_port => node['BE'][:https_port], |
Areli, Fuss (af732p) | c033cdc | 2018-04-24 13:59:00 +0300 | [diff] [blame] | 37 | :cassandra_ip => node['Nodes']['CS'].first, |
Tal Gitelman | c4d387d | 2019-03-28 11:00:54 +0200 | [diff] [blame] | 38 | :cassandra_port => node['cassandra']['cassandra_port'], |
mahendrr | f454e70 | 2019-04-18 10:39:30 +0000 | [diff] [blame] | 39 | :rep_factor => node['cassandra']['replication_factor'], |
| 40 | :DC_NAME => node['cassandra']['datacenter_name'], |
shrikantawachar | 2623c84 | 2019-05-20 12:11:54 +0530 | [diff] [blame] | 41 | :janusgraph_Path => "/tmp/sdctool/config/", |
Michael Lando | 50ffa6b | 2018-01-08 10:52:07 +0200 | [diff] [blame] | 42 | :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 Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 46 | }) |
| 47 | end |
| 48 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 49 | execute "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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 53 | end |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 54 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 55 | execute "executing-janusGraphSchemaCreation.sh" do |
| 56 | command "chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh && /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config" |
| 57 | action :run |
| 58 | end |