summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/tasks/install_metrics.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_metrics/tasks/install_metrics.yaml')
-rw-r--r--roles/openshift_metrics/tasks/install_metrics.yaml30
1 files changed, 20 insertions, 10 deletions
diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml
index ddaa54438..66a3abdbd 100644
--- a/roles/openshift_metrics/tasks/install_metrics.yaml
+++ b/roles/openshift_metrics/tasks/install_metrics.yaml
@@ -1,14 +1,5 @@
---
-- name: Check that hawkular_metrics_hostname is set
- fail: msg='the openshift_metrics_hawkular_hostname variable is required'
- when: openshift_metrics_hawkular_hostname is not defined
-
-- name: Check the value of openshift_metrics_cassandra_storage_type
- fail:
- msg: >
- openshift_metrics_cassandra_storage_type ({{ openshift_metrics_cassandra_storage_type }})
- is invalid, must be one of: emptydir, pv, dynamic
- when: openshift_metrics_cassandra_storage_type not in openshift_metrics_cassandra_storage_types
+- include: pre_install.yaml
- name: Install Metrics
include: "{{ role_path }}/tasks/install_{{ include_file }}.yaml"
@@ -19,6 +10,11 @@
- cassandra
loop_control:
loop_var: include_file
+ when: "not {{ openshift_metrics_heapster_standalone | bool }}"
+
+- name: Install Heapster Standalone
+ include: install_heapster.yaml
+ when: "{{ openshift_metrics_heapster_standalone | bool }}"
- find: paths={{ mktemp.stdout }}/templates patterns=*.yaml
register: object_def_files
@@ -38,6 +34,20 @@
file_content: "{{ item.content | b64decode | from_yaml }}"
with_items: "{{ object_defs.results }}"
+- command: >
+ {{openshift.common.client_binary}}
+ --config={{mktemp.stdout}}/admin.kubeconfig
+ get rc
+ -l metrics-infra
+ -o name
+ -n {{openshift_metrics_project}}
+ register: existing_metrics_rc
+ changed_when: no
+
+- name: Scaling down cluster to recognize changes
+ include: stop_metrics.yaml
+ when: "{{ existing_metrics_rc.stdout_lines | length > 0 }}"
+
- name: Scaling up cluster
include: start_metrics.yaml
tags: openshift_metrics_start_cluster