summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb
blob: 7c40c509c23eb956e1e7526b2ef6f64884b033de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cookbook_file "/tmp/sdctool.tar" do
  source "sdctool.tar"
  mode 0755
end

## extract sdctool.tar
bash "install tar" do
  cwd "/tmp"
  code <<-EOH
     /bin/tar xvf /tmp/sdctool.tar -C /tmp
  EOH
end


template "/tmp/sdctool/config/configuration.yaml" do
  source "configuration.yaml.erb"
  mode 0755
  variables({
      :host_ip      => node['HOST_IP'],
      :catalog_port => node['BE'][:http_port],
      :ssl_port     => node['BE'][:https_port],
      :cassandra_ip => node['Nodes']['CS'],
      :rep_factor   => 1,
      :dc1          => "DC-"+node.chef_environment
  })
end

template "/tmp/sdctool/config/elasticsearch.yml" do
  source "elasticsearch.yml.erb"
  mode 0755
  variables({
     :elastic_ip => "HOSTIP"    
  })
end