blob: 87edf8c3588fc4ba39360c40636dd14bba5c1bcd [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({
Yuli Shlosberg0875ce02018-01-25 13:53:36 +02006 :cassandra_ip => node['Nodes']['CS'],
Michael Lando50ffa6b2018-01-08 10:52:07 +02007 :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
8 :cassandra_pwd => node['cassandra'][:cassandra_password],
9 :cassandra_usr => node['cassandra'][:cassandra_user]
Areli Fuss7d2c6052017-09-25 18:24:04 +030010 })
Michael Lando451a3402017-02-19 10:28:42 +020011end
12
Michael Landoed64b5e2017-06-09 03:19:04 +030013
Areli Fuss7d2c6052017-09-25 18:24:04 +030014remote_directory '/tmp/tools' do
15 source 'tools'
16 mode '0755'
17 files_mode '0755'
18 action :create
Michael Landoed64b5e2017-06-09 03:19:04 +030019end
20
21
Areli Fuss7d2c6052017-09-25 18:24:04 +030022bash "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 Shlosberg0566f582017-11-26 19:05:23 +020027 bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh
Areli Fuss7d2c6052017-09-25 18:24:04 +030028 EOH
29end
30
Michael Landoed64b5e2017-06-09 03:19:04 +030031bash "create-DOX-schema" do
Areli Fuss7d2c6052017-09-25 18:24:04 +030032 ignore_failure true
33 code <<-EOH
Michael Landoed64b5e2017-06-09 03:19:04 +030034 cd /tmp
35 chmod +x /tmp/create_dox_keyspace.sh
36 /tmp/create_dox_keyspace.sh
Areli Fuss7d2c6052017-09-25 18:24:04 +030037 EOH
Michael Landoed64b5e2017-06-09 03:19:04 +030038end