From 68f8a50abc0acd3005dbd98d0e7964bcf7900e26 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Tue, 23 May 2017 11:21:20 -0500 Subject: Fixing tux warnings and some final clean up --- roles/openshift_logging/tasks/install_logging.yaml | 16 +++++++++------- .../tasks/main.yaml | 11 ++++++----- roles/openshift_logging_kibana/tasks/main.yaml | 22 +++++++++++----------- roles/openshift_logging_mux/tasks/main.yaml | 15 +++++++++------ 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index 536d1281d..f2d757294 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -57,16 +57,13 @@ - set_fact: es_indices=[] when: openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count == 0 -# TODO: add more vars # We don't allow scaling down of ES nodes currently - include_role: name: openshift_logging_elasticsearch vars: generated_certs_dir: "{{openshift.common.config_base}}/logging" openshift_logging_elasticsearch_deployment_name: "{{ item.0 }}" -# TODO: fix this logic when we have existing DC but no PVC openshift_logging_elasticsearch_pvc_name: "{{ openshift_logging_es_pvc_prefix ~ '-' ~ item.2 if item.1 is none else item.1 }}" -## openshift_logging_elasticsearch_replica_count: "{{ openshift_logging_es_cluster_size | int }}" openshift_logging_elasticsearch_storage_type: "{{ 'pvc' if openshift_logging_es_pvc_dynamic | bool else 'emptydir' }}" @@ -84,7 +81,7 @@ name: openshift_logging_elasticsearch vars: generated_certs_dir: "{{openshift.common.config_base}}/logging" - openshift_logging_elasticsearch_pvc_name: "{{ openshift_logging_es_pvc_prefix }}-{{ item | int + openshift_logging_facts.elasticsearch.deploymentconfigs | count }}" + openshift_logging_elasticsearch_pvc_name: "{{ openshift_logging_es_pvc_prefix }}-{{ item | int + openshift_logging_facts.elasticsearch.deploymentconfigs | count - 1 }}" openshift_logging_elasticsearch_replica_count: "{{ openshift_logging_es_cluster_size | int }}" openshift_logging_elasticsearch_storage_type: "{{ 'pvc' if openshift_logging_es_pvc_dynamic | bool else 'emptydir' }}" @@ -103,7 +100,7 @@ - set_fact: es_ops_indices=[] when: openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count == 0 -# TODO: add more vars + - include_role: name: openshift_logging_elasticsearch vars: @@ -130,11 +127,16 @@ name: openshift_logging_elasticsearch vars: generated_certs_dir: "{{openshift.common.config_base}}/logging" - openshift_logging_elasticsearch_pvc_name: "{{ openshift_logging_es_pvc_prefix }}-{{ item | int + openshift_logging_facts.elasticsearch_ops.deploymentconfigs | count }}" + openshift_logging_elasticsearch_pvc_name: "{{ openshift_logging_es_pvc_prefix }}-{{ item | int + openshift_logging_facts.elasticsearch_ops.deploymentconfigs | count - 1 }}" openshift_logging_elasticsearch_ops_deployment: true openshift_logging_elasticsearch_replica_count: "{{ openshift_logging_es_ops_cluster_size | int }}" - with_sequence: count={{ ( ( openshift_logging_es_ops_cluster_size | int ) - ( openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count ) ) }} + openshift_logging_elasticsearch_storage_type: "{{ 'pvc' if openshift_logging_es_pvc_dynamic | bool else 'emptydir' }}" + openshift_logging_elasticsearch_pvc_size: "{{ openshift_logging_es_pvc_size }}" + openshift_logging_elasticsearch_pvc_dynamic: "{{ openshift_logging_es_pvc_dynamic }}" + openshift_logging_elasticsearch_pvc_pv_selector: "{{ openshift_logging_es_pv_selector }}" + + with_sequence: count={{ openshift_logging_es_ops_cluster_size | int - openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count }} when: - openshift_logging_use_ops | bool diff --git a/roles/openshift_logging_elasticsearch/tasks/main.yaml b/roles/openshift_logging_elasticsearch/tasks/main.yaml index 8713b3f5f..7e88a7498 100644 --- a/roles/openshift_logging_elasticsearch/tasks/main.yaml +++ b/roles/openshift_logging_elasticsearch/tasks/main.yaml @@ -138,7 +138,6 @@ from_file: elasticsearch.yml: "{{ tempdir }}/elasticsearch.yml" logging.yml: "{{ tempdir }}/elasticsearch-logging.yml" -# when: # secret @@ -174,8 +173,9 @@ selector: component: "{{ es_component }}" provider: openshift -# labels: -# - logging-infra: 'support' + # pending #4091 + #labels: + #- logging-infra: 'support' ports: - port: 9300 @@ -187,8 +187,9 @@ selector: component: "{{ es_component }}" provider: openshift -# labels: -# - logging-infra: 'support' + # pending #4091 + #labels: + #- logging-infra: 'support' ports: - port: 9200 targetPort: "restapi" diff --git a/roles/openshift_logging_kibana/tasks/main.yaml b/roles/openshift_logging_kibana/tasks/main.yaml index 72a41af5e..55b28ee24 100644 --- a/roles/openshift_logging_kibana/tasks/main.yaml +++ b/roles/openshift_logging_kibana/tasks/main.yaml @@ -3,8 +3,6 @@ - include: determine_version.yaml -- debug: var=tempdir - # allow passing in a tempdir - name: Create temp directory for doing work in command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX @@ -64,8 +62,9 @@ selector: component: "{{ kibana_component }}" provider: openshift -# labels: -# - logging-infra: 'support' + # pending #4091 + #labels: + #- logging-infra: 'support' ports: - port: 443 targetPort: "oaproxy" @@ -174,13 +173,14 @@ state: present name: "logging-kibana-proxy" namespace: "{{ openshift_logging_namespace }}" -# files: -# - name: server-key -# path: "{{ generated_certs_dir }}/kibana-internal.key" -# - name: server-cert -# path: "{{ generated_certs_dir }}/kibana-internal.crt" -# - name: server-tls -# path: "{{ generated_certs_dir }}/server-tls.json" + # TODO: when possible to have both files and contents for oc_secret use this + #files: + #- name: server-key + # path: "{{ generated_certs_dir }}/kibana-internal.key" + #- name: server-cert + # path: "{{ generated_certs_dir }}/kibana-internal.crt" + #- name: server-tls + # path: "{{ generated_certs_dir }}/server-tls.json" contents: - path: oauth-secret data: "{{ oauth_secret }}" diff --git a/roles/openshift_logging_mux/tasks/main.yaml b/roles/openshift_logging_mux/tasks/main.yaml index e64a4d275..432cab9e9 100644 --- a/roles/openshift_logging_mux/tasks/main.yaml +++ b/roles/openshift_logging_mux/tasks/main.yaml @@ -130,14 +130,16 @@ selector: component: mux provider: openshift -# labels: -# - logging-infra: 'support' + # pending #4091 + #labels: + #- logging-infra: 'support' ports: - name: mux-forward port: "{{ openshift_logging_mux_port }}" targetPort: "mux-forward" -# externalIPs: -# - "{{ ansible_eth0.ipv4.address }}" + # pending #4091 + # externalIPs: + # - "{{ ansible_eth0.ipv4.address }}" when: openshift_logging_mux_allow_external | bool - name: Set logging-mux service for internal communication @@ -148,8 +150,9 @@ selector: component: mux provider: openshift -# labels: -# - logging-infra: 'support' + # pending #4091 + #labels: + #- logging-infra: 'support' ports: - name: mux-forward port: "{{ openshift_logging_mux_port }}" -- cgit v1.2.3