From dcc4165b72b16a98d7ff8e0f94d5c08beffe820d Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Thu, 19 Jan 2017 15:25:44 -0500 Subject: fixes #3127. Get files for oc_apply from remote host --- roles/openshift_metrics/tasks/install_metrics.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'roles/openshift_metrics') diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml index bab37dbfb..ddaa54438 100644 --- a/roles/openshift_metrics/tasks/install_metrics.yaml +++ b/roles/openshift_metrics/tasks/install_metrics.yaml @@ -20,15 +20,23 @@ loop_control: loop_var: include_file +- find: paths={{ mktemp.stdout }}/templates patterns=*.yaml + register: object_def_files + changed_when: no + +- slurp: src={{item.path}} + register: object_defs + with_items: "{{object_def_files.files}}" + changed_when: no + - name: Create objects include: oc_apply.yaml vars: kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig" namespace: "{{ openshift_metrics_project }}" - file_name: "{{ item }}" - file_content: "{{ lookup('file',item) | from_yaml }}" - with_fileglob: - - "{{ mktemp.stdout }}/templates/*.yaml" + file_name: "{{ item.source }}" + file_content: "{{ item.content | b64decode | from_yaml }}" + with_items: "{{ object_defs.results }}" - name: Scaling up cluster include: start_metrics.yaml -- cgit v1.2.3 From 92f1cf87eb20254d9da77306aa598506000b159b Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Mon, 23 Jan 2017 14:09:24 -0500 Subject: fixes BZ-1414625. Check for httpd-tools and java before install --- roles/openshift_metrics/README.md | 4 ++++ roles/openshift_metrics/tasks/install_support.yaml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'roles/openshift_metrics') diff --git a/roles/openshift_metrics/README.md b/roles/openshift_metrics/README.md index 0f287e944..a61b0db5e 100644 --- a/roles/openshift_metrics/README.md +++ b/roles/openshift_metrics/README.md @@ -5,6 +5,10 @@ OpenShift Metrics Installation Requirements ------------ +This role has the following dependencies: + +- Java is required on the control node to generate keystores for the Java components +- httpd-tools is required on the control node to generate various passwords for the metrics components The following variables need to be set and will be validated: diff --git a/roles/openshift_metrics/tasks/install_support.yaml b/roles/openshift_metrics/tasks/install_support.yaml index b0e4bec80..cc5acc6e5 100644 --- a/roles/openshift_metrics/tasks/install_support.yaml +++ b/roles/openshift_metrics/tasks/install_support.yaml @@ -1,4 +1,22 @@ --- +- name: Check control node to see if htpasswd is installed + local_action: command which htpasswd + register: htpasswd_check + failed_when: no + changed_when: no + +- fail: msg="'htpasswd' is unavailable. Please install httpd-tools on the control node" + when: htpasswd_check.rc == 1 + +- name: Check control node to see if keytool is installed + local_action: command which htpasswd + register: keytool_check + failed_when: no + changed_when: no + +- fail: msg="'keytool' is unavailable. Please install java-1.8.0-openjdk-headless on the control node" + when: keytool_check.rc == 1 + - include: generate_certificates.yaml - include: generate_serviceaccounts.yaml - include: generate_services.yaml -- cgit v1.2.3