Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | cookbook_file "/tmp/sdctool.tar" do |
| 2 | source "sdctool.tar" |
| 3 | mode 0755 |
| 4 | end |
| 5 | |
| 6 | ## extract sdctool.tar |
| 7 | bash "install tar" do |
| 8 | cwd "/tmp" |
| 9 | code <<-EOH |
| 10 | /bin/tar xvf /tmp/sdctool.tar -C /tmp |
| 11 | EOH |
| 12 | end |
| 13 | |
| 14 | |
| 15 | template "/tmp/sdctool/config/configuration.yaml" do |
| 16 | source "configuration.yaml.erb" |
| 17 | mode 0755 |
| 18 | variables({ |
| 19 | :host_ip => node['HOST_IP'], |
| 20 | :catalog_port => node['BE'][:http_port], |
| 21 | :ssl_port => node['BE'][:https_port], |
| 22 | :cassandra_ip => node['Nodes']['CS'], |
| 23 | :rep_factor => 1, |
| 24 | :dc1 => "DC-"+node.chef_environment |
| 25 | }) |
| 26 | end |
| 27 | |
| 28 | template "/tmp/sdctool/config/elasticsearch.yml" do |
| 29 | source "elasticsearch.yml.erb" |
| 30 | mode 0755 |
| 31 | variables({ |
| 32 | :elastic_ip => "HOSTIP" |
| 33 | }) |
| 34 | end |
| 35 | |