Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | template "/tmp/create_dox_keyspace.sh" do |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 2 | source "create_dox_keyspace.sh.erb" |
| 3 | sensitive true |
| 4 | mode 0755 |
| 5 | variables({ |
Tal Gitelman | c4d387d | 2019-03-28 11:00:54 +0200 | [diff] [blame] | 6 | :cassandra_ip => node['Nodes']['CS'].first, |
| 7 | :cassandra_port => node['cassandra']['cassandra_port'], |
Sonsino, Ofir (os0695) | b083098 | 2019-04-14 12:41:54 +0300 | [diff] [blame] | 8 | :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment, |
Tal Gitelman | c4d387d | 2019-03-28 11:00:54 +0200 | [diff] [blame] | 9 | :cassandra_pwd => node['cassandra'][:cassandra_password], |
| 10 | :cassandra_usr => node['cassandra'][:cassandra_user] |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 11 | }) |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 12 | end |
| 13 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 14 | |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 15 | remote_directory '/tmp/tools' do |
| 16 | source 'tools' |
| 17 | mode '0755' |
| 18 | files_mode '0755' |
| 19 | action :create |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 20 | end |
| 21 | |
| 22 | |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 23 | bash "onboard-db-schema-creation" do |
| 24 | ignore_failure true |
| 25 | code <<-EOH |
| 26 | cd /tmp/tools/build/scripts |
| 27 | chmod +x onboard-db-schema-creation.sh |
Yuli Shlosberg | 0566f58 | 2017-11-26 19:05:23 +0200 | [diff] [blame] | 28 | bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 29 | EOH |
| 30 | end |
| 31 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 32 | bash "create-DOX-schema" do |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 33 | ignore_failure true |
| 34 | code <<-EOH |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 35 | cd /tmp |
| 36 | chmod +x /tmp/create_dox_keyspace.sh |
| 37 | /tmp/create_dox_keyspace.sh |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 38 | EOH |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 39 | end |