From b57392ddd54bbff225ba83dd5a5bf40ea99344a4 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Thu, 30 Apr 2015 17:04:15 -0400 Subject: 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 --- roles/openshift_register_nodes/tasks/main.yml | 14 ++++++++++---- roles/openshift_register_nodes/vars/main.yml | 13 +++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'roles/openshift_register_nodes') 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" -- cgit v1.2.3