summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README_OSE.md2
-rw-r--r--inventory/byo/hosts2
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml29
-rw-r--r--playbooks/aws/openshift-cluster/vars.yml15
-rw-r--r--playbooks/common/openshift-node/config.yml20
-rw-r--r--playbooks/gce/openshift-cluster/tasks/launch_instances.yml1
-rw-r--r--playbooks/libvirt/openshift-cluster/templates/domain.xml1
-rw-r--r--roles/openshift_master/tasks/main.yml4
-rw-r--r--roles/openshift_repos/files/online/repos/enterprise-v3.repo9
-rw-r--r--roles/openshift_repos/files/online/repos/epel7-openshift.repo6
-rw-r--r--roles/openshift_repos/files/removed/repos/epel7-openshift.repo0
-rw-r--r--roles/openshift_sdn_node/tasks/main.yml21
12 files changed, 77 insertions, 33 deletions
diff --git a/README_OSE.md b/README_OSE.md
index 6d4a9ba92..cd0b9f7a6 100644
--- a/README_OSE.md
+++ b/README_OSE.md
@@ -63,7 +63,7 @@ option to ansible-playbook.
```ini
# This is an example of a bring your own (byo) host inventory
-# Create an OSEv3 group that contains the maters and nodes groups
+# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
diff --git a/inventory/byo/hosts b/inventory/byo/hosts
index e9af5e571..98dbb4fd8 100644
--- a/inventory/byo/hosts
+++ b/inventory/byo/hosts
@@ -1,6 +1,6 @@
# This is an example of a bring your own (byo) host inventory
-# Create an OSEv3 group that contains the maters and nodes groups
+# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index 58b4082df..34172396a 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -1,32 +1,41 @@
---
-# TODO: modify machine_image based on deployment_type
- set_fact:
- machine_type: "{{ lookup('env', 'ec2_instance_type') | default('m3.large', true) }}"
- machine_image: "{{ lookup('env', 'ec2_ami') | default(deployment_vars[deployment_type].image, true) }}"
- machine_region: "{{ lookup('env', 'ec2_region') | default(deployment_vars[deployment_type].region, true) }}"
- machine_keypair: "{{ lookup('env', 'ec2_keypair')|default('libra', true) }}"
created_by: "{{ lookup('env', 'LOGNAME')|default(cluster, true) }}"
- security_group: "{{ lookup('env', 'ec2_security_group')|default('public', true) }}"
env: "{{ cluster }}"
- host_type: "{{ type }}"
env_host_type: "{{ cluster }}-openshift-{{ type }}"
+ host_type: "{{ type }}"
+ machine_type: "{{ lookup('env', 'ec2_instance_type')
+ | default(deployment_vars[deployment_type].type, true) }}"
+ machine_image: "{{ lookup('env', 'ec2_ami')
+ | default(deployment_vars[deployment_type].image, true) }}"
+ machine_region: "{{ lookup('env', 'ec2_region')
+ | default(deployment_vars[deployment_type].region, true) }}"
+ machine_keypair: "{{ lookup('env', 'ec2_keypair')
+ | default(deployment_vars[deployment_type].keypair, true) }}"
+ machine_subnet: "{{ lookup('env', 'ec2_vpc_subnet')
+ | default(deployment_vars[deployment_type].vpc_subnet, true) }}"
+ machine_public_ip: "{{ lookup('env', 'ec2_public_ip')
+ | default(deployment_vars[deployment_type].assign_public_ip, true) }}"
+ security_groups: "{{ lookup('env', 'ec2_security_groups')
+ | default(deployment_vars[deployment_type].security_groups, true) }}"
- name: Launch instance(s)
ec2:
state: present
region: "{{ machine_region }}"
keypair: "{{ machine_keypair }}"
- group: "{{ security_group }}"
+ group: "{{ security_groups }}"
instance_type: "{{ machine_type }}"
image: "{{ machine_image }}"
count: "{{ instances | oo_len }}"
+ vpc_subnet_id: "{{ machine_subnet | default(omit, true) }}"
+ assign_public_ip: "{{ machine_public_ip | default(omit, true) }}"
wait: yes
instance_tags:
created-by: "{{ created_by }}"
env: "{{ env }}"
host-type: "{{ host_type }}"
env-host-type: "{{ env_host_type }}"
- deployment-type: "{{ deployment_type }}"
register: ec2
- name: Add Name tag to instances
@@ -39,7 +48,7 @@
Name: "{{ item.0 }}"
- set_fact:
- instance_groups: tag_created-by_{{ created_by }}, tag_env_{{ env }}, tag_host-type_{{ host_type }}, tag_env-host-type_{{ env_host_type }}, tag_deployment-type_{{ deployment_type }}
+ instance_groups: tag_created-by_{{ created_by }}, tag_env_{{ env }}, tag_host-type_{{ host_type }}, tag_env-host-type_{{ env_host_type }}
- name: Add new instances groups and variables
add_host:
diff --git a/playbooks/aws/openshift-cluster/vars.yml b/playbooks/aws/openshift-cluster/vars.yml
index f0df3d6f5..bd6215869 100644
--- a/playbooks/aws/openshift-cluster/vars.yml
+++ b/playbooks/aws/openshift-cluster/vars.yml
@@ -6,15 +6,30 @@ deployment_vars:
region: us-east-1
ssh_user: fedora
sudo: yes
+ keypair: libra
+ type: m3.large
+ security_groups: [ 'public' ]
+ vpc_subnet:
+ assign_public_ip:
online:
# private ami
image: ami-307b3658
region: us-east-1
ssh_user: root
sudo: no
+ keypair: libra
+ type: m3.large
+ security_groups: [ 'public' ]
+ vpc_subnet:
+ assign_public_ip:
enterprise:
# rhel-7.1, requires cloud access subscription
image: ami-10663b78
region: us-east-1
ssh_user: ec2-user
sudo: yes
+ keypair: libra
+ type: m3.large
+ security_groups: [ 'public' ]
+ vpc_subnet:
+ assign_public_ip:
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
index c82d69c28..5a6c89489 100644
--- a/playbooks/common/openshift-node/config.yml
+++ b/playbooks/common/openshift-node/config.yml
@@ -44,6 +44,9 @@
roles:
- openshift_register_nodes
tasks:
+ # TODO: update so that we only sync necessary configs/directories, currently
+ # we sync for all nodes in oo_nodes_to_config. We will need to inspect the
+ # configs on the nodes to make the determination on whether to sync or not.
- name: Create the temp directory on the master
file:
path: "{{ sync_tmpdir }}"
@@ -69,12 +72,6 @@
with_items: openshift_nodes
changed_when: False
- - name: Remove the temp directory on the master
- file:
- path: "{{ sync_tmpdir }}"
- state: absent
- changed_when: False
-
- name: Configure node instances
hosts: oo_nodes_to_config
@@ -103,8 +100,17 @@
group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }}
changed_when: False
+- name: Delete the temporary directory on the master
+ hosts: oo_first_master
+ gather_facts: no
+ vars:
+ sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
+ tasks:
+ - file: name={{ sync_tmpdir }} state=absent
+ changed_when: False
+
-- name: Delete temporary directory
+- name: Delete temporary directory on localhost
hosts: localhost
gather_facts: no
tasks:
diff --git a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
index a68edefae..9a9848f05 100644
--- a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
@@ -15,7 +15,6 @@
- env-{{ cluster }}
- host-type-{{ type }}
- env-host-type-{{ cluster }}-openshift-{{ type }}
- - deployment-type-{{ deployment_type }}
register: gce
- name: Add new instances to groups and set variables needed
diff --git a/playbooks/libvirt/openshift-cluster/templates/domain.xml b/playbooks/libvirt/openshift-cluster/templates/domain.xml
index 7656249da..df200e374 100644
--- a/playbooks/libvirt/openshift-cluster/templates/domain.xml
+++ b/playbooks/libvirt/openshift-cluster/templates/domain.xml
@@ -3,7 +3,6 @@
<memory unit='GiB'>1</memory>
<metadata xmlns:ansible="https://github.com/ansible/ansible">
<ansible:tags>
- <ansible:tag>deployment-type-{{ deployment_type }}</ansible:tag>
<ansible:tag>env-{{ cluster }}</ansible:tag>
<ansible:tag>env-host-type-{{ cluster }}-openshift-{{ type }}</ansible:tag>
<ansible:tag>host-type-{{ type }}</ansible:tag>
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 1b1210007..3ea485610 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -61,8 +61,8 @@
--master={{ openshift.master.api_url }}
--public-master={{ openshift.master.public_api_url }}
--listen={{ 'https' if openshift.master.api_use_ssl else 'http' }}://0.0.0.0:{{ openshift.master.api_port }}
- {{ ('--images=' ~ openshift_registry_url) if openshift_registry_url is defined else '' }}
- {{ ('--nodes=' ~ openshift_node_ips | join(',')) if openshift_node_ips is defined else '' }}
+ {{ ('--images=' ~ openshift_registry_url) if (openshift_registry_url | default('', true) != '') else '' }}
+ {{ ('--nodes=' ~ openshift_node_ips | join(',')) if (openshift_node_ips | default('', true) != '') else '' }}
args:
chdir: "{{ openshift_cert_parent_dir }}"
creates: "{{ openshift_master_config }}"
diff --git a/roles/openshift_repos/files/online/repos/enterprise-v3.repo b/roles/openshift_repos/files/online/repos/enterprise-v3.repo
new file mode 100644
index 000000000..240183caa
--- /dev/null
+++ b/roles/openshift_repos/files/online/repos/enterprise-v3.repo
@@ -0,0 +1,9 @@
+[enterprise-v3]
+name=OpenShift Enterprise Beta3
+baseurl=https://gce-mirror1.ops.rhcloud.com/libra/libra-7-ose-beta3/
+ https://mirror.ops.rhcloud.com/libra/libra-7-ose-beta3/
+enabled=1
+gpgcheck=0
+failovermethod=priority
+sslverify=False
+sslclientcert=/var/lib/yum/client-cert.pem
diff --git a/roles/openshift_repos/files/online/repos/epel7-openshift.repo b/roles/openshift_repos/files/online/repos/epel7-openshift.repo
deleted file mode 100644
index c7629872d..000000000
--- a/roles/openshift_repos/files/online/repos/epel7-openshift.repo
+++ /dev/null
@@ -1,6 +0,0 @@
-[maxamillion-origin-next]
-name=Copr repo for origin-next owned by maxamillion
-baseurl=http://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/
-skip_if_unavailable=False
-gpgcheck=0
-enabled=1
diff --git a/roles/openshift_repos/files/removed/repos/epel7-openshift.repo b/roles/openshift_repos/files/removed/repos/epel7-openshift.repo
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/roles/openshift_repos/files/removed/repos/epel7-openshift.repo
diff --git a/roles/openshift_sdn_node/tasks/main.yml b/roles/openshift_sdn_node/tasks/main.yml
index c2329dd6f..37a30d019 100644
--- a/roles/openshift_sdn_node/tasks/main.yml
+++ b/roles/openshift_sdn_node/tasks/main.yml
@@ -34,12 +34,25 @@
line: '\1"{{ openshift_sdn_master_url }}"'
- regex: '^(MINION_IP=)'
line: '\1"{{ openshift.common.ip }}"'
- # TODO lock down the insecure-registry config to a more sane value than
- # 0.0.0.0/0
- - regex: '^(DOCKER_OPTIONS=)'
- line: '\1"--insecure-registry=0.0.0.0/0 -b=lbr0 --mtu=1450 --selinux-enabled"'
notify: restart openshift-sdn-node
+- name: Ensure we aren't setting DOCKER_OPTIONS in /etc/sysconfig/openshift-sdn-node
+ lineinfile:
+ dest: /etc/sysconfig/openshift-sdn-node
+ regexp: '^DOCKER_OPTIONS='
+ state: absent
+ notify: restart openshift-sdn-node
+
+# TODO lock down the insecure-registry config to a more sane value than
+# 0.0.0.0/0
+- name: Configure docker insecure-registry setting
+ lineinfile:
+ dest: /etc/sysconfig/docker
+ regexp: INSECURE_REGISTRY=
+ line: INSECURE_REGISTRY='--insecure-registry=0.0.0.0/0'
+ notify: restart openshift-sdn-node
+
+
- name: Start and enable openshift-sdn-node
service:
name: openshift-sdn-node