summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorThomas Wiest <twiest@gmail.com>2014-10-24 10:47:33 -0400
committerThomas Wiest <twiest@gmail.com>2014-10-24 10:47:33 -0400
commit76f40b0774056ade74bd1f79a51c0deb187d628d (patch)
tree58978179e6d89d5662f4b2fbe863f48297864d88 /roles
parente7fc0e8536bc31fc52875274dd62fb2d978aa409 (diff)
parent0ac261c806c49e0987ca73261075518af27f5453 (diff)
downloadopenshift-76f40b0774056ade74bd1f79a51c0deb187d628d.tar.gz
openshift-76f40b0774056ade74bd1f79a51c0deb187d628d.tar.bz2
openshift-76f40b0774056ade74bd1f79a51c0deb187d628d.tar.xz
openshift-76f40b0774056ade74bd1f79a51c0deb187d628d.zip
Merge pull request #14 from jwhonce/wip/latest
Support latest origin v3 CLI options
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_master/tasks/main.yml9
-rw-r--r--roles/openshift_minion/tasks/main.yml14
2 files changed, 12 insertions, 11 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 83573cb27..4757dc9e7 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -3,14 +3,17 @@
- name: Install Origin
yum: pkg=origin state=installed
-- name: Configure Origin settings
+- name: Set hostname to IP Addr
+ command: /usr/bin/hostname {{ oo_bind_ip }}
+
+- name: Configure OpenShift Master settings
lineinfile: >
dest=/etc/sysconfig/openshift
regexp={{ item.regex }}
line="{{ item.line }}"
with_items:
- - { regex: '^OPENSHIFT_MASTER', line: 'OPENSHIFT_MASTER=\"{{ oo_bind_ip }}\"' }
- - { regex: '^OPENSHIFT_BIND_ADDR', line: 'OPENSHIFT_BIND_ADDR=\"{{ oo_bind_ip }}\"'}
+ - { regex: '^ROLE=', line: 'ROLE=\"master\"' }
+ - { regex: '^OPTIONS=', line: 'OPTIONS=\"--nodes={{ oo_minion_ips | join(",") }} --loglevel=5\"' }
notify:
- restart openshift-master
diff --git a/roles/openshift_minion/tasks/main.yml b/roles/openshift_minion/tasks/main.yml
index 2b1f5332e..7a79b4ee9 100644
--- a/roles/openshift_minion/tasks/main.yml
+++ b/roles/openshift_minion/tasks/main.yml
@@ -3,14 +3,17 @@
- name: Install OpenShift
yum: pkg=origin state=installed
-- name: Configure OpenShift settings
+- name: Set hostname to IP Addr
+ command: /usr/bin/hostname {{ oo_bind_ip }}
+
+- name: Configure OpenShift Minion 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 }}\"'}
+ - { regex: '^ROLE=', line: 'ROLE=\"node\"' }
+ - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080 --loglevel=5\"' }
notify:
- restart openshift-minion
@@ -20,11 +23,6 @@
- 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] != ''