summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-09-02 09:16:18 -0400
committerScott Dodson <sdodson@redhat.com>2016-09-26 13:33:47 -0400
commit1b148fe06d61a76142d51e865b4d7ebbb26f0013 (patch)
treec6c66d9f386e39bdee859e03394b8b0bf221e6d0
parentd5f9fa24a4e5d44ba5eb8637da5393195f0335c9 (diff)
downloadopenshift-1b148fe06d61a76142d51e865b4d7ebbb26f0013.tar.gz
openshift-1b148fe06d61a76142d51e865b4d7ebbb26f0013.tar.bz2
openshift-1b148fe06d61a76142d51e865b4d7ebbb26f0013.tar.xz
openshift-1b148fe06d61a76142d51e865b4d7ebbb26f0013.zip
Add logging to install playbooks
-rw-r--r--playbooks/common/openshift-cluster/openshift_hosted.yml34
1 files changed, 33 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/openshift_hosted.yml b/playbooks/common/openshift-cluster/openshift_hosted.yml
index 4aca4daf4..15bf232b1 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted.yml
+++ b/playbooks/common/openshift-cluster/openshift_hosted.yml
@@ -19,6 +19,12 @@
openshift_hosted_router_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
openshift_hosted_registry_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
when: "'master' in hostvars[groups.oo_first_master.0].openshift and 'registry_url' in hostvars[groups.oo_first_master.0].openshift.master"
+ - set_fact:
+ logging_hostname: "{{ openshift_hosted_logging_hostname | default('kibana.' ~ openshift_master_default_subdomain) }}"
+ logging_ops_hostname: "{{ openshift_hosted_logging_ops_hostname | default('kibana-ops.' ~ openshift_master_default_subdomain) }}"
+ logging_master_public_url: "{{ openshift_hosted_logging_master_public_url | default(openshift.master.public_api_url) }}"
+ logging_elasticsearch_cluster_size: "{{ openshift_hosted_logging_elasticsearch_cluster_size | default(1) }}"
+ logging_elasticsearch_ops_cluster_size: "{{ openshift_hosted_logging_elasticsearch_ops_cluster_size | default(1) }}"
roles:
- role: openshift_cli
- role: openshift_hosted_facts
@@ -44,9 +50,35 @@
- role: openshift_hosted
- role: openshift_metrics
when: openshift.hosted.metrics.deploy | bool
+ - role: openshift_hosted_logging
+ when: openshift.hosted.logging.deploy | bool
+ openshift_hosted_logging_hostname: "{{ logging_hostname }}"
+ openshift_hosted_logging_ops_hostname: "{{ logging_ops_hostname }}"
+ openshift_hosted_logging_master_public_url: "{{ logging_master_public_url }}"
+ openshift_hosted_logging_elasticsearch_cluster_size: "{{ logging_elasticsearch_cluster_size }}"
+ openshift_hosted_logging_elasticsearch_ops_cluster_size: "{{ logging_elasticsearch_ops_cluster_size }}"
- role: cockpit-ui
when: openshift.common.deployment_subtype == 'registry'
+- name: Configure all masters for logging
+ serial: 1
+ handlers:
+ - include: ../../../roles/openshift_master/handlers/main.yml
+ static: yes
+ hosts: oo_masters
+ tasks:
+ - openshift_facts:
+ role: master
+ local_facts:
+ logging_public_url: "https://{{ openshift_hosted_logging_hostname | default('kibana.' ~ openshift_master_default_subdomain) }}"
+ when: openshift.hosted.logging.deploy | default(openshift.common.version_gte_3_3_or_1_3)
+ - modify_yaml:
+ dest: "{{ openshift.common.config_base }}/master/master-config.yaml"
+ yaml_key: assetConfig.loggingPublicURL
+ yaml_value: "{{ openshift.master.logging_public_url }}"
+ notify: restart master
+ when: openshift.hosted.logging.deploy | default(openshift.common.version_gte_3_3_or_1_3)
+
- name: Configure CA certificate for secure registry
hosts: oo_nodes_to_config
tags:
@@ -87,7 +119,7 @@
{{ openshift.common.client_binary }} get service docker-registry
--template='{{ '{{' }} .spec.clusterIP {{ '}}' }}'
--config={{ openshift_hosted_kubeconfig }}
- -n default
+ -n default
register: docker_registry_service_ip
when: openshift.common.deployment_subtype == 'registry'
changed_when: false