From 7d74d1913274cba4c4732cbc5f0a573cb99e5248 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 12 Feb 2015 11:26:56 -0700 Subject: - Rename minion to node - Update playbooks to support latest code --- roles/openshift_node/tasks/main.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 roles/openshift_node/tasks/main.yml (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml new file mode 100644 index 000000000..9da269888 --- /dev/null +++ b/roles/openshift_node/tasks/main.yml @@ -0,0 +1,38 @@ +--- +# tasks file for openshift_node +- name: Install OpenShift + yum: pkg=openshift-node state=installed + + # fixme: Once openshift stops resolving hostnames for node queries remove this... +- name: Set hostname to IP Addr (WORKAROUND) + command: /usr/bin/hostname {{ oo_bind_ip }} + +- name: Retrieve OpenShift Master credentials + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ /tmp/openshift + ignore_errors: yes + +- file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory + +- name: Store OpenShift Master credentials + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' /tmp/openshift/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin + ignore_errors: yes + +- name: Configure OpenShift Node settings + lineinfile: + dest: /etc/sysconfig/openshift-node + regexp: "{{ item.regex }}" + line: "{{ item.line }}" + with_items: + - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080 --loglevel=5\"' } + notify: + - restart openshift-node + +- 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 + +- name: Enable OpenShift + service: name=openshift-node enabled=yes state=started + -- cgit v1.2.3 From 90010f6db6294a99c56194afd89a0359a3d278dc Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 16 Feb 2015 17:57:08 -0700 Subject: Update code to reflect review comments --- roles/openshift_node/tasks/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 9da269888..73383da2c 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -1,4 +1,5 @@ --- + # tasks file for openshift_node - name: Install OpenShift yum: pkg=openshift-node state=installed @@ -8,13 +9,14 @@ command: /usr/bin/hostname {{ oo_bind_ip }} - name: Retrieve OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ /tmp/openshift + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ tmp_dir }} ignore_errors: yes - file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory +- file: path={{ tmp_dir }} state=directory - name: Store OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' /tmp/openshift/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ tmp_dir }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin ignore_errors: yes - name: Configure OpenShift Node settings @@ -36,3 +38,4 @@ - name: Enable OpenShift service: name=openshift-node enabled=yes state=started +- file: name={{ tmp_dir }} state=absent -- cgit v1.2.3 From 16ab19a24e6e2122f3f1b8f229b8bb20c88045cd Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 17 Feb 2015 10:07:09 -0700 Subject: * Use hostname module * Use mktemp for scratch directory --- roles/openshift_node/tasks/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 73383da2c..f1b2e9ac0 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -6,17 +6,20 @@ # fixme: Once openshift stops resolving hostnames for node queries remove this... - name: Set hostname to IP Addr (WORKAROUND) - command: /usr/bin/hostname {{ oo_bind_ip }} + hostname: name={{ oo_bind_ip }} + +- local_action: command /usr/bin/mktemp -d /tmp/openshift-ansible-XXXXXXX + register: mktemp - name: Retrieve OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ tmp_dir }} + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ mktemp.stdout }} ignore_errors: yes - file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory -- file: path={{ tmp_dir }} state=directory +- file: path={{ mktemp.stdout }} state=directory - name: Store OpenShift Master credentials - local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ tmp_dir }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ mktemp.stdout }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin ignore_errors: yes - name: Configure OpenShift Node settings @@ -38,4 +41,4 @@ - name: Enable OpenShift service: name=openshift-node enabled=yes state=started -- file: name={{ tmp_dir }} state=absent +- file: name={{ mktemp.stdout }} state=absent -- cgit v1.2.3 From aa6c548d4bae31526e22116967d730f6ecb528c0 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 17 Feb 2015 10:39:36 -0700 Subject: * CRUD temp directory on local machine --- roles/openshift_node/tasks/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index f1b2e9ac0..e0041a90c 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -16,7 +16,6 @@ ignore_errors: yes - file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory -- file: path={{ mktemp.stdout }} state=directory - name: Store OpenShift Master credentials local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ mktemp.stdout }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin @@ -41,4 +40,4 @@ - name: Enable OpenShift service: name=openshift-node enabled=yes state=started -- file: name={{ mktemp.stdout }} state=absent +- local_action: file name={{ mktemp.stdout }} state=absent -- cgit v1.2.3 From a1b6d03c256ff0065cb7a8772533a1b2c81410e1 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 19 Feb 2015 14:52:33 -0700 Subject: Fix SSL support between master and node(s) --- roles/openshift_node/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index e0041a90c..5d846fbe3 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -27,7 +27,7 @@ regexp: "{{ item.regex }}" line: "{{ item.line }}" with_items: - - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080 --loglevel=5\"' } + - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=https://{{ oo_master_ips[0] }}:8443 --loglevel=5\"' } notify: - restart openshift-node @@ -37,7 +37,8 @@ - name: Save firewalld port for OpenShift firewalld: port=10250/tcp permanent=true state=enabled + # Always bounce service to pick up new credentials - name: Enable OpenShift - service: name=openshift-node enabled=yes state=started + service: name=openshift-node enabled=yes state=restarted - local_action: file name={{ mktemp.stdout }} state=absent -- cgit v1.2.3 From dcd84a6c524c217432f4b529b66da165bf4ff3e9 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Fri, 20 Feb 2015 12:57:02 -0500 Subject: fix service definition for openshift-node --- roles/openshift_node/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 5d846fbe3..deff80a3d 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -39,6 +39,6 @@ # Always bounce service to pick up new credentials - name: Enable OpenShift - service: name=openshift-node enabled=yes state=restarted + service: name=openshift-node enabled=yes state=started - local_action: file name={{ mktemp.stdout }} state=absent -- cgit v1.2.3 From fd4d628907438ecb6372590d7ed67016b9e00de1 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 19 Feb 2015 14:52:33 -0700 Subject: Fix SSL support between master and node(s) --- roles/openshift_node/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roles/openshift_node/tasks/main.yml') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index deff80a3d..8a0694905 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -37,8 +37,9 @@ - name: Save firewalld port for OpenShift firewalld: port=10250/tcp permanent=true state=enabled + # fixme: Once the openshift_cluster playbook is published state should be started # Always bounce service to pick up new credentials - name: Enable OpenShift - service: name=openshift-node enabled=yes state=started + service: name=openshift-node enabled=yes state=restarted - local_action: file name={{ mktemp.stdout }} state=absent -- cgit v1.2.3