blob: c9a4087671e13e8acd83fb1e05ad1c8ba07f1ad3 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001template "/tmp/create_dox_keyspace.sh" do
Areli Fuss7d2c6052017-09-25 18:24:04 +03002 source "create_dox_keyspace.sh.erb"
3 sensitive true
4 mode 0755
5 variables({
Tal Gitelmanc4d387d2019-03-28 11:00:54 +02006 :cassandra_ip => node['Nodes']['CS'].first,
7 :cassandra_port => node['cassandra']['cassandra_port'],
8 :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
9 :cassandra_pwd => node['cassandra'][:cassandra_password],
10 :cassandra_usr => node['cassandra'][:cassandra_user]
Areli Fuss7d2c6052017-09-25 18:24:04 +030011 })
Michael Lando451a3402017-02-19 10:28:42 +020012end
13
Michael Landoed64b5e2017-06-09 03:19:04 +030014
Areli Fuss7d2c6052017-09-25 18:24:04 +030015remote_directory '/tmp/tools' do
16 source 'tools'
17 mode '0755'
18 files_mode '0755'
19 action :create
Michael Landoed64b5e2017-06-09 03:19:04 +030020end
21
22
Areli Fuss7d2c6052017-09-25 18:24:04 +030023bash "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 Shlosberg0566f582017-11-26 19:05:23 +020028 bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh
Areli Fuss7d2c6052017-09-25 18:24:04 +030029 EOH
30end
31
Michael Landoed64b5e2017-06-09 03:19:04 +030032bash "create-DOX-schema" do
Areli Fuss7d2c6052017-09-25 18:24:04 +030033 ignore_failure true
34 code <<-EOH
Michael Landoed64b5e2017-06-09 03:19:04 +030035 cd /tmp
36 chmod +x /tmp/create_dox_keyspace.sh
37 /tmp/create_dox_keyspace.sh
Areli Fuss7d2c6052017-09-25 18:24:04 +030038 EOH
Michael Landoed64b5e2017-06-09 03:19:04 +030039end