summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorVishal Patil <vishal.patil@nuagenetworks.net>2016-09-26 18:28:07 -0400
committerVishal Patil <vishal.patil@nuagenetworks.net>2016-09-27 15:07:51 -0400
commite9cdb4d014bc20ce680c6019bdaf011f2190114c (patch)
tree4ce88233256054102e5182e228e403fe0849994b /roles
parentd5f9fa24a4e5d44ba5eb8637da5393195f0335c9 (diff)
downloadopenshift-e9cdb4d014bc20ce680c6019bdaf011f2190114c.tar.gz
openshift-e9cdb4d014bc20ce680c6019bdaf011f2190114c.tar.bz2
openshift-e9cdb4d014bc20ce680c6019bdaf011f2190114c.tar.xz
openshift-e9cdb4d014bc20ce680c6019bdaf011f2190114c.zip
Changes for Nuage HA
Diffstat (limited to 'roles')
-rw-r--r--roles/nuage_common/defaults/main.yaml3
-rw-r--r--roles/nuage_master/meta/main.yml1
-rw-r--r--roles/nuage_master/templates/nuage-openshift-monitor.j29
-rw-r--r--roles/nuage_master/vars/main.yaml1
-rw-r--r--roles/openshift_loadbalancer_facts/meta/main.yml3
-rw-r--r--roles/openshift_loadbalancer_facts/tasks/main.yml16
6 files changed, 30 insertions, 3 deletions
diff --git a/roles/nuage_common/defaults/main.yaml b/roles/nuage_common/defaults/main.yaml
index d285bdfa3..9b777213e 100644
--- a/roles/nuage_common/defaults/main.yaml
+++ b/roles/nuage_common/defaults/main.yaml
@@ -8,3 +8,6 @@ nuage_ca_serial: "{{ nuage_ca_dir }}/nuageMonCA.serial.txt"
nuage_master_mon_dir: /usr/share/nuage-openshift-monitor
nuage_node_plugin_dir: /usr/share/vsp-openshift
+
+nuage_mon_rest_server_port: "{{ nuage_openshift_monitor_rest_server_port | default('9443') }}"
+
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') }}"
diff --git a/roles/openshift_loadbalancer_facts/meta/main.yml b/roles/openshift_loadbalancer_facts/meta/main.yml
index 4c5b6552b..46959355b 100644
--- a/roles/openshift_loadbalancer_facts/meta/main.yml
+++ b/roles/openshift_loadbalancer_facts/meta/main.yml
@@ -10,4 +10,5 @@ galaxy_info:
versions:
- 7
dependencies:
-- role: openshift_facts
+ - role: openshift_facts
+ - role: nuage_common
diff --git a/roles/openshift_loadbalancer_facts/tasks/main.yml b/roles/openshift_loadbalancer_facts/tasks/main.yml
index dc244c0be..5936ce5ba 100644
--- a/roles/openshift_loadbalancer_facts/tasks/main.yml
+++ b/roles/openshift_loadbalancer_facts/tasks/main.yml
@@ -20,6 +20,14 @@
binds:
- "*:{{ openshift.loadbalancer.frontend_port }}"
default_backend: atomic-openshift-api
+ - name: nuage-monitor
+ mode: tcp
+ options:
+ - tcplog
+ binds:
+ - "*:{{ nuage_mon_rest_server_port }}"
+ default_backend: nuage-monitor
+ when: openshift.common.use_nuage | bool
backends:
- name: atomic-openshift-api
mode: tcp
@@ -28,3 +36,11 @@
servers: "{{ hostvars
| oo_select_keys(groups['oo_masters'])
| oo_haproxy_backend_masters(openshift.loadbalancer.frontend_port) }}"
+ - name: nuage-monitor
+ mode: tcp
+ option: tcplog
+ balance: source
+ servers: "{{ hostvars
+ | oo_select_keys(groups['oo_masters'])
+ | oo_haproxy_backend_masters(nuage_mon_rest_server_port) }}"
+ when: openshift.common.use_nuage | bool