From 1b4526d677651cb3677cbf7cc687a76fcba47c9a Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 27 Apr 2015 15:04:57 -0700 Subject: [WIP] Infrastructure - Deploy services in cluster * Create OpenShift Docker Registry * Create OpenShift router --- roles/openshift_router/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 roles/openshift_router/tasks/main.yml (limited to 'roles/openshift_router/tasks') diff --git a/roles/openshift_router/tasks/main.yml b/roles/openshift_router/tasks/main.yml new file mode 100644 index 000000000..56dbcc414 --- /dev/null +++ b/roles/openshift_router/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- set_fact: _option_images="--images={{ openshift_registry_url|quote }}" + when: openshift_registry_url is defined + +- name: Deploy OpenShift Router + command: openshift ex router --create --credentials="{{ansible_env['HOME']}}"/.config/openshift/config {{ _option_images|default() }} + register: _openshift_router__results + changed_when: "'service exists' not in _openshift_router__results.stdout" -- cgit v1.2.3 From 3e533e199aa9262f5ca45f8311e82e975cde73b9 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 1 May 2015 13:57:30 -0700 Subject: * Deploy services from common playbook --- roles/openshift_router/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_router/tasks') diff --git a/roles/openshift_router/tasks/main.yml b/roles/openshift_router/tasks/main.yml index 56dbcc414..ae52063cb 100644 --- a/roles/openshift_router/tasks/main.yml +++ b/roles/openshift_router/tasks/main.yml @@ -3,6 +3,6 @@ when: openshift_registry_url is defined - name: Deploy OpenShift Router - command: openshift ex router --create --credentials="{{ansible_env['HOME']}}"/.config/openshift/config {{ _option_images|default() }} + command: openshift ex router --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-router/.kubeconfig {{ _option_images|default() }} register: _openshift_router__results changed_when: "'service exists' not in _openshift_router__results.stdout" -- cgit v1.2.3 From 28c279382f0b5d7570e10a8c56ffffbb6666ed2d Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 1 Jun 2015 15:49:06 -0700 Subject: * rename openshift_registry_url oreg_url * rename option_images to _{oreg|ortr}_images --- roles/openshift_router/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'roles/openshift_router/tasks') diff --git a/roles/openshift_router/tasks/main.yml b/roles/openshift_router/tasks/main.yml index ae52063cb..f1ee99dd3 100644 --- a/roles/openshift_router/tasks/main.yml +++ b/roles/openshift_router/tasks/main.yml @@ -1,8 +1,8 @@ --- -- set_fact: _option_images="--images={{ openshift_registry_url|quote }}" - when: openshift_registry_url is defined +- set_fact: _ortr_images="--images={{ oreg_url|quote }}" + when: oreg_url is defined - name: Deploy OpenShift Router - command: openshift ex router --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-router/.kubeconfig {{ _option_images|default() }} - register: _openshift_router__results - changed_when: "'service exists' not in _openshift_router__results.stdout" + command: openshift ex router --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-router/.kubeconfig {{ _ortr_images|default() }} + register: _ortr_results + changed_when: "'service exists' not in _ortr_results.stdout" -- cgit v1.2.3 From 8d06801770850fd46bf400593d5e47a1fa36b23e Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 10 Jun 2015 11:49:16 -0700 Subject: * Refactor to use openshift_master_config_dir when deploying services --- roles/openshift_router/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'roles/openshift_router/tasks') diff --git a/roles/openshift_router/tasks/main.yml b/roles/openshift_router/tasks/main.yml index f1ee99dd3..929177262 100644 --- a/roles/openshift_router/tasks/main.yml +++ b/roles/openshift_router/tasks/main.yml @@ -3,6 +3,9 @@ when: oreg_url is defined - name: Deploy OpenShift Router - command: openshift ex router --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-router/.kubeconfig {{ _ortr_images|default() }} + command: > + {{ openshift.common.admin_binary }} router + --create + --credentials={{ openshift_master_config_dir }}/openshift-router.kubeconfig {{ _ortr_images|default() }} register: _ortr_results changed_when: "'service exists' not in _ortr_results.stdout" -- cgit v1.2.3