summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorDiego Castro <spinolacastro@gmail.com>2015-10-22 16:22:43 -0300
committerDiego Castro <spinolacastro@gmail.com>2015-10-22 16:22:43 -0300
commitf559eb3146c65a6ec58f0fed3eb2d1124c1314c7 (patch)
tree24975a7a87568784b88252bc70d14f7b302670b0 /playbooks/common
parent8468d25fae71c80277c10ad975641cb1ba230fd8 (diff)
parente6d426fddd79c08452195cd32286bb600f62d51d (diff)
downloadopenshift-f559eb3146c65a6ec58f0fed3eb2d1124c1314c7.tar.gz
openshift-f559eb3146c65a6ec58f0fed3eb2d1124c1314c7.tar.bz2
openshift-f559eb3146c65a6ec58f0fed3eb2d1124c1314c7.tar.xz
openshift-f559eb3146c65a6ec58f0fed3eb2d1124c1314c7.zip
fix merge conflicts
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/create_services.yml8
-rw-r--r--playbooks/common/openshift-etcd/config.yml1
-rw-r--r--playbooks/common/openshift-master/config.yml43
-rw-r--r--playbooks/common/openshift-master/service.yml4
-rw-r--r--playbooks/common/openshift-node/config.yml21
-rw-r--r--playbooks/common/openshift-node/service.yml4
6 files changed, 49 insertions, 32 deletions
diff --git a/playbooks/common/openshift-cluster/create_services.yml b/playbooks/common/openshift-cluster/create_services.yml
deleted file mode 100644
index e70709d19..000000000
--- a/playbooks/common/openshift-cluster/create_services.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Deploy OpenShift Services
- hosts: "{{ g_svc_master }}"
- connection: ssh
- gather_facts: yes
- roles:
- - openshift_registry
- - openshift_router
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml
index 3cc561ba0..952960652 100644
--- a/playbooks/common/openshift-etcd/config.yml
+++ b/playbooks/common/openshift-etcd/config.yml
@@ -85,6 +85,7 @@
when: etcd_server_certs_missing
roles:
- etcd
+ - role: nickhammond.logrotate
- name: Delete temporary directory on localhost
hosts: localhost
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index 904ad2dab..0d78eca30 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -37,7 +37,7 @@
public_console_url: "{{ openshift_master_public_console_url | default(None) }}"
- name: Check status of external etcd certificatees
stat:
- path: "/etc/openshift/master/{{ item }}"
+ path: "{{ openshift.common.config_base }}/master/{{ item }}"
with_items:
- master.etcd-client.crt
- master.etcd-ca.crt
@@ -47,7 +47,7 @@
| map(attribute='stat.exists')
| list | intersect([false])}}"
etcd_cert_subdir: openshift-master-{{ openshift.common.hostname }}
- etcd_cert_config_dir: /etc/openshift/master
+ etcd_cert_config_dir: "{{ openshift.common.config_base }}/master"
etcd_cert_prefix: master.etcd-
when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
@@ -96,7 +96,7 @@
tasks:
- name: Ensure certificate directory exists
file:
- path: /etc/openshift/master
+ path: "{{ openshift.common.config_base }}/master"
state: directory
when: etcd_client_certs_missing is defined and etcd_client_certs_missing
- name: Unarchive the tarball on the master
@@ -134,7 +134,7 @@
- name: Check status of master certificates
stat:
- path: "/etc/openshift/master/{{ item }}"
+ path: "{{ openshift.common.config_base }}/master/{{ item }}"
with_items: openshift_master_certs
register: g_master_cert_stat_result
- set_fact:
@@ -142,12 +142,12 @@
| map(attribute='stat.exists')
| list | intersect([false])}}"
master_cert_subdir: master-{{ openshift.common.hostname }}
- master_cert_config_dir: /etc/openshift/master
+ master_cert_config_dir: "{{ openshift.common.config_base }}/master"
- name: Configure master certificates
hosts: oo_first_master
vars:
- master_generated_certs_dir: /etc/openshift/generated-configs
+ master_generated_certs_dir: "{{ openshift.common.config_base }}/generated-configs"
masters_needing_certs: "{{ hostvars
| oo_select_keys(groups['oo_masters_to_config'] | difference(groups['oo_first_master']))
| oo_filter_list(filter_attr='master_certs_missing') }}"
@@ -186,10 +186,11 @@
vars:
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ embedded_etcd: "{{ openshift.master.embedded_etcd }}"
pre_tasks:
- name: Ensure certificate directory exists
file:
- path: /etc/openshift/master
+ path: "{{ openshift.common.config_base }}/master"
state: directory
when: master_certs_missing and 'oo_first_master' not in group_names
- name: Unarchive the tarball on the master
@@ -199,6 +200,7 @@
when: master_certs_missing and 'oo_first_master' not in group_names
roles:
- openshift_master
+ - role: nickhammond.logrotate
- role: fluentd_master
when: openshift.common.use_fluentd | bool
post_tasks:
@@ -215,6 +217,17 @@
- role: openshift_master_cluster
when: openshift_master_ha | bool
- openshift_examples
+ - role: openshift_cluster_metrics
+ when: openshift.common.use_cluster_metrics | bool
+
+- name: Enable cockpit
+ hosts: oo_first_master
+ vars:
+ cockpit_plugins: "{{ osm_cockpit_plugins | default(['cockpit-kubernetes']) }}"
+ roles:
+ - role: cockpit
+ when: ( deployment_type in ['atomic-enterprise','openshift-enterprise'] ) and
+ (osm_use_cockpit | bool or osm_use_cockpit is undefined )
# Additional instance config for online deployments
- name: Additional instance config
@@ -231,3 +244,19 @@
tasks:
- file: name={{ g_master_mktemp.stdout }} state=absent
changed_when: False
+
+- name: Configure service accounts
+ hosts: oo_first_master
+
+ vars:
+ accounts: ["router", "registry"]
+
+ roles:
+ - openshift_serviceaccounts
+
+- name: Create services
+ hosts: oo_first_master
+ roles:
+ - role: openshift_router
+ when: openshift.master.infra_nodes is defined
+ #- role: openshift_registry
diff --git a/playbooks/common/openshift-master/service.yml b/playbooks/common/openshift-master/service.yml
index 5636ad156..27e1e66f9 100644
--- a/playbooks/common/openshift-master/service.yml
+++ b/playbooks/common/openshift-master/service.yml
@@ -10,9 +10,9 @@
add_host: name={{ item }} groups=g_service_masters
with_items: oo_host_group_exp | default([])
-- name: Change openshift-master state on master instance(s)
+- name: Change state on master instance(s)
hosts: g_service_masters
connection: ssh
gather_facts: no
tasks:
- - service: name=openshift-master state="{{ new_cluster_state }}"
+ - service: name={{ openshift.common.service_type }}-master state="{{ new_cluster_state }}"
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
index 705f7f223..a14ca8e11 100644
--- a/playbooks/common/openshift-node/config.yml
+++ b/playbooks/common/openshift-node/config.yml
@@ -20,9 +20,10 @@
local_facts:
labels: "{{ openshift_node_labels | default(None) }}"
annotations: "{{ openshift_node_annotations | default(None) }}"
+ schedulable: "{{ openshift_schedulable | default(openshift_scheduleable) | default(None) }}"
- name: Check status of node certificates
stat:
- path: "/etc/openshift/node/{{ item }}"
+ path: "{{ openshift.common.config_base }}/node/{{ item }}"
with_items:
- "system:node:{{ openshift.common.hostname }}.crt"
- "system:node:{{ openshift.common.hostname }}.key"
@@ -35,8 +36,8 @@
certs_missing: "{{ stat_result.results | map(attribute='stat.exists')
| list | intersect([false])}}"
node_subdir: node-{{ openshift.common.hostname }}
- config_dir: /etc/openshift/generated-configs/node-{{ openshift.common.hostname }}
- node_cert_dir: /etc/openshift/node
+ config_dir: "{{ openshift.common.config_base }}/generated-configs/node-{{ openshift.common.hostname }}"
+ node_cert_dir: "{{ openshift.common.config_base }}/node"
- name: Create temp directory for syncing certs
hosts: localhost
@@ -89,9 +90,9 @@
path: "{{ node_cert_dir }}"
state: directory
- # TODO: notify restart openshift-node
+ # TODO: notify restart node
# possibly test service started time against certificate/config file
- # timestamps in openshift-node to trigger notify
+ # timestamps in node to trigger notify
- name: Unarchive the tarball on the node
unarchive:
src: "{{ sync_tmpdir }}/{{ node_subdir }}.tgz"
@@ -99,6 +100,7 @@
when: certs_missing
roles:
- openshift_node
+ - role: nickhammond.logrotate
- role: fluentd_node
when: openshift.common.use_fluentd | bool
tasks:
@@ -123,21 +125,14 @@
- os_env_extras
- os_env_extras_node
-- name: Set scheduleability
+- name: Set schedulability
hosts: oo_first_master
vars:
openshift_nodes: "{{ hostvars
| oo_select_keys(groups['oo_nodes_to_config'])
| oo_collect('openshift.common.hostname') }}"
- openshift_unscheduleable_nodes: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] | default([]))
- | oo_collect('openshift.common.hostname', {'openshift_scheduleable': False}) }}"
openshift_node_vars: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']) }}"
pre_tasks:
- - set_fact:
- openshift_scheduleable_nodes: "{{ hostvars
- | oo_select_keys(groups['oo_nodes_to_config'] | default([]))
- | oo_collect('openshift.common.hostname')
- | difference(openshift_unscheduleable_nodes) }}"
roles:
- openshift_manage_node
diff --git a/playbooks/common/openshift-node/service.yml b/playbooks/common/openshift-node/service.yml
index f76df089f..5cf83e186 100644
--- a/playbooks/common/openshift-node/service.yml
+++ b/playbooks/common/openshift-node/service.yml
@@ -10,9 +10,9 @@
add_host: name={{ item }} groups=g_service_nodes
with_items: oo_host_group_exp | default([])
-- name: Change openshift-node state on node instance(s)
+- name: Change state on node instance(s)
hosts: g_service_nodes
connection: ssh
gather_facts: no
tasks:
- - service: name=openshift-node state="{{ new_cluster_state }}"
+ - service: name={{ service_type }}-node state="{{ new_cluster_state }}"