summaryrefslogtreecommitdiffstats
path: root/roles/openshift_minion/tasks
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2014-10-06 08:24:16 -0700
committerJhon Honce <jhonce@redhat.com>2014-10-06 08:24:16 -0700
commitdb6d94e538cd373e92c83a887039ffa54a2ab75a (patch)
tree1598f9150edac15c791f2d93dff7d979fa24bc4f /roles/openshift_minion/tasks
parentc54830c66efe0656442be312bf0dbbbdc0f58940 (diff)
parentb00727520bc903efc02ece721c3500e599f18b75 (diff)
downloadopenshift-db6d94e538cd373e92c83a887039ffa54a2ab75a.tar.gz
openshift-db6d94e538cd373e92c83a887039ffa54a2ab75a.tar.bz2
openshift-db6d94e538cd373e92c83a887039ffa54a2ab75a.tar.xz
openshift-db6d94e538cd373e92c83a887039ffa54a2ab75a.zip
Merge pull request #9 from jwhonce/wip/registry
WIP Infra - Deploy GCE openshift v3 cluster
Diffstat (limited to 'roles/openshift_minion/tasks')
-rw-r--r--roles/openshift_minion/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/openshift_minion/tasks/main.yml b/roles/openshift_minion/tasks/main.yml
new file mode 100644
index 000000000..2b1f5332e
--- /dev/null
+++ b/roles/openshift_minion/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+# tasks file for openshift_minion
+- name: Install OpenShift
+ yum: pkg=origin state=installed
+
+- name: Configure OpenShift settings
+ lineinfile: >
+ dest=/etc/sysconfig/openshift
+ regexp={{ item.regex }}
+ line="{{ item.line }}"
+ with_items:
+ - { regex: '^OPENSHIFT_MASTER', line: 'OPENSHIFT_MASTER=\"{{ oo_master_ips[0] }}\"' }
+ - { regex: '^OPENSHIFT_BIND_ADDR', line: 'OPENSHIFT_BIND_ADDR=\"{{ oo_bind_ip }}\"'}
+ notify:
+ - restart openshift-minion
+
+- name: Open firewalld port for OpenShift
+ firewalld: port=10250/tcp permanent=false state=enabled
+
+- name: Save firewalld port for OpenShift
+ firewalld: port=10250/tcp permanent=true state=enabled
+
+ # POST ${master_ip}:8080/api/v1beta1/minions kind=Minion id=${node_ip} apiVersion=v1beta1 hostIP=${node_ip} >/dev/null
+
+- name: Enable OpenShift
+ service: name=openshift enabled=yes state=started
+
+- name: Register with OpenShift master
+ command: "curl -X POST -H 'Accept: application/json' -d '{\"kind\":\"Minion\", \"id\":\"{{ oo_bind_ip }}\", \"apiVersion\":\"v1beta1\", \"hostIP\":\"{{ oo_bind_ip }}\" }' http://{{ oo_master_ips[0] }}:8080/api/v1beta1/minions"
+ when: oo_master_ips[0] != ''