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({ |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 6 | :cassandra_ip => node['Nodes']['CS'], |
Michael Lando | 50ffa6b | 2018-01-08 10:52:07 +0200 | [diff] [blame] | 7 | :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, |
| 8 | :cassandra_pwd => node['cassandra'][:cassandra_password], |
| 9 | :cassandra_usr => node['cassandra'][:cassandra_user] |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 10 | }) |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 11 | end |
| 12 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 13 | |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 14 | remote_directory '/tmp/tools' do |
| 15 | source 'tools' |
| 16 | mode '0755' |
| 17 | files_mode '0755' |
| 18 | action :create |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 19 | end |
| 20 | |
| 21 | |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 22 | bash "onboard-db-schema-creation" do |
| 23 | ignore_failure true |
| 24 | code <<-EOH |
| 25 | cd /tmp/tools/build/scripts |
| 26 | chmod +x onboard-db-schema-creation.sh |
Yuli Shlosberg | 0566f58 | 2017-11-26 19:05:23 +0200 | [diff] [blame] | 27 | bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 28 | EOH |
| 29 | end |
| 30 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 31 | bash "create-DOX-schema" do |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 32 | ignore_failure true |
| 33 | code <<-EOH |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 34 | cd /tmp |
| 35 | chmod +x /tmp/create_dox_keyspace.sh |
| 36 | /tmp/create_dox_keyspace.sh |
Areli Fuss | 7d2c605 | 2017-09-25 18:24:04 +0300 | [diff] [blame] | 37 | EOH |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 38 | end |