Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | template "/tmp/create_dox_keyspace.sh" do |
| 2 | source "create_dox_keyspace.sh.erb" |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame^] | 3 | sensitive true |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 4 | mode 0755 |
| 5 | variables({ |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame^] | 6 | :cassandra_ip => "HOSTIP", |
| 7 | :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 8 | }) |
| 9 | end |
| 10 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame^] | 11 | |
| 12 | cookbook_file "/tmp/create_dox_db.cql" do |
| 13 | sensitive true |
| 14 | source "create_dox_db.cql" |
| 15 | mode 0755 |
| 16 | end |
| 17 | |
| 18 | cookbook_file "/tmp/alter_dox_db.cql" do |
| 19 | sensitive true |
| 20 | source "alter_dox_db.cql" |
| 21 | mode 0755 |
| 22 | end |
| 23 | |
| 24 | |
| 25 | bash "create-DOX-schema" do |
| 26 | ignore_failure true |
| 27 | code <<-EOH |
| 28 | cd /tmp |
| 29 | chmod +x /tmp/create_dox_keyspace.sh |
| 30 | /tmp/create_dox_keyspace.sh |
| 31 | EOH |
| 32 | end |