summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master
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_master
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_master')
-rw-r--r--roles/openshift_master/tasks/main.yml28
-rw-r--r--roles/openshift_master/vars/main.yml9
2 files changed, 20 insertions, 17 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index ac96e2b48..f243825b2 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -36,14 +36,9 @@
command: systemctl daemon-reload
when: install_result | changed
-- name: Create certificate parent directory if it doesn't exist
- file:
- path: "{{ openshift_cert_parent_dir }}"
- state: directory
-
- name: Create config parent directory if it doesn't exist
file:
- path: "{{ openshift_master_config | dirname }}"
+ path: "{{ openshift_master_config_dir }}"
state: directory
# TODO: should probably use a template lookup for this
@@ -59,25 +54,32 @@
oreg_url: "docker-registry.ops.rhcloud.com/openshift3_beta/ose-${component}:${version}"
when: openshift.common.deployment_type == 'online' and oreg_url is not defined
+# TODO: Need to get a flag added for volumes path, i think it'll get put in
- name: Create master config
command: >
- /usr/bin/openshift start master --write-config
- --config={{ openshift_master_config }}
+ /usr/bin/openshift start master
+ --write-config={{ openshift_master_config_dir }}
--portal-net={{ openshift.master.portal_net }}
+ --etcd-dir={{ openshift_data_dir }}/openshift.local.etcd
--master={{ openshift.master.api_url }}
--public-master={{ openshift.master.public_api_url }}
--listen={{ 'https' if openshift.master.api_use_ssl else 'http' }}://0.0.0.0:{{ openshift.master.api_port }}
{{ ('--images=' ~ oreg_url) if (oreg_url | default('', true) != '') else '' }}
{{ ('--nodes=' ~ openshift_node_ips | join(',')) if (openshift_node_ips | default('', true) != '') else '' }}
args:
- chdir: "{{ openshift_cert_parent_dir }}"
- creates: "{{ openshift_master_config }}"
+ chdir: "{{ openshift_master_config_dir }}"
+ creates: "{{ openshift_master_config_file }}"
- name: Configure OpenShift settings
lineinfile:
dest: /etc/sysconfig/openshift-master
- regexp: '^OPTIONS='
- line: "OPTIONS=\"--config={{ openshift_master_config }} --loglevel={{ openshift.master.debug_level }}\""
+ regexp: "{{ item.regex }}"
+ line: "{{ item.line }}"
+ with_items:
+ - regex: '^OPTIONS='
+ line: "OPTIONS=--loglevel={{ openshift.master.debug_level }}"
+ - regex: '^CONFIG_FILE='
+ line: "CONFIG_FILE={{ openshift_master_config_file}}"
notify:
- restart openshift-master
@@ -98,7 +100,7 @@
# TODO: Update this file if the contents of the source file are not present in
# the dest file, will need to make sure to ignore things that could be added
- name: Create the OpenShift client config(s)
- command: cp {{ openshift_cert_dir }}/openshift-client/.kubeconfig ~{{ item }}/.config/openshift/.config
+ command: cp {{ openshift_master_config_dir }}/openshift-client.kubeconfig ~{{ item }}/.config/openshift/.config
args:
creates: ~{{ item }}/.config/openshift/.config
with_items:
diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml
index c52d957ac..0739e2b44 100644
--- a/roles/openshift_master/vars/main.yml
+++ b/roles/openshift_master/vars/main.yml
@@ -1,5 +1,6 @@
---
-openshift_master_config: /etc/openshift/master.yaml
-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_data_dir: /var/lib/openshift
+openshift_master_config_dir: /etc/openshift/master
+openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
+openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
+openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"