Przeglądaj źródła

Re-arrange scaleup playbooks.

Andrew Butcher 9 lat temu
rodzic
commit
16e1f777e1

+ 1 - 1
playbooks/byo/openshift-cluster/scaleup.yml

@@ -1,5 +1,5 @@
 ---
-- include: ../../common/openshift-cluster/scaleup.yml
+- include: ../../common/openshift-master/scaleup.yml
   vars_files:
   - ../../byo/openshift-cluster/cluster_hosts.yml
   vars:

+ 1 - 0
playbooks/byo/openshift-node/filter_plugins

@@ -0,0 +1 @@
+../../../filter_plugins

+ 1 - 0
playbooks/byo/openshift-node/lookup_plugins

@@ -0,0 +1 @@
+../../../lookup_plugins

+ 1 - 0
playbooks/byo/openshift-node/roles

@@ -0,0 +1 @@
+../../../roles

+ 8 - 0
playbooks/byo/openshift-node/scaleup.yml

@@ -0,0 +1,8 @@
+---
+- include: ../../common/openshift-node/scaleup.yml
+  vars_files:
+  - ../../byo/openshift-cluster/cluster_hosts.yml
+  vars:
+    openshift_cluster_id: "{{ cluster_id | default('default') }}"
+    openshift_debug_level: "{{ debug_level | default(2) }}"
+    openshift_deployment_type: "{{ deployment_type }}"

+ 4 - 0
playbooks/common/openshift-master/config.yml

@@ -188,6 +188,10 @@
     masters_needing_certs: "{{ hostvars
                                | oo_select_keys(groups['oo_masters_to_config'] | difference(groups['oo_first_master']))
                                | oo_filter_list(filter_attr='master_certs_missing') }}"
+    master_hostnames: "{{ hostvars
+                               | oo_select_keys(groups['oo_masters_to_config'])
+                               | oo_collect('openshift.common.all_hostnames')
+                               | oo_flatten | unique }}"
     sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
   roles:
   - openshift_master_certificates

+ 2 - 1
playbooks/common/openshift-cluster/scaleup.yml

@@ -1,5 +1,5 @@
 ---
-- include: evaluate_groups.yml
+- include: ../openshift-cluster/evaluate_groups.yml
 
 - name: Configure docker hosts
   hosts: oo_nodes_to_config
@@ -27,6 +27,7 @@
   - openshift_facts:
       role: master
       local_facts:
+        ha: "{{ openshift_master_ha | default(groups.oo_masters | length > 1) }}"
         master_count: "{{ openshift_master_count | default(groups.oo_masters | length) }}"
   - name: Update master count
     lineinfile:

+ 4 - 0
playbooks/common/openshift-node/scaleup.yml

@@ -0,0 +1,4 @@
+---
+- include: ../openshift-cluster/evaluate_groups.yml
+
+- include: ../openshift-node/config.yml

+ 1 - 1
utils/src/ooinstall/openshift_ansible.py

@@ -204,7 +204,7 @@ def run_main_playbook(hosts, hosts_to_run_on, verbose=False):
     inventory_file = generate_inventory(hosts_to_run_on)
     if len(hosts_to_run_on) != len(hosts):
         main_playbook_path = os.path.join(CFG.ansible_playbook_directory,
-                                          'playbooks/byo/openshift-cluster/scaleup.yml')
+                                          'playbooks/byo/openshift-node/scaleup.yml')
     else:
         main_playbook_path = os.path.join(CFG.ansible_playbook_directory,
                                           'playbooks/byo/openshift-cluster/config.yml')