summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/openstack/openshift-cluster')
-rw-r--r--playbooks/openstack/openshift-cluster/install.yml18
-rw-r--r--playbooks/openstack/openshift-cluster/prerequisites.yml12
-rw-r--r--playbooks/openstack/openshift-cluster/provision.yml61
-rw-r--r--playbooks/openstack/openshift-cluster/provision_install.yml9
l---------playbooks/openstack/openshift-cluster/roles1
5 files changed, 101 insertions, 0 deletions
diff --git a/playbooks/openstack/openshift-cluster/install.yml b/playbooks/openstack/openshift-cluster/install.yml
new file mode 100644
index 000000000..40d4767ba
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/install.yml
@@ -0,0 +1,18 @@
+---
+# NOTE(shadower): the AWS playbook builds an in-memory inventory of
+# all the EC2 instances here. We don't need to as that's done by the
+# dynamic inventory.
+
+# TODO(shadower): the AWS playbook sets the
+# `openshift_master_cluster_hostname` and `osm_custom_cors_origins`
+# values here. We do it in the OSEv3 group vars. Do we need to add
+# some logic here?
+
+- name: normalize groups
+ include: ../../byo/openshift-cluster/initialize_groups.yml
+
+- name: run the std_include
+ include: ../../common/openshift-cluster/std_include.yml
+
+- name: run the config
+ include: ../../common/openshift-cluster/config.yml
diff --git a/playbooks/openstack/openshift-cluster/prerequisites.yml b/playbooks/openstack/openshift-cluster/prerequisites.yml
new file mode 100644
index 000000000..0356b37dd
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/prerequisites.yml
@@ -0,0 +1,12 @@
+---
+- hosts: localhost
+ tasks:
+ - name: Check dependencies and OpenStack prerequisites
+ include_role:
+ name: openshift_openstack
+ tasks_from: check-prerequisites.yml
+
+ - name: Check network configuration
+ include_role:
+ name: openshift_openstack
+ tasks_from: net_vars_check.yaml
diff --git a/playbooks/openstack/openshift-cluster/provision.yml b/playbooks/openstack/openshift-cluster/provision.yml
new file mode 100644
index 000000000..fe3057158
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/provision.yml
@@ -0,0 +1,61 @@
+---
+- name: Create the OpenStack resources for cluster installation
+ hosts: localhost
+ tasks:
+ - name: provision cluster
+ include_role:
+ name: openshift_openstack
+ tasks_from: provision.yml
+
+
+# NOTE(shadower): Bring in the host groups:
+- name: normalize groups
+ include: ../../byo/openshift-cluster/initialize_groups.yml
+- name: evaluate groups
+ include: ../../common/openshift-cluster/evaluate_groups.yml
+
+
+- name: Wait for the nodes and gather their facts
+ hosts: oo_all_hosts
+ become: yes
+ # NOTE: The nodes may not be up yet, don't gather facts here.
+ # They'll be collected after `wait_for_connection`.
+ gather_facts: no
+ tasks:
+ - name: Wait for the the nodes to come up
+ wait_for_connection:
+
+ - name: Gather facts for the new nodes
+ setup:
+
+
+# NOTE(shadower): the (internal) DNS must be functional at this point!!
+# That will have happened in provision.yml if nsupdate was configured.
+
+# TODO(shadower): consider splitting this up so people can stop here
+# and configure their DNS if they have to.
+- name: Populate the DNS entries
+ hosts: localhost
+ tasks:
+ - name: Populate DNS entries
+ include_role:
+ name: openshift_openstack
+ tasks_from: populate-dns.yml
+ when:
+ - openshift_openstack_external_nsupdate_keys is defined
+ - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
+
+- name: Prepare the Nodes in the cluster for installation
+ hosts: oo_all_hosts
+ become: yes
+ gather_facts: yes
+ tasks:
+ - name: Install dependencies
+ include_role:
+ name: openshift_openstack
+ tasks_from: node-packages.yml
+
+ - name: Configure Node
+ include_role:
+ name: openshift_openstack
+ tasks_from: node-configuration.yml
diff --git a/playbooks/openstack/openshift-cluster/provision_install.yml b/playbooks/openstack/openshift-cluster/provision_install.yml
new file mode 100644
index 000000000..5d88c105f
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/provision_install.yml
@@ -0,0 +1,9 @@
+---
+- name: Check the prerequisites for cluster provisioning in OpenStack
+ include: prerequisites.yml
+
+- name: Include the provision.yml playbook to create cluster
+ include: provision.yml
+
+- name: Include the install.yml playbook to install cluster
+ include: install.yml
diff --git a/playbooks/openstack/openshift-cluster/roles b/playbooks/openstack/openshift-cluster/roles
new file mode 120000
index 000000000..e2b799b9d
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/roles
@@ -0,0 +1 @@
+../../../roles/ \ No newline at end of file