summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-28 03:02:59 -0700
committerGitHub <noreply@github.com>2017-09-28 03:02:59 -0700
commit3c0cb3842fbc6b658b6e1b821d149b5123a710d8 (patch)
treea6e315f275f8e4bd46268939b518b48ee8cac920 /playbooks/common/openshift-cluster
parentdcdf09e0aaae055cad8e01e07aa07a951a81f798 (diff)
parentc096aff90d117e485e5bea17c9386d16c571fb5d (diff)
downloadopenshift-3c0cb3842fbc6b658b6e1b821d149b5123a710d8.tar.gz
openshift-3c0cb3842fbc6b658b6e1b821d149b5123a710d8.tar.bz2
openshift-3c0cb3842fbc6b658b6e1b821d149b5123a710d8.tar.xz
openshift-3c0cb3842fbc6b658b6e1b821d149b5123a710d8.zip
Merge pull request #5527 from mtnbikenc/installer-checkpoint
Automatic merge from submit-queue. Installer checkpointing This pull request adds an Ansible callback plugin to allow for 'checkpointing' the status of the OpenShift-Ansible installer. The installer is divided up into phases and each phase will start with a status of 'Not Started'. As the phase is performed the status will be updated to 'In Progress' and finally 'Complete'. Should the install fail or complete successfully, the callback plugin will report the status of all phases after the PLAY RECAP. The INSTALLER STATUS is also written to the Ansible log file. https://trello.com/c/VNEvT2Fo Changes: - Added installer_checkpoint role and callback plugin - Added checkpoint 'Start' and 'End' plays to each installation phase Additional items related to enabling proper checkpointing: - Removed openshift_set_hostname and related task (related to 3.0) - Added openshift-hosted entry point playbook - Moved openshift metrics and logging out of openshift_hosted playbook - Moved API Aggregation play to master install Example playbook output: ``` <- snip -> PLAY RECAP *********************************************************************************************************************************** ec2-34-207-180-218.compute-1.amazonaws.com : ok=158 changed=16 unreachable=0 failed=0 ec2-52-87-169-12.compute-1.amazonaws.com : ok=469 changed=74 unreachable=0 failed=0 ec2-52-90-209-20.compute-1.amazonaws.com : ok=157 changed=17 unreachable=0 failed=0 localhost : ok=24 changed=0 unreachable=0 failed=0 INSTALLER STATUS ***************************************************************************************************************************** Initialization : Complete etcd Install : Complete NFS Install : Not Started Load balancer Install : Not Started Master Install : Complete Master Additional Install : Complete Node Install : Complete GlusterFS Install : Not Started Hosted Install : Complete Metrics Install : Not Started Logging Install : Not Started Service Catalog Install : Not Started ```
Diffstat (limited to 'playbooks/common/openshift-cluster')
-rw-r--r--playbooks/common/openshift-cluster/config.yml42
-rw-r--r--playbooks/common/openshift-cluster/openshift_hosted.yml26
-rw-r--r--playbooks/common/openshift-cluster/openshift_logging.yml23
-rw-r--r--playbooks/common/openshift-cluster/openshift_metrics.yml25
-rw-r--r--playbooks/common/openshift-cluster/service_catalog.yml22
-rw-r--r--playbooks/common/openshift-cluster/std_include.yml24
6 files changed, 121 insertions, 41 deletions
diff --git a/playbooks/common/openshift-cluster/config.yml b/playbooks/common/openshift-cluster/config.yml
index 804ea8eb8..bf6f4e7cd 100644
--- a/playbooks/common/openshift-cluster/config.yml
+++ b/playbooks/common/openshift-cluster/config.yml
@@ -22,57 +22,33 @@
tags:
- always
-- name: Set hostname
- hosts: oo_masters_to_config:oo_nodes_to_config
- tasks:
- # TODO: switch back to hostname module once we depend on ansible-2.4
- # https://github.com/ansible/ansible/pull/25906
- - name: Set hostname
- command: "hostnamectl set-hostname {{ openshift.common.hostname }}"
- when: openshift_set_hostname | default(false,true) | bool
-
- include: ../openshift-etcd/config.yml
- include: ../openshift-nfs/config.yml
- tags:
- - nfs
+ when: groups.oo_nfs_to_config | default([]) | count > 0
- include: ../openshift-loadbalancer/config.yml
- tags:
- - loadbalancer
+ when: groups.oo_lb_to_config | default([]) | count > 0
- include: ../openshift-master/config.yml
- include: ../openshift-master/additional_config.yml
- include: ../openshift-node/config.yml
- tags:
- - node
- include: ../openshift-glusterfs/config.yml
- tags:
- - glusterfs
+ when: groups.oo_glusterfs_to_config | default([]) | count > 0
- include: openshift_hosted.yml
- tags:
- - hosted
-- name: Configure API Aggregation on masters
- hosts: oo_masters
- serial: 1
- tasks:
- - block:
- - include_role:
- name: openshift_service_catalog
- tasks_from: wire_aggregator
- vars:
- first_master: "{{ groups.oo_first_master[0] }}"
+- include: openshift_metrics.yml
+ when: openshift_metrics_install_metrics | default(false) | bool
+
+- include: openshift_logging.yml
+ when: openshift_logging_install_logging | default(false) | bool
- include: service_catalog.yml
- when:
- - openshift_enable_service_catalog | default(false) | bool
- tags:
- - servicecatalog
+ when: openshift_enable_service_catalog | default(false) | bool
- name: Print deprecated variable warning message if necessary
hosts: oo_first_master
diff --git a/playbooks/common/openshift-cluster/openshift_hosted.yml b/playbooks/common/openshift-cluster/openshift_hosted.yml
index 2cb404abe..b9eb380d3 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted.yml
+++ b/playbooks/common/openshift-cluster/openshift_hosted.yml
@@ -1,4 +1,15 @@
---
+- name: Hosted Install Checkpoint Start
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Hosted install 'In Progress'
+ set_stats:
+ data:
+ installer_phase_hosted: "In Progress"
+ aggregate: false
+
- include: create_persistent_volumes.yml
- include: openshift_default_storage_class.yml
@@ -9,10 +20,17 @@
- include: openshift_hosted_registry.yml
-- include: openshift_metrics.yml
-
-- include: openshift_logging.yml
-
- include: cockpit-ui.yml
- include: openshift_prometheus.yml
+
+- name: Hosted Install Checkpoint End
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Hosted install 'Complete'
+ set_stats:
+ data:
+ installer_phase_hosted: "Complete"
+ aggregate: false
diff --git a/playbooks/common/openshift-cluster/openshift_logging.yml b/playbooks/common/openshift-cluster/openshift_logging.yml
index c1a5d83cd..69f50fbcd 100644
--- a/playbooks/common/openshift-cluster/openshift_logging.yml
+++ b/playbooks/common/openshift-cluster/openshift_logging.yml
@@ -1,4 +1,15 @@
---
+- name: Logging Install Checkpoint Start
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Logging install 'In Progress'
+ set_stats:
+ data:
+ installer_phase_logging: "In Progress"
+ aggregate: false
+
- name: OpenShift Aggregated Logging
hosts: oo_first_master
roles:
@@ -11,4 +22,14 @@
- include_role:
name: openshift_logging
tasks_from: update_master_config
- when: openshift_logging_install_logging | default(false) | bool
+
+- name: Logging Install Checkpoint End
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Logging install 'Complete'
+ set_stats:
+ data:
+ installer_phase_logging: "Complete"
+ aggregate: false
diff --git a/playbooks/common/openshift-cluster/openshift_metrics.yml b/playbooks/common/openshift-cluster/openshift_metrics.yml
index 9cc98fe1e..e369dcd86 100644
--- a/playbooks/common/openshift-cluster/openshift_metrics.yml
+++ b/playbooks/common/openshift-cluster/openshift_metrics.yml
@@ -1,10 +1,19 @@
---
+- name: Metrics Install Checkpoint Start
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Metrics install 'In Progress'
+ set_stats:
+ data:
+ installer_phase_metrics: "In Progress"
+ aggregate: false
+
- name: OpenShift Metrics
hosts: oo_first_master
roles:
- role: openshift_metrics
- when: openshift_metrics_install_metrics | default(false) | bool
-
- name: OpenShift Metrics
hosts: oo_masters:!oo_first_master
@@ -14,4 +23,14 @@
include_role:
name: openshift_metrics
tasks_from: update_master_config.yaml
- when: openshift_metrics_install_metrics | default(false) | bool
+
+- name: Metrics Install Checkpoint End
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Metrics install 'Complete'
+ set_stats:
+ data:
+ installer_phase_metrics: "Complete"
+ aggregate: false
diff --git a/playbooks/common/openshift-cluster/service_catalog.yml b/playbooks/common/openshift-cluster/service_catalog.yml
index 529ee99be..95a8f601c 100644
--- a/playbooks/common/openshift-cluster/service_catalog.yml
+++ b/playbooks/common/openshift-cluster/service_catalog.yml
@@ -1,4 +1,15 @@
---
+- name: Service Catalog Install Checkpoint Start
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Service Catalog install 'In Progress'
+ set_stats:
+ data:
+ installer_phase_servicecatalog: "In Progress"
+ aggregate: false
+
- name: Service Catalog
hosts: oo_first_master
roles:
@@ -7,3 +18,14 @@
- template_service_broker
vars:
first_master: "{{ groups.oo_first_master[0] }}"
+
+- name: Service Catalog Install Checkpoint End
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set Service Catalog install 'Complete'
+ set_stats:
+ data:
+ installer_phase_servicecatalog: "Complete"
+ aggregate: false
diff --git a/playbooks/common/openshift-cluster/std_include.yml b/playbooks/common/openshift-cluster/std_include.yml
index cef0072f3..090ad6445 100644
--- a/playbooks/common/openshift-cluster/std_include.yml
+++ b/playbooks/common/openshift-cluster/std_include.yml
@@ -1,4 +1,17 @@
---
+- name: Initialization Checkpoint Start
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ roles:
+ - installer_checkpoint
+ tasks:
+ - name: Set install initialization 'In Progress'
+ set_stats:
+ data:
+ installer_phase_initialize: "In Progress"
+ aggregate: false
+
- include: evaluate_groups.yml
tags:
- always
@@ -22,3 +35,14 @@
- include: initialize_openshift_version.yml
tags:
- always
+
+- name: Initialization Checkpoint End
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Set install initialization 'Complete'
+ set_stats:
+ data:
+ installer_phase_initialize: "Complete"
+ aggregate: false