From e9cdb4d014bc20ce680c6019bdaf011f2190114c Mon Sep 17 00:00:00 2001
From: Vishal Patil <vishal.patil@nuagenetworks.net>
Date: Mon, 26 Sep 2016 18:28:07 -0400
Subject: Changes for Nuage HA

---
 roles/nuage_master/meta/main.yml                        | 1 +
 roles/nuage_master/templates/nuage-openshift-monitor.j2 | 9 ++++++++-
 roles/nuage_master/vars/main.yaml                       | 1 -
 3 files changed, 9 insertions(+), 2 deletions(-)

(limited to 'roles/nuage_master')

diff --git a/roles/nuage_master/meta/main.yml b/roles/nuage_master/meta/main.yml
index fdead100c..d56529b4d 100644
--- a/roles/nuage_master/meta/main.yml
+++ b/roles/nuage_master/meta/main.yml
@@ -14,6 +14,7 @@ galaxy_info:
   - system
 dependencies:
 - role: nuage_ca
+- role: nuage_common
 - role: os_firewall
   os_firewall_allow:
   - service: openshift-monitor 
diff --git a/roles/nuage_master/templates/nuage-openshift-monitor.j2 b/roles/nuage_master/templates/nuage-openshift-monitor.j2
index 075de9d9e..c663aa0fa 100644
--- a/roles/nuage_master/templates/nuage-openshift-monitor.j2
+++ b/roles/nuage_master/templates/nuage-openshift-monitor.j2
@@ -30,4 +30,11 @@ logLevel: {{ nuage_mon_log_level }}
 # Parameters related to the nuage monitor REST server
 nuageMonServer:
     URL: {{ nuage_mon_rest_server_url }}
-    certificateDirectory: {{ cert_output_dir }} 
+    certificateDirectory: {{ cert_output_dir }}
+# etcd config required for HA
+etcdClientConfig:
+    ca: {{ etcd_ca_dir }}/{{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
+    certFile: {{ etcd_conf_dir }}/master.etcd-client.crt
+    keyFile: {{ etcd_conf_dir }}/master.etcd-client.key
+    urls:
+        - {{ openshift.common.hostname }}:{{ openshift.master.etcd_port }}
diff --git a/roles/nuage_master/vars/main.yaml b/roles/nuage_master/vars/main.yaml
index 92e716a45..b395eba99 100644
--- a/roles/nuage_master/vars/main.yaml
+++ b/roles/nuage_master/vars/main.yaml
@@ -8,7 +8,6 @@ cert_output_dir: /usr/share/nuage-openshift-monitor
 kube_config: /usr/share/nuage-openshift-monitor/nuage.kubeconfig
 kubemon_yaml: /usr/share/nuage-openshift-monitor/nuage-openshift-monitor.yaml 
 master_config_yaml: "{{ openshift_master_config_dir }}/master-config.yaml"
-nuage_mon_rest_server_port: "{{ nuage_openshift_monitor_rest_server_port | default('9443') }}"
 nuage_mon_rest_server_url: "0.0.0.0:{{ nuage_mon_rest_server_port }}"
 nuage_mon_rest_server_logdir: "{{ nuage_openshift_monitor_log_dir | default('/var/log/nuage-openshift-monitor') }}"
 nuage_mon_log_level: "{{ nuage_openshift_monitor_log_level | default('3') }}"
-- 
cgit v1.2.3


From b0ddb188ef1dc8484f4d9e1f7ae58dcd4ac6a299 Mon Sep 17 00:00:00 2001
From: Vishal Patil <vishal.patil@nuagenetworks.net>
Date: Thu, 29 Sep 2016 14:23:32 -0400
Subject: Addressed review comments

---
 roles/nuage_master/meta/main.yml                        | 13 +++++++------
 roles/nuage_master/templates/nuage-openshift-monitor.j2 |  8 ++++----
 2 files changed, 11 insertions(+), 10 deletions(-)

(limited to 'roles/nuage_master')

diff --git a/roles/nuage_master/meta/main.yml b/roles/nuage_master/meta/main.yml
index d56529b4d..51b89fbf6 100644
--- a/roles/nuage_master/meta/main.yml
+++ b/roles/nuage_master/meta/main.yml
@@ -13,9 +13,10 @@ galaxy_info:
   - cloud
   - system
 dependencies:
-- role: nuage_ca
-- role: nuage_common
-- role: os_firewall
-  os_firewall_allow:
-  - service: openshift-monitor 
-    port: "{{ nuage_mon_rest_server_port }}/tcp"
+  - role: nuage_ca
+  - role: nuage_common
+  - role: openshift_etcd_client_certificates
+  - role: os_firewall
+    os_firewall_allow:
+    - service: openshift-monitor 
+      port: "{{ nuage_mon_rest_server_port }}/tcp"
diff --git a/roles/nuage_master/templates/nuage-openshift-monitor.j2 b/roles/nuage_master/templates/nuage-openshift-monitor.j2
index c663aa0fa..b2539517b 100644
--- a/roles/nuage_master/templates/nuage-openshift-monitor.j2
+++ b/roles/nuage_master/templates/nuage-openshift-monitor.j2
@@ -33,8 +33,8 @@ nuageMonServer:
     certificateDirectory: {{ cert_output_dir }}
 # etcd config required for HA
 etcdClientConfig:
-    ca: {{ etcd_ca_dir }}/{{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
-    certFile: {{ etcd_conf_dir }}/master.etcd-client.crt
-    keyFile: {{ etcd_conf_dir }}/master.etcd-client.key
+    ca: {{ openshift_master_config_dir }}/{{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
+    certFile: {{ openshift_master_config_dir }}/master.etcd-client.crt
+    keyFile: {{ openshift_master_config_dir }}/master.etcd-client.key
     urls:
-        - {{ openshift.common.hostname }}:{{ openshift.master.etcd_port }}
+        - {{ openshift.master.etcd_urls }}
-- 
cgit v1.2.3