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/README.md | 41 ++++++++++++++++++++++++++++++++ roles/openshift_router/handlers/main.yml | 0 roles/openshift_router/meta/main.yml | 13 ++++++++++ roles/openshift_router/tasks/main.yml | 8 +++++++ roles/openshift_router/vars/main.yml | 2 ++ 5 files changed, 64 insertions(+) create mode 100644 roles/openshift_router/README.md create mode 100644 roles/openshift_router/handlers/main.yml create mode 100644 roles/openshift_router/meta/main.yml create mode 100644 roles/openshift_router/tasks/main.yml create mode 100644 roles/openshift_router/vars/main.yml (limited to 'roles/openshift_router') diff --git a/roles/openshift_router/README.md b/roles/openshift_router/README.md new file mode 100644 index 000000000..6d8ee25c6 --- /dev/null +++ b/roles/openshift_router/README.md @@ -0,0 +1,41 @@ +OpenShift Container Router +========================== + +OpenShift Router service installation + +Requirements +------------ + +Running OpenShift cluster + +Role Variables +-------------- + +From this role: +| Name | Default value | | +|--------------------|-------------------------------------------------------|---------------------| +| | | | + +From openshift_common: +| Name | Default value | | +|-----------------------|---------------|--------------------------------------| +| openshift_debug_level | 0 | Global openshift debug log verbosity | + +Dependencies +------------ + +Example Playbook +---------------- + +TODO + +License +------- + +Apache License, Version 2.0 + +Author Information +------------------ + +Red Hat openshift@redhat.com + diff --git a/roles/openshift_router/handlers/main.yml b/roles/openshift_router/handlers/main.yml new file mode 100644 index 000000000..e69de29bb diff --git a/roles/openshift_router/meta/main.yml b/roles/openshift_router/meta/main.yml new file mode 100644 index 000000000..0471e5e14 --- /dev/null +++ b/roles/openshift_router/meta/main.yml @@ -0,0 +1,13 @@ +--- +galaxy_info: + author: OpenShift Red Hat + description: OpenShift Embedded Router + company: Red Hat, Inc. + license: Apache License, Version 2.0 + min_ansible_version: 1.7 + platforms: + - name: EL + versions: + - 7 + categories: + - cloud 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" diff --git a/roles/openshift_router/vars/main.yml b/roles/openshift_router/vars/main.yml new file mode 100644 index 000000000..cd21505a4 --- /dev/null +++ b/roles/openshift_router/vars/main.yml @@ -0,0 +1,2 @@ +--- + -- 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') 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') 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 ++++- roles/openshift_router/vars/main.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'roles/openshift_router') 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" diff --git a/roles/openshift_router/vars/main.yml b/roles/openshift_router/vars/main.yml index cd21505a4..9fb501e85 100644 --- a/roles/openshift_router/vars/main.yml +++ b/roles/openshift_router/vars/main.yml @@ -1,2 +1,3 @@ --- +openshift_master_config_dir: /etc/openshift/master -- cgit v1.2.3