aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo
diff options
context:
space:
mode:
authorAreli Fuss <af732p@att.com>2018-02-09 00:08:52 +0200
committerMichael Lando <ml636r@att.com>2018-02-15 17:39:55 +0000
commiteeec504fb7251cc282482d505fcf35ae3e7097f2 (patch)
tree6fa62a661f75f13c3d0e1a96b539288a615a5e55 /sdc-os-chef/sdc-cassandra/chef-repo
parentc1e4dcf4a8030bbcf04f487fd7a6a910bb5eced1 (diff)
Add K8S deployment above Vagrant
Set deployment manifest files and scripts for deploy SDC over Kubernetes inside Vagrant Preparation for OOM integration Change-Id: If5d6b4131b75eb4795ce8bfd8ec228808938d40e Issue-ID: SDC-907 Signed-off-by: Areli Fuss <af732p@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/chef-repo')
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb10
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb10
2 files changed, 18 insertions, 2 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb
index 22ef07907d..7afb307401 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb
@@ -1,9 +1,17 @@
+interface = node['interfaces']['application']
+application_host = ''
+node['network']['interfaces'][interface][:addresses].each do | addr , details |
+ if details['family'] == ('inet')
+ application_host = addr
+ end
+end
+
template "/tmp/change_cassandra_pass.sh" do
source "change_cassandra_pass.sh.erb"
sensitive true
mode 0755
variables({
- :cassandra_ip => node['Nodes']['CS'],
+ :cassandra_ip => application_host,
:cassandra_pwd => ENV['CS_PASSWORD']
})
end
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb
index 0eb9800fe5..c196ca7b94 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb
@@ -1,9 +1,17 @@
+interface = node['interfaces']['application']
+application_host = ''
+node['network']['interfaces'][interface][:addresses].each do | addr , details |
+ if details['family'] == ('inet')
+ application_host = addr
+ end
+end
+
template "/var/lib/ready-probe.sh" do
source "ready-probe.sh.erb"
sensitive true
mode 0755
variables({
- :cassandra_ip => node['Nodes']['CS'],
+ :cassandra_ip => application_host,
:cassandra_pwd => ENV['CS_PASSWORD']
})
end \ No newline at end of file