summaryrefslogtreecommitdiffstats
path: root/mcp/patches/reclass-system-salt-model/0002-mongodb-Parameterize-cluster-hostnames.patch
blob: b75044b165d539198cd1d01bae50c285808709e9 (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
36
37
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Mirantis Inc., Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Sun, 10 Dec 2017 21:58:52 +0100
Subject: [PATCH] mongodb: Parameterize cluster hostnames

Replace mdb{01,02,03} with reclass params, similar to prev commit.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 mongodb/server/cluster.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mongodb/server/cluster.yml b/mongodb/server/cluster.yml
index f3c16d6..1d1e397 100644
--- a/mongodb/server/cluster.yml
+++ b/mongodb/server/cluster.yml
@@ -3,9 +3,9 @@ classes:
 parameters:
   _param:
     mongodb_server_replica_set: mongodb
-    mongodb_master: mdb01
+    mongodb_master: ${_param:openstack_telemetry_node01_hostname}
     mongodb_server_members:
-    - host: mdb01
+    - host: ${_param:openstack_telemetry_node01_hostname}
       priority: 2
-    - host: mdb02
-    - host: mdb03
+    - host: ${_param:openstack_telemetry_node02_hostname}
+    - host: ${_param:openstack_telemetry_node03_hostname}
fi done # install pip dependencies easy_install-3.4 pip sudo pip3 install python-ipmi # Make sure jinja2 is installed easy_install-3.4 jinja2 # TODO(cgoncalves): remove once congress RPM is downloaded from upstream easy_install-3.4 tox # Required packages to redirect stdin with virt-customize virt_uri_base=https://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview virt_pkgs=( 'libguestfs-1.32.7-3.el7.x86_64.rpm' 'libguestfs-tools-1.32.7-3.el7.noarch.rpm' 'libguestfs-tools-c-1.32.7-3.el7.x86_64.rpm' 'supermin-5.1.16-4.el7.x86_64.rpm' 'supermin5-5.1.16-4.el7.x86_64.rpm' 'supermin-helper-5.1.16-4.el7.x86_64.rpm' 'perl-Sys-Guestfs-1.32.7-3.el7.x86_64.rpm' 'python-libguestfs-1.32.7-3.el7.x86_64.rpm' ) dir=/tmp/packages.$RANDOM mkdir -p $dir pushd $dir all_packages="" for pkg in ${virt_pkgs[@]}; do if ! wget $virt_uri_base/$pkg; then echo "ERROR: Failed to download $pkg" fi all_packages="$all_packages $pkg" done if [[ $all_packages != "" ]];then yum install -y $all_packages fi rm -rf $dir popd