summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-03-23 16:30:49 -0400
committerJhon Honce <jhonce@redhat.com>2015-03-24 11:29:44 -0700
commitd67c5b8f79609d2d3b07cc009f58e3dc988782c5 (patch)
tree9daf6d897dbb60d680f6dd195464e5157eab6953 /roles/openshift_master
parent461f6c1e07f36238729944a5f769600077ebf0b0 (diff)
downloadopenshift-d67c5b8f79609d2d3b07cc009f58e3dc988782c5.tar.gz
openshift-d67c5b8f79609d2d3b07cc009f58e3dc988782c5.tar.bz2
openshift-d67c5b8f79609d2d3b07cc009f58e3dc988782c5.tar.xz
openshift-d67c5b8f79609d2d3b07cc009f58e3dc988782c5.zip
node registration changes
- Remove default value for openshift_hostname and make it required - Remove workarounds that are no longer needed - Remove resources parameter from openshift_register_node module - pre-create node certificates for each node before registering node - distribute created node certificates to each node - Move node registration logic to a new openshift_register_nodes role - This is because we now have to run the steps on a master as opposed to on the nodes like we were previously doing. - Rename openshift_register_node module to kubernetes_register_node, one more step to genericizing enough for upstreaming, however there are still plenty of openshift specific commands that still need to be genericized.
Diffstat (limited to 'roles/openshift_master')
-rw-r--r--roles/openshift_master/README.md2
-rw-r--r--roles/openshift_master/tasks/main.yml35
2 files changed, 6 insertions, 31 deletions
diff --git a/roles/openshift_master/README.md b/roles/openshift_master/README.md
index 5a1b889b2..2f03b4990 100644
--- a/roles/openshift_master/README.md
+++ b/roles/openshift_master/README.md
@@ -27,7 +27,7 @@ From openshift_common:
| openshift_debug_level | 0 | Global openshift debug log verbosity |
| openshift_hostname_workaround | True | |
| openshift_public_ip | UNDEF (Required) | Public IP address to use for this host |
-| openshift_hostname | openshift_public_ip if openshift_hostname_workaround else ansible_fqdn | hostname to use for this instance |
+| openshift_hostname | UNDEF (Required) | hostname to use for this instance |
Dependencies
------------
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index d5f4776dc..52f5f694c 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -1,4 +1,8 @@
---
+# TODO: allow for overriding default ports where possible
+# TODO: if setting up multiple masters, will need to predistribute the certs
+# to the additional masters before starting openshift-master
+
- name: Install OpenShift Master package
yum: pkg=openshift-master state=installed
@@ -6,9 +10,7 @@
lineinfile:
dest: /etc/sysconfig/openshift-master
regexp: '^OPTIONS='
- line: "OPTIONS=\"--public-master={{ openshift_hostname }} {% if
- openshift_node_ips %} --nodes={{ openshift_node_ips
- | join(',') }} {% endif %} --loglevel={{ openshift_master_debug_level }}\""
+ line: "OPTIONS=\"--public-master={{ openshift_hostname }} {% if openshift_node_ips %} --nodes={{ openshift_node_ips | join(',') }} {% endif %} --loglevel={{ openshift_master_debug_level }}\""
notify:
- restart openshift-master
@@ -34,42 +36,15 @@
option: externally_managed
value: "{{ openshift_master_manage_service_externally }}"
-# TODO: remove this when origin PR #1298 has landed in OSE
-- name: Workaround for openshift-master taking longer than 90 seconds to issue sdNotify signal
- command: cp /usr/lib/systemd/system/openshift-master.service /etc/systemd/system/
- args:
- creates: /etc/systemd/system/openshift-master.service
-- ini_file:
- dest: /etc/systemd/system/openshift-master.service
- option: TimeoutStartSec
- section: Service
- value: 300
- state: present
- register: result
-- command: systemctl daemon-reload
- when: result | changed
-# End of workaround pending PR #1298
-
- name: Start and enable openshift-master
service: name=openshift-master enabled=yes state=started
when: not openshift_master_manage_service_externally
register: result
-#TODO: remove this when origin PR #1204 has landed in OSE
-- name: need to pause here, otherwise we attempt to copy certificates generated by the master before they are generated
- pause: seconds=30
- when: result | changed
-# End of workaround pending PR #1204
-
- name: Disable openshift-master if openshift-master is managed externally
service: name=openshift-master enabled=false
when: openshift_master_manage_service_externally
-# TODO: create an os_vars role that has generic env related config and move
-# the root kubeconfig setting there, cannot use dependencies to force ordering
-# with openshift_node and openshift_master because the way conditional
-# dependencies work with current ansible would also exclude the
-# openshift_common dependency.
- name: Create .kube directory
file:
path: /root/.kube