summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorWesley Hearn <wesley.s.hearn@gmail.com>2015-08-28 14:00:23 -0400
committerWesley Hearn <wesley.s.hearn@gmail.com>2015-08-28 14:00:23 -0400
commit8dd04af47c574a0e4c98f5cab55283be04fa1683 (patch)
tree7fa25006f802a36feb8db5af2a2f7b60abba42ca /roles
parent68223f205b6c4e6ea124ccc982cd9bbcba63ced6 (diff)
parent1b3fff6248fbd6788a26ee2b6c60f7731891c0f4 (diff)
downloadopenshift-8dd04af47c574a0e4c98f5cab55283be04fa1683.tar.gz
openshift-8dd04af47c574a0e4c98f5cab55283be04fa1683.tar.bz2
openshift-8dd04af47c574a0e4c98f5cab55283be04fa1683.tar.xz
openshift-8dd04af47c574a0e4c98f5cab55283be04fa1683.zip
Merge pull request #512 from sdodson/next
Merge in Atomic Enterprise work into master
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_common/tasks/main.yml2
-rw-r--r--roles/openshift_common/vars/main.yml2
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py80
-rw-r--r--roles/openshift_facts/tasks/main.yml2
-rw-r--r--roles/openshift_master/README.md10
-rw-r--r--roles/openshift_master/defaults/main.yml10
-rw-r--r--roles/openshift_master/handlers/main.yml4
-rw-r--r--roles/openshift_master/meta/main.yml2
-rw-r--r--roles/openshift_master/tasks/main.yml55
-rw-r--r--roles/openshift_master/vars/main.yml2
-rw-r--r--roles/openshift_master_ca/tasks/main.yml4
-rw-r--r--roles/openshift_master_ca/vars/main.yml2
-rw-r--r--roles/openshift_master_certificates/vars/main.yml4
-rw-r--r--roles/openshift_master_cluster/tasks/configure.yml8
-rw-r--r--roles/openshift_master_cluster/tasks/configure_deferred.yml4
-rw-r--r--roles/openshift_node/README.md16
-rw-r--r--roles/openshift_node/defaults/main.yml2
-rw-r--r--roles/openshift_node/handlers/main.yml4
-rw-r--r--roles/openshift_node/tasks/main.yml34
-rw-r--r--roles/openshift_node/vars/main.yml2
-rw-r--r--roles/openshift_node_certificates/README.md4
-rw-r--r--roles/openshift_node_certificates/vars/main.yml6
-rw-r--r--roles/openshift_registry/vars/main.yml3
-rw-r--r--roles/openshift_repos/vars/main.yml7
-rw-r--r--roles/openshift_router/vars/main.yml3
-rw-r--r--roles/openshift_storage_nfs_lvm/tasks/main.yml2
26 files changed, 159 insertions, 115 deletions
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index d9f2dafab..73bd28630 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -1,5 +1,5 @@
---
-- name: Set common OpenShift facts
+- name: Set common Cluster facts
openshift_facts:
role: common
local_facts:
diff --git a/roles/openshift_common/vars/main.yml b/roles/openshift_common/vars/main.yml
index 8e7d71154..817fe0a5f 100644
--- a/roles/openshift_common/vars/main.yml
+++ b/roles/openshift_common/vars/main.yml
@@ -6,4 +6,4 @@
# interfaces)
os_firewall_use_firewalld: False
-openshift_data_dir: /var/lib/openshift
+openshift_data_dir: /var/lib/origin
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index c13e96c2b..334929c74 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -6,7 +6,7 @@
DOCUMENTATION = '''
---
module: openshift_facts
-short_description: OpenShift Facts
+short_description: Cluster Facts
author: Jason DeTiberus
requirements: [ ]
'''
@@ -283,28 +283,6 @@ def normalize_provider_facts(provider, metadata):
facts = normalize_openstack_facts(metadata, facts)
return facts
-def set_registry_url_if_unset(facts):
- """ Set registry_url fact if not already present in facts dict
-
- Args:
- facts (dict): existing facts
- Returns:
- dict: the facts dict updated with the generated identity providers
- facts if they were not already present
- """
- for role in ('master', 'node'):
- if role in facts:
- deployment_type = facts['common']['deployment_type']
- if 'registry_url' not in facts[role]:
- registry_url = "openshift/origin-${component}:${version}"
- if deployment_type == 'enterprise':
- registry_url = "openshift3/ose-${component}:${version}"
- elif deployment_type == 'online':
- registry_url = ("openshift3/ose-${component}:${version}")
- facts[role]['registry_url'] = registry_url
-
- return facts
-
def set_fluentd_facts_if_unset(facts):
""" Set fluentd facts if not already present in facts dict
dict: the facts dict updated with the generated fluentd facts if
@@ -447,6 +425,48 @@ def set_aggregate_facts(facts):
return facts
+def set_deployment_facts_if_unset(facts):
+ """ Set Facts that vary based on deployment_type. This currently
+ includes common.service_type, common.config_base, master.registry_url,
+ node.registry_url
+
+ Args:
+ facts (dict): existing facts
+ Returns:
+ dict: the facts dict updated with the generated deployment_type
+ facts
+ """
+ if 'common' in facts:
+ deployment_type = facts['common']['deployment_type']
+ if 'service_type' not in facts['common']:
+ service_type = 'atomic-openshift'
+ if deployment_type == 'origin':
+ service_type = 'openshift'
+ elif deployment_type in ['enterprise', 'online']:
+ service_type = 'openshift'
+ facts['common']['service_type'] = service_type
+ if 'config_base' not in facts['common']:
+ config_base = '/etc/origin'
+ if deployment_type in ['enterprise', 'online']:
+ config_base = '/etc/openshift'
+ elif deployment_type == 'origin':
+ config_base = '/etc/openshift'
+ facts['common']['config_base'] = config_base
+
+ for role in ('master', 'node'):
+ if role in facts:
+ deployment_type = facts['common']['deployment_type']
+ if 'registry_url' not in facts[role]:
+ registry_url = 'aos3/aos-${component}:${version}'
+ if deployment_type in ['enterprise', 'online']:
+ registry_url = 'openshift3/ose-${component}:${version}'
+ elif deployment_type == 'origin':
+ registry_url = 'openshift/origin-${component}:${version}'
+ facts[role]['registry_url'] = registry_url
+
+ return facts
+
+
def set_sdn_facts_if_unset(facts):
""" Set sdn facts if not already present in facts dict
@@ -509,7 +529,7 @@ def get_current_config(facts):
# anything from working properly as far as I can tell, perhaps because
# we override the kubeconfig path everywhere we use it?
# Query kubeconfig settings
- kubeconfig_dir = '/var/lib/openshift/openshift.local.certificates'
+ kubeconfig_dir = '/var/lib/origin/openshift.local.certificates'
if role == 'node':
kubeconfig_dir = os.path.join(
kubeconfig_dir, "node-%s" % facts['common']['hostname']
@@ -656,25 +676,25 @@ def get_local_facts_from_file(filename):
class OpenShiftFactsUnsupportedRoleError(Exception):
- """OpenShift Facts Unsupported Role Error"""
+ """Origin Facts Unsupported Role Error"""
pass
class OpenShiftFactsFileWriteError(Exception):
- """OpenShift Facts File Write Error"""
+ """Origin Facts File Write Error"""
pass
class OpenShiftFactsMetadataUnavailableError(Exception):
- """OpenShift Facts Metadata Unavailable Error"""
+ """Origin Facts Metadata Unavailable Error"""
pass
class OpenShiftFacts(object):
- """ OpenShift Facts
+ """ Origin Facts
Attributes:
- facts (dict): OpenShift facts for the host
+ facts (dict): facts for the host
Args:
role (str): role for setting local facts
@@ -719,8 +739,8 @@ class OpenShiftFacts(object):
facts = set_fluentd_facts_if_unset(facts)
facts = set_metrics_facts_if_unset(facts)
facts = set_identity_providers_if_unset(facts)
- facts = set_registry_url_if_unset(facts)
facts = set_sdn_facts_if_unset(facts)
+ facts = set_deployment_facts_if_unset(facts)
facts = set_aggregate_facts(facts)
return dict(openshift=facts)
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index b2cda3a85..fd3d20800 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -6,5 +6,5 @@
- ansible_version | version_compare('1.9.0', 'ne')
- ansible_version | version_compare('1.9.0.1', 'ne')
-- name: Gather OpenShift facts
+- name: Gather Cluster facts
openshift_facts:
diff --git a/roles/openshift_master/README.md b/roles/openshift_master/README.md
index 0e7ef3aab..155bdb58b 100644
--- a/roles/openshift_master/README.md
+++ b/roles/openshift_master/README.md
@@ -1,7 +1,7 @@
-OpenShift Master
-================
+OpenShift/Atomic Enterprise Master
+==================================
-OpenShift Master service installation
+Master service installation
Requirements
------------
@@ -15,8 +15,8 @@ Role Variables
From this role:
| Name | Default value | |
|-------------------------------------|-----------------------|--------------------------------------------------|
-| openshift_master_debug_level | openshift_debug_level | Verbosity of the debug logs for openshift-master |
-| openshift_node_ips | [] | List of the openshift node ip addresses to pre-register when openshift-master starts up |
+| openshift_master_debug_level | openshift_debug_level | Verbosity of the debug logs for master |
+| openshift_node_ips | [] | List of the openshift node ip addresses to pre-register when master starts up |
| oreg_url | UNDEF | Default docker registry to use |
| openshift_master_api_port | UNDEF | |
| openshift_master_console_port | UNDEF | |
diff --git a/roles/openshift_master/defaults/main.yml b/roles/openshift_master/defaults/main.yml
index ca8860099..9766d01ae 100644
--- a/roles/openshift_master/defaults/main.yml
+++ b/roles/openshift_master/defaults/main.yml
@@ -5,11 +5,11 @@ openshift_node_ips: []
os_firewall_allow:
- service: etcd embedded
port: 4001/tcp
-- service: OpenShift api https
+- service: api server https
port: 8443/tcp
-- service: OpenShift dns tcp
+- service: dns tcp
port: 53/tcp
-- service: OpenShift dns udp
+- service: dns udp
port: 53/udp
- service: Fluentd td-agent tcp
port: 24224/tcp
@@ -22,9 +22,9 @@ os_firewall_allow:
- service: Corosync UDP
port: 5405/udp
os_firewall_deny:
-- service: OpenShift api http
+- service: api server http
port: 8080/tcp
-- service: former OpenShift web console port
+- service: former web console port
port: 8444/tcp
- service: former etcd peer port
port: 7001/tcp
diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml
index f1e7e1ab3..2981979e0 100644
--- a/roles/openshift_master/handlers/main.yml
+++ b/roles/openshift_master/handlers/main.yml
@@ -1,4 +1,4 @@
---
-- name: restart openshift-master
- service: name=openshift-master state=restarted
+- name: restart master
+ service: name={{ openshift.common.service_type }}-master state=restarted
when: not openshift_master_ha | bool
diff --git a/roles/openshift_master/meta/main.yml b/roles/openshift_master/meta/main.yml
index 41a183c3b..c125cb5d0 100644
--- a/roles/openshift_master/meta/main.yml
+++ b/roles/openshift_master/meta/main.yml
@@ -1,7 +1,7 @@
---
galaxy_info:
author: Jhon Honce
- description: OpenShift Master
+ description: Master
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.7
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 9204d25ce..4dad9b62f 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -12,11 +12,7 @@
msg: "openshift_master_cluster_password must be set for multi-master installations"
when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool and openshift_master_cluster_password is not defined
-- name: Install OpenShift Master package
- yum: pkg=openshift-master state=present
- register: install_result
-
-- name: Set master OpenShift facts
+- name: Set master facts
openshift_facts:
role: master
local_facts:
@@ -59,8 +55,26 @@
api_server_args: "{{ osm_api_server_args | default(None) }}"
controller_args: "{{ osm_controller_args | default(None) }}"
+- name: Install Master package
+ yum: pkg={{ openshift.common.service_type }}-master state=present
+ register: install_result
+
+- name: Check for RPM generated config marker file /etc/origin/.config_managed
+ stat: path=/etc/origin/.rpmgenerated
+ register: rpmgenerated_config
+
+- name: Remove RPM generated config files
+ file:
+ path: "{{ item }}"
+ state: absent
+ when: openshift.common.service_type in ['atomic-enterprise','openshift-enterprise'] and rpmgenerated_config.stat.exists == true
+ with_items:
+ - "{{ openshift.common.config_base }}/master"
+ - "{{ openshift.common.config_base }}/node"
+ - "{{ openshift.common.config_base }}/.rpmgenerated"
+
# TODO: These values need to be configurable
-- name: Set dns OpenShift facts
+- name: Set dns facts
openshift_facts:
role: dns
local_facts:
@@ -80,20 +94,27 @@
args:
creates: "{{ openshift_master_policy }}"
notify:
- - restart openshift-master
+ - restart master
- name: Create the scheduler config
template:
dest: "{{ openshift_master_scheduler_conf }}"
src: scheduler.json.j2
notify:
- - restart openshift-master
+ - restart master
- name: Install httpd-tools if needed
yum: pkg=httpd-tools state=present
when: item.kind == 'HTPasswdPasswordIdentityProvider'
with_items: openshift.master.identity_providers
+- name: Ensure htpasswd directory exists
+ file:
+ path: "{{ item.filename | dirname }}"
+ state: directory
+ when: item.kind == 'HTPasswdPasswordIdentityProvider'
+ with_items: openshift.master.identity_providers
+
- name: Create the htpasswd file if needed
copy:
dest: "{{ item.filename }}"
@@ -109,11 +130,11 @@
dest: "{{ openshift_master_config_file }}"
src: master.yaml.v1.j2
notify:
- - restart openshift-master
+ - restart master
-- name: Configure OpenShift settings
+- name: Configure master settings
lineinfile:
- dest: /etc/sysconfig/openshift-master
+ dest: /etc/sysconfig/{{ openshift.common.service_type }}-master
regexp: "{{ item.regex }}"
line: "{{ item.line }}"
with_items:
@@ -122,10 +143,10 @@
- regex: '^CONFIG_FILE='
line: "CONFIG_FILE={{ openshift_master_config_file }}"
notify:
- - restart openshift-master
+ - restart master
-- name: Start and enable openshift-master
- service: name=openshift-master enabled=yes state=started
+- name: Start and enable master
+ service: name={{ openshift.common.service_type }}-master enabled=yes state=started
when: not openshift_master_ha | bool
register: start_result
@@ -146,7 +167,7 @@
shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster
when: install_result | changed
-- name: Create the OpenShift client config dir(s)
+- name: Create the client config dir(s)
file:
path: "~{{ item }}/.kube"
state: directory
@@ -159,7 +180,7 @@
# TODO: Update this file if the contents of the source file are not present in
# the dest file, will need to make sure to ignore things that could be added
-- name: Copy the OpenShift admin client config(s)
+- name: Copy the admin client config(s)
command: cp {{ openshift_master_config_dir }}/admin.kubeconfig ~{{ item }}/.kube/config
args:
creates: ~{{ item }}/.kube/config
@@ -167,7 +188,7 @@
- root
- "{{ ansible_ssh_user }}"
-- name: Update the permissions on the OpenShift admin client config(s)
+- name: Update the permissions on the admin client config(s)
file:
path: "~{{ item }}/.kube/config"
state: file
diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml
index f6f69966a..a61ba0397 100644
--- a/roles/openshift_master/vars/main.yml
+++ b/roles/openshift_master/vars/main.yml
@@ -1,5 +1,5 @@
---
-openshift_master_config_dir: /etc/openshift/master
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json"
openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json"
diff --git a/roles/openshift_master_ca/tasks/main.yml b/roles/openshift_master_ca/tasks/main.yml
index 03eb7e15f..303dc9c5d 100644
--- a/roles/openshift_master_ca/tasks/main.yml
+++ b/roles/openshift_master_ca/tasks/main.yml
@@ -1,6 +1,6 @@
---
-- name: Install the OpenShift package for admin tooling
- yum: pkg=openshift state=present
+- name: Install the base package for admin tooling
+ yum: pkg={{ openshift.common.service_type }} state=present
register: install_result
- name: Reload generated facts
diff --git a/roles/openshift_master_ca/vars/main.yml b/roles/openshift_master_ca/vars/main.yml
index 2925680bb..1f6af808c 100644
--- a/roles/openshift_master_ca/vars/main.yml
+++ b/roles/openshift_master_ca/vars/main.yml
@@ -1,5 +1,5 @@
---
-openshift_master_config_dir: /etc/openshift/master
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"
openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt"
diff --git a/roles/openshift_master_certificates/vars/main.yml b/roles/openshift_master_certificates/vars/main.yml
index 6214f7918..3f18ddc79 100644
--- a/roles/openshift_master_certificates/vars/main.yml
+++ b/roles/openshift_master_certificates/vars/main.yml
@@ -1,3 +1,3 @@
---
-openshift_generated_configs_dir: /etc/openshift/generated-configs
-openshift_master_config_dir: /etc/openshift/master
+openshift_generated_configs_dir: "{{ openshift.common.config_base }}/generated-configs"
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
diff --git a/roles/openshift_master_cluster/tasks/configure.yml b/roles/openshift_master_cluster/tasks/configure.yml
index 8ddc8bfda..7ab9afb51 100644
--- a/roles/openshift_master_cluster/tasks/configure.yml
+++ b/roles/openshift_master_cluster/tasks/configure.yml
@@ -22,14 +22,14 @@
command: pcs resource defaults resource-stickiness=100
- name: Add the cluster VIP resource
- command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_vip }} --group openshift-master
+ command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_vip }} --group {{ openshift.common.service_type }}-master
- name: Add the cluster public VIP resource
- command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_public_vip }} --group openshift-master
+ command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_public_vip }} --group {{ openshift.common.service_type }}-master
when: openshift_master_cluster_public_vip != openshift_master_cluster_vip
-- name: Add the cluster openshift-master service resource
- command: pcs resource create master systemd:openshift-master op start timeout=90s stop timeout=90s --group openshift-master
+- name: Add the cluster master service resource
+ command: pcs resource create master systemd:{{ openshift.common.service_type }}-master op start timeout=90s stop timeout=90s --group {{ openshift.common.service_type }}-master
- name: Disable stonith
command: pcs property set stonith-enabled=false
diff --git a/roles/openshift_master_cluster/tasks/configure_deferred.yml b/roles/openshift_master_cluster/tasks/configure_deferred.yml
index a80b6c5b4..3b416005b 100644
--- a/roles/openshift_master_cluster/tasks/configure_deferred.yml
+++ b/roles/openshift_master_cluster/tasks/configure_deferred.yml
@@ -1,8 +1,8 @@
---
- debug: msg="Deferring config"
-- name: Start and enable openshift-master
+- name: Start and enable the master
service:
- name: openshift-master
+ name: "{{ openshift.common.service_type }}-master"
state: started
enabled: yes
diff --git a/roles/openshift_node/README.md b/roles/openshift_node/README.md
index 427269931..3aff81274 100644
--- a/roles/openshift_node/README.md
+++ b/roles/openshift_node/README.md
@@ -1,12 +1,12 @@
-OpenShift Node
-==============
+OpenShift/Atomic Enterprise Node
+================================
-OpenShift Node service installation
+Node service installation
Requirements
------------
-One or more OpenShift Master servers.
+One or more Master servers.
A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms,
rhel-7-server-extras-rpms, and rhel-7-server-ose-3.0-rpms repos.
@@ -14,10 +14,10 @@ rhel-7-server-extras-rpms, and rhel-7-server-ose-3.0-rpms repos.
Role Variables
--------------
From this role:
-| Name | Default value | |
-|------------------------------------------|-----------------------|----------------------------------------|
-| openshift_node_debug_level | openshift_debug_level | Verbosity of the debug logs for openshift-node |
-| oreg_url | UNDEF (Optional) | Default docker registry to use |
+| Name | Default value | |
+|------------------------------------------|-----------------------|--------------------------------------------------------|
+| openshift_node_debug_level | openshift_debug_level | Verbosity of the debug logs for node |
+| oreg_url | UNDEF (Optional) | Default docker registry to use |
From openshift_common:
| Name | Default Value | |
diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml
index 1dbcc4301..c4abf9d7c 100644
--- a/roles/openshift_node/defaults/main.yml
+++ b/roles/openshift_node/defaults/main.yml
@@ -1,6 +1,6 @@
---
os_firewall_allow:
-- service: OpenShift kubelet
+- service: Kubernetes kubelet
port: 10250/tcp
- service: http
port: 80/tcp
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index 8b5acefbf..633f3ed13 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -1,6 +1,6 @@
---
-- name: restart openshift-node
- service: name=openshift-node state=restarted
+- name: restart node
+ service: name={{ openshift.common.service_type }}-node state=restarted
- name: restart docker
service: name=docker state=restarted
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 7679adbf3..db1731d65 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -10,16 +10,7 @@
msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
when: (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online']
-- name: Install OpenShift Node package
- yum: pkg=openshift-node state=present
- register: node_install_result
-
-- name: Install openshift-sdn-ovs
- yum: pkg=openshift-sdn-ovs state=present
- register: sdn_install_result
- when: openshift.common.use_openshift_sdn
-
-- name: Set node OpenShift facts
+- name: Set node facts
openshift_facts:
role: "{{ item.role }}"
local_facts: "{{ item.local_facts }}"
@@ -38,17 +29,26 @@
portal_net: "{{ openshift_master_portal_net | default(None) }}"
kubelet_args: "{{ openshift_node_kubelet_args | default(None) }}"
+- name: Install Node package
+ yum: pkg={{ openshift.common.service_type }}-node state=present
+ register: node_install_result
+
+- name: Install sdn-ovs package
+ yum: pkg={{ openshift.common.service_type }}-sdn-ovs state=present
+ register: sdn_install_result
+ when: openshift.common.use_openshift_sdn
+
# TODO: add the validate parameter when there is a validation command to run
- name: Create the Node config
template:
dest: "{{ openshift_node_config_file }}"
src: node.yaml.v1.j2
notify:
- - restart openshift-node
+ - restart node
-- name: Configure OpenShift Node settings
+- name: Configure Node settings
lineinfile:
- dest: /etc/sysconfig/openshift-node
+ dest: /etc/sysconfig/{{ openshift.common.service_type }}-node
regexp: "{{ item.regex }}"
line: "{{ item.line }}"
with_items:
@@ -57,13 +57,13 @@
- regex: '^CONFIG_FILE='
line: "CONFIG_FILE={{ openshift_node_config_file }}"
notify:
- - restart openshift-node
+ - restart node
- stat: path=/etc/sysconfig/docker
register: docker_check
# TODO: Enable secure registry when code available in origin
-- name: Secure OpenShift Registry
+- name: Secure Registry
lineinfile:
dest: /etc/sysconfig/docker
regexp: '^OPTIONS=.*$'
@@ -119,8 +119,8 @@
seboolean: name=virt_use_nfs state=yes persistent=yes
when: ansible_selinux and ansible_selinux.status == "enabled"
-- name: Start and enable openshift-node
- service: name=openshift-node enabled=yes state=started
+- name: Start and enable node
+ service: name={{ openshift.common.service_type }}-node enabled=yes state=started
register: start_result
- name: pause to prevent service restart from interfering with bootstrapping
diff --git a/roles/openshift_node/vars/main.yml b/roles/openshift_node/vars/main.yml
index cf47f8354..77a9694de 100644
--- a/roles/openshift_node/vars/main.yml
+++ b/roles/openshift_node/vars/main.yml
@@ -1,3 +1,3 @@
---
-openshift_node_config_dir: /etc/openshift/node
+openshift_node_config_dir: "{{ openshift.common.config_base }}/node"
openshift_node_config_file: "{{ openshift_node_config_dir }}/node-config.yaml"
diff --git a/roles/openshift_node_certificates/README.md b/roles/openshift_node_certificates/README.md
index c6304e4b0..6264d253a 100644
--- a/roles/openshift_node_certificates/README.md
+++ b/roles/openshift_node_certificates/README.md
@@ -1,5 +1,5 @@
-OpenShift Node Certificates
-========================
+OpenShift/Atomic Enterprise Node Certificates
+=============================================
TODO
diff --git a/roles/openshift_node_certificates/vars/main.yml b/roles/openshift_node_certificates/vars/main.yml
index a018bb0f9..61fbb1e51 100644
--- a/roles/openshift_node_certificates/vars/main.yml
+++ b/roles/openshift_node_certificates/vars/main.yml
@@ -1,7 +1,7 @@
---
-openshift_node_config_dir: /etc/openshift/node
-openshift_master_config_dir: /etc/openshift/master
-openshift_generated_configs_dir: /etc/openshift/generated-configs
+openshift_node_config_dir: "{{ openshift.common.config_base }}/node"
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
+openshift_generated_configs_dir: "{{ openshift.common.config_base }}/generated-configs"
openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"
openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt"
diff --git a/roles/openshift_registry/vars/main.yml b/roles/openshift_registry/vars/main.yml
index 9fb501e85..9967e26f4 100644
--- a/roles/openshift_registry/vars/main.yml
+++ b/roles/openshift_registry/vars/main.yml
@@ -1,3 +1,2 @@
---
-openshift_master_config_dir: /etc/openshift/master
-
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
diff --git a/roles/openshift_repos/vars/main.yml b/roles/openshift_repos/vars/main.yml
index bbb4c77e7..319611a0b 100644
--- a/roles/openshift_repos/vars/main.yml
+++ b/roles/openshift_repos/vars/main.yml
@@ -1,2 +1,7 @@
---
-known_openshift_deployment_types: ['origin', 'online', 'enterprise']
+# origin uses community packages named 'origin'
+# online currently uses 'openshift' packages
+# enterprise is used for OSE 3.0 < 3.1 which uses packages named 'openshift'
+# atomic-enterprise uses Red Hat packages named 'atomic-openshift'
+# openshift-enterprise uses Red Hat packages named 'atomic-openshift' starting with OSE 3.1
+known_openshift_deployment_types: ['origin', 'online', 'enterprise','atomic-enterprise','openshift-enterprise']
diff --git a/roles/openshift_router/vars/main.yml b/roles/openshift_router/vars/main.yml
index 9fb501e85..9967e26f4 100644
--- a/roles/openshift_router/vars/main.yml
+++ b/roles/openshift_router/vars/main.yml
@@ -1,3 +1,2 @@
---
-openshift_master_config_dir: /etc/openshift/master
-
+openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
diff --git a/roles/openshift_storage_nfs_lvm/tasks/main.yml b/roles/openshift_storage_nfs_lvm/tasks/main.yml
index e9f5814bb..ead81b876 100644
--- a/roles/openshift_storage_nfs_lvm/tasks/main.yml
+++ b/roles/openshift_storage_nfs_lvm/tasks/main.yml
@@ -21,4 +21,4 @@
template: src=../templates/nfs.json.j2 dest=/root/persistent-volume.{{ item }}.json
with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
-# TODO - Get the json files to an openshift-master, and load them. \ No newline at end of file
+# TODO - Get the json files to a master, and load them.