blob: 782358bb33f4143da15b7b2b1bc517fdb1998549 [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({
Areli, Fuss (af732p)c033cdc2018-04-24 13:59:00 +03006 :cassandra_ip => node['Nodes']['CS'].first,
Areli, Fuss (af732p)efa33262018-05-09 15:45:03 +03007 :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
Michael Lando50ffa6b2018-01-08 10:52:07 +02008 :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