Browse Source

Merge pull request #649 from bogdando/mms

[WIP] Add docs and defaults for multi-master setup
Bogdan Dobrelya 7 years ago
parent
commit
9eed8719d6

+ 13 - 0
playbooks/provisioning/openstack/README.md

@@ -162,6 +162,19 @@ The `openstack_inventory_path` points the directory to host the generated static
 It should point to the copied example inventory directory, otherwise ti creates
 It should point to the copied example inventory directory, otherwise ti creates
 a new one for you.
 a new one for you.
 
 
+#### Multi-master configuration
+
+Please refer to the official documentation for the
+[multi-master setup](https://docs.openshift.com/container-platform/3.6/install_config/install/advanced_install.html#multiple-masters)
+and define the corresponding [inventory
+variables](https://docs.openshift.com/container-platform/3.6/install_config/install/advanced_install.html#configuring-cluster-variables)
+in `inventory/group_vars/OSEv3.yml`. For example, given a load balancer node
+under the ansible group named `ext_lb`:
+
+    openshift_master_cluster_method: native
+    openshift_master_cluster_hostname: "{{ groups.ext_lb.0 }}"
+    openshift_master_cluster_public_hostname: "{{ groups.ext_lb.0 }}"
+
 #### Security notes
 #### Security notes
 
 
 Configure required `*_ingress_cidr` variables to restrict public access
 Configure required `*_ingress_cidr` variables to restrict public access

+ 4 - 0
playbooks/provisioning/openstack/sample-inventory/group_vars/OSEv3.yml

@@ -4,6 +4,10 @@ openshift_deployment_type: origin
 #openshift_release: v3.5
 #openshift_release: v3.5
 openshift_master_default_subdomain: "apps.{{ env_id }}.{{ public_dns_domain }}"
 openshift_master_default_subdomain: "apps.{{ env_id }}.{{ public_dns_domain }}"
 
 
+openshift_master_cluster_method: native
+openshift_master_cluster_hostname: "{{ groups.lb.0|default(groups.masters.0) }}"
+openshift_master_cluster_public_hostname: "{{ groups.lb.0|default(groups.masters.0) }}"
+
 #openshift_cluster_node_labels:
 #openshift_cluster_node_labels:
 #  app:
 #  app:
 #    region: primary
 #    region: primary

+ 5 - 0
roles/static_inventory/templates/inventory.j2

@@ -39,6 +39,7 @@ dns
 [OSEv3:children]
 [OSEv3:children]
 nodes
 nodes
 etcd
 etcd
+lb
 
 
 # Set variables common for all OSEv3 hosts
 # Set variables common for all OSEv3 hosts
 #[OSEv3:vars]
 #[OSEv3:vars]
@@ -68,6 +69,9 @@ nodes.{{ stack_name }}
 [dns:children]
 [dns:children]
 dns.{{ stack_name }}
 dns.{{ stack_name }}
 
 
+[lb:children]
+lb.{{ stack_name }}
+
 # Empty placeholders for all groups of the cluster nodes
 # Empty placeholders for all groups of the cluster nodes
 [masters.{{ stack_name }}]
 [masters.{{ stack_name }}]
 [etcd.{{ stack_name }}]
 [etcd.{{ stack_name }}]
@@ -75,6 +79,7 @@ dns.{{ stack_name }}
 [nodes.{{ stack_name }}]
 [nodes.{{ stack_name }}]
 [app.{{ stack_name }}]
 [app.{{ stack_name }}]
 [dns.{{ stack_name }}]
 [dns.{{ stack_name }}]
+[lb.{{ stack_name }}]
 
 
 # BEGIN Autogenerated groups
 # BEGIN Autogenerated groups
 {% for group in groups %}
 {% for group in groups %}