From e1a91973650a26859d1d02449ac35b1946746392 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Fri, 28 Apr 2017 13:44:54 -0400 Subject: First POC of a CFME turnkey solution in openshift-anisble --- playbooks/byo/openshift-cfme/config.yml | 8 ++++++ playbooks/byo/openshift-cfme/uninstall.yml | 6 +++++ playbooks/common/openshift-cfme/config.yml | 35 ++++++++++++++++++++++++++ playbooks/common/openshift-cfme/filter_plugins | 1 + playbooks/common/openshift-cfme/library | 1 + playbooks/common/openshift-cfme/roles | 1 + playbooks/common/openshift-cfme/uninstall.yml | 8 ++++++ 7 files changed, 60 insertions(+) create mode 100644 playbooks/byo/openshift-cfme/config.yml create mode 100644 playbooks/byo/openshift-cfme/uninstall.yml create mode 100644 playbooks/common/openshift-cfme/config.yml create mode 120000 playbooks/common/openshift-cfme/filter_plugins create mode 120000 playbooks/common/openshift-cfme/library create mode 120000 playbooks/common/openshift-cfme/roles create mode 100644 playbooks/common/openshift-cfme/uninstall.yml (limited to 'playbooks') diff --git a/playbooks/byo/openshift-cfme/config.yml b/playbooks/byo/openshift-cfme/config.yml new file mode 100644 index 000000000..0e8e7a94d --- /dev/null +++ b/playbooks/byo/openshift-cfme/config.yml @@ -0,0 +1,8 @@ +--- +- include: ../openshift-cluster/initialize_groups.yml + tags: + - always + +- include: ../../common/openshift-cluster/evaluate_groups.yml + +- include: ../../common/openshift-cfme/config.yml diff --git a/playbooks/byo/openshift-cfme/uninstall.yml b/playbooks/byo/openshift-cfme/uninstall.yml new file mode 100644 index 000000000..c8ed16859 --- /dev/null +++ b/playbooks/byo/openshift-cfme/uninstall.yml @@ -0,0 +1,6 @@ +--- +# - include: ../openshift-cluster/initialize_groups.yml +# tags: +# - always + +- include: ../../common/openshift-cfme/uninstall.yml diff --git a/playbooks/common/openshift-cfme/config.yml b/playbooks/common/openshift-cfme/config.yml new file mode 100644 index 000000000..1c3400bd1 --- /dev/null +++ b/playbooks/common/openshift-cfme/config.yml @@ -0,0 +1,35 @@ +--- +# TODO: Make this work. The 'name' variable below is undefined +# presently because it's part of the cfme role. This play can't run +# until that's re-worked. +# +# - name: Pre-Pull manageiq-pods docker images +# hosts: nodes +# tasks: +# - name: Ensure the latest manageiq-pods docker image is pulling +# docker_image: +# name: "{{ openshift_cfme_container_image }}" +# # Fire-and-forget method, never timeout +# async: 99999999999 +# # F-a-f, never check on this. True 'background' task. +# poll: 0 + +- name: Setup CFME + hosts: oo_first_master + vars: + r_openshift_cfme_miq_template_content: "{{ lookup('file', 'roles/openshift_cfme/files/miq-template.yaml') | from_yaml}}" + pre_tasks: + - name: Create a temporary place to evaluate the PV templates + command: mktemp -d /tmp/openshift-ansible-XXXXXXX + register: r_openshift_cfme_mktemp + changed_when: false + - name: Ensure the server template was read from disk + debug: + msg="{{ r_openshift_cfme_miq_template_content | from_yaml }}" + + tasks: + - name: Run the CFME Setup Role + include_role: + name: openshift_cfme + vars: + template_dir: "{{ hostvars[groups.masters.0].r_openshift_cfme_mktemp.stdout }}" diff --git a/playbooks/common/openshift-cfme/filter_plugins b/playbooks/common/openshift-cfme/filter_plugins new file mode 120000 index 000000000..99a95e4ca --- /dev/null +++ b/playbooks/common/openshift-cfme/filter_plugins @@ -0,0 +1 @@ +../../../filter_plugins \ No newline at end of file diff --git a/playbooks/common/openshift-cfme/library b/playbooks/common/openshift-cfme/library new file mode 120000 index 000000000..ba40d2f56 --- /dev/null +++ b/playbooks/common/openshift-cfme/library @@ -0,0 +1 @@ +../../../library \ No newline at end of file diff --git a/playbooks/common/openshift-cfme/roles b/playbooks/common/openshift-cfme/roles new file mode 120000 index 000000000..20c4c58cf --- /dev/null +++ b/playbooks/common/openshift-cfme/roles @@ -0,0 +1 @@ +../../../roles \ No newline at end of file diff --git a/playbooks/common/openshift-cfme/uninstall.yml b/playbooks/common/openshift-cfme/uninstall.yml new file mode 100644 index 000000000..78b8e7668 --- /dev/null +++ b/playbooks/common/openshift-cfme/uninstall.yml @@ -0,0 +1,8 @@ +--- +- name: Uninstall CFME + hosts: masters + tasks: + - name: Run the CFME Uninstall Role Tasks + include_role: + name: openshift_cfme + tasks_from: uninstall -- cgit v1.2.1 From de06d1ec79c7812a381866aa177098bc749d255d Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 14 Jun 2017 16:12:31 -0400 Subject: Reconfigure masters in serial to avoid HA meltdowns --- playbooks/common/openshift-cfme/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'playbooks') diff --git a/playbooks/common/openshift-cfme/config.yml b/playbooks/common/openshift-cfme/config.yml index 1c3400bd1..5887c05ec 100644 --- a/playbooks/common/openshift-cfme/config.yml +++ b/playbooks/common/openshift-cfme/config.yml @@ -14,6 +14,20 @@ # # F-a-f, never check on this. True 'background' task. # poll: 0 +- name: Configure Masters for CFME Bulk Image Imports + hosts: oo_masters_to_config + serial: 1 + tasks: + - name: Run master cfme tuning playbook + include_role: + name: openshift_cfme + tasks_from: tune_masters + + - name: hold up + pause: + prompt: You just reconfigured that max param bro + + - name: Setup CFME hosts: oo_first_master vars: -- cgit v1.2.1 From 39e3ae639217738e3ffbb7e90a1e8940bc840798 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Thu, 15 Jun 2017 09:10:41 -0400 Subject: Add missing file. Remove debugging prompt. --- playbooks/common/openshift-cfme/config.yml | 5 ----- 1 file changed, 5 deletions(-) (limited to 'playbooks') diff --git a/playbooks/common/openshift-cfme/config.yml b/playbooks/common/openshift-cfme/config.yml index 5887c05ec..533a35d9e 100644 --- a/playbooks/common/openshift-cfme/config.yml +++ b/playbooks/common/openshift-cfme/config.yml @@ -23,11 +23,6 @@ name: openshift_cfme tasks_from: tune_masters - - name: hold up - pause: - prompt: You just reconfigured that max param bro - - - name: Setup CFME hosts: oo_first_master vars: -- cgit v1.2.1