summaryrefslogtreecommitdiffstats
path: root/roles/openshift_register_nodes
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2015-04-30 17:04:15 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-06-10 11:29:23 -0400
commitb57392ddd54bbff225ba83dd5a5bf40ea99344a4 (patch)
tree28700b81ad52e4535604a4646baeea1c54b880c9 /roles/openshift_register_nodes
parentfe458e2c29bffdab7708b67539a36a08506560da (diff)
downloadopenshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.gz
openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.bz2
openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.tar.xz
openshift-b57392ddd54bbff225ba83dd5a5bf40ea99344a4.zip
Accomodate upstream configuration change
- Master config and certificates are now in /etc/openshift/master - Node config is now in /etc/openshift/node - Several certificates have been renamed to accomodate a flattening of structure to accomodate secret storage - Add openshift_data_dir to ensure etcd and volumes are stored in /var/lib/openshift - Add openshift_generated_configs_dir
Diffstat (limited to 'roles/openshift_register_nodes')
-rw-r--r--roles/openshift_register_nodes/tasks/main.yml14
-rw-r--r--roles/openshift_register_nodes/vars/main.yml13
2 files changed, 17 insertions, 10 deletions
diff --git a/roles/openshift_register_nodes/tasks/main.yml b/roles/openshift_register_nodes/tasks/main.yml
index dcb96bbf9..7a85f6624 100644
--- a/roles/openshift_register_nodes/tasks/main.yml
+++ b/roles/openshift_register_nodes/tasks/main.yml
@@ -16,10 +16,15 @@
oreg_url: "docker-registry.ops.rhcloud.com/openshift3_beta/ose-${component}:${version}"
when: openshift.common.deployment_type == 'online' and oreg_url is not defined
+- name: Create openshift_generated_configs_dir if it doesn't exist
+ file:
+ path: "{{ openshift_generated_configs_dir }}"
+ state: directory
+
- name: Create node config
command: >
/usr/bin/openshift admin create-node-config
- --node-dir={{ openshift_cert_dir }}/node-{{ item.openshift.common.hostname }}
+ --node-dir={{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}
--node={{ item.openshift.common.hostname }}
--hostnames={{ [item.openshift.common.hostname, item.openshift.common.public_hostname]|unique|join(",") }}
--dns-domain={{ openshift.dns.domain }}
@@ -28,13 +33,14 @@
--signer-key={{ openshift_master_ca_key }}
--signer-cert={{ openshift_master_ca_cert }}
--certificate-authority={{ openshift_master_ca_cert }}
- --signer-serial={{ openshift_master_ca_dir }}/serial.txt
+ --signer-serial={{ openshift_master_ca_serial }}
--node-client-certificate-authority={{ openshift_master_ca_cert }}
{{ ('--images=' ~ oreg_url) if oreg_url is defined else '' }}
--listen=https://0.0.0.0:10250
+ --volume-dir={{ openshift_data_dir }}/openshift.local.volumes
args:
- chdir: "{{ openshift_cert_parent_dir }}"
- creates: "{{ openshift_cert_dir }}/node-{{ item.openshift.common.hostname }}"
+ chdir: "{{ openshift_generated_configs_dir }}"
+ creates: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}"
with_items: openshift_nodes
- name: Register unregistered nodes
diff --git a/roles/openshift_register_nodes/vars/main.yml b/roles/openshift_register_nodes/vars/main.yml
index bd497f08f..ebc0a0ef4 100644
--- a/roles/openshift_register_nodes/vars/main.yml
+++ b/roles/openshift_register_nodes/vars/main.yml
@@ -1,7 +1,8 @@
---
-openshift_cert_parent_dir: /var/lib/openshift
-openshift_cert_relative_dir: openshift.local.certificates
-openshift_cert_dir: "{{ openshift_cert_parent_dir }}/{{ openshift_cert_relative_dir }}"
-openshift_master_ca_dir: "{{ openshift_cert_dir }}/ca"
-openshift_master_ca_cert: "{{ openshift_master_ca_dir }}/cert.crt"
-openshift_master_ca_key: "{{ openshift_master_ca_dir }}/key.key"
+openshift_node_config_dir: /etc/openshift/node
+openshift_master_config_dir: /etc/openshift/master
+openshift_generated_configs_dir: /etc/openshift/generated-configs
+openshift_data_dir: /var/lib/openshift
+openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
+openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"
+openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt"