summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/openstack')
-rw-r--r--playbooks/openstack/README.md18
-rw-r--r--playbooks/openstack/advanced-configuration.md11
-rw-r--r--playbooks/openstack/openshift-cluster/provision.yml36
-rw-r--r--playbooks/openstack/sample-inventory/group_vars/OSEv3.yml4
-rw-r--r--playbooks/openstack/sample-inventory/group_vars/all.yml4
5 files changed, 46 insertions, 27 deletions
diff --git a/playbooks/openstack/README.md b/playbooks/openstack/README.md
index 4347ddaa8..99f4ab12f 100644
--- a/playbooks/openstack/README.md
+++ b/playbooks/openstack/README.md
@@ -142,7 +142,7 @@ corresponding to your OpenStack installation.
$ vi inventory/group_vars/all.yml
```
-1. Set the `openstack_ssh_public_key` to your OpenStack keypair name.
+1. Set the `openstack_keypair_name` to your OpenStack keypair name.
- See `openstack keypair list` to find the keypairs registered with
OpenShift.
- This must correspond to your private SSH key in `~/.ssh/id_rsa`
@@ -156,20 +156,16 @@ $ vi inventory/group_vars/all.yml
4. Set the `openstack_default_flavor` to the flavor you want your
OpenShift VMs to use.
- See `openstack flavor list` for the list of available flavors.
-5. Set the `public_dns_nameservers` to the list of the IP addresses
- of the DNS servers used for the **private** address resolution[1].
+5. Set the `openstack_dns_nameservers` to the list of the IP addresses
+ of the DNS servers used for the **private** address resolution.
-**NOTE**: In most OpenStack environments, you will also need to
-configure the forwarders for the DNS server we create. This depends on
-your environment.
+**NOTE ON DNS**: at minimum, the OpenShift nodes need to be able to access each
+other by their hostname. OpenStack doesn't provide this by default, so you
+need to provide a DNS server. Put the address of that DNS server in
+`openstack_dns_nameservers` variable.
-Launch a VM in your OpenStack and look at its `/etc/resolv.conf` and
-put the IP addresses into `public_dns_nameservers` in
-`inventory/group_vars/all.yml`.
-[1]: Yes, the name is bad. We will fix it.
-
#### OpenShift configuration
diff --git a/playbooks/openstack/advanced-configuration.md b/playbooks/openstack/advanced-configuration.md
index 72bb95254..5ffec708a 100644
--- a/playbooks/openstack/advanced-configuration.md
+++ b/playbooks/openstack/advanced-configuration.md
@@ -192,11 +192,10 @@ The `openstack_<role name>_hostname` is a set of variables used for customising
hostnames of servers with a given role. When such a variable stays commented,
default hostname (usually the role name) is used.
-The `public_dns_nameservers` is a list of DNS servers accessible from all
-the created Nova servers. These will be serving as your DNS forwarders for
-external FQDNs that do not belong to the cluster's DNS domain and its subdomains.
-If you're unsure what to put in here, you can try the google or opendns servers,
-but note that some organizations may be blocking them.
+The `openstack_dns_nameservers` is a list of DNS servers accessible from all
+the created Nova servers. These will provide the internal name resolution for
+your OpenShift nodes (as well as upstream name resolution for installing
+packages, etc.).
The `openshift_use_dnsmasq` controls either dnsmasq is deployed or not.
By default, dnsmasq is deployed and comes as the hosts' /etc/resolv.conf file
@@ -265,7 +264,7 @@ step for flannel and docker iptables configuration:
## Other configuration variables
-`openstack_ssh_public_key` is a Nova keypair - you can see your
+`openstack_keypair_name` is a Nova keypair - you can see your
keypairs with `openstack keypair list`. It must correspond to the
private SSH key Ansible will use to log into the created VMs. This is
`~/.ssh/id_rsa` by default, but you can use a different key by passing
diff --git a/playbooks/openstack/openshift-cluster/provision.yml b/playbooks/openstack/openshift-cluster/provision.yml
index ed44d4a32..b1dff1870 100644
--- a/playbooks/openstack/openshift-cluster/provision.yml
+++ b/playbooks/openstack/openshift-cluster/provision.yml
@@ -7,15 +7,17 @@
name: openshift_openstack
tasks_from: provision.yml
-# 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.
+# 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: Prepare the Nodes in the cluster for installation
+
+- name: Wait for the nodes and gather their facts
hosts: oo_all_hosts
- become: true
+ 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
@@ -26,6 +28,28 @@
- 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:
+ - external_nsupdate_keys is defined
+ - external_nsupdate_keys.private is defined or 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
diff --git a/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml b/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml
index 949a323a7..7d8dc157e 100644
--- a/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml
+++ b/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml
@@ -5,8 +5,8 @@ openshift_deployment_type: origin
openshift_master_default_subdomain: "apps.{{ env_id }}.{{ public_dns_domain }}"
openshift_master_cluster_method: native
-openshift_master_cluster_hostname: "{{ groups.lb.0|default(groups.masters.0) }}"
-openshift_master_cluster_public_hostname: "{{ groups.lb.0|default(groups.masters.0) }}"
+openshift_master_cluster_hostname: "console.{{ env_id }}.{{ public_dns_domain }}"
+openshift_master_cluster_public_hostname: "{{ openshift_master_cluster_hostname }}"
osm_default_node_selector: 'region=primary'
diff --git a/playbooks/openstack/sample-inventory/group_vars/all.yml b/playbooks/openstack/sample-inventory/group_vars/all.yml
index 8ea798c14..e0618d685 100644
--- a/playbooks/openstack/sample-inventory/group_vars/all.yml
+++ b/playbooks/openstack/sample-inventory/group_vars/all.yml
@@ -1,7 +1,7 @@
---
env_id: "openshift"
public_dns_domain: "example.com"
-public_dns_nameservers: []
+openstack_dns_nameservers: []
# # Used Hostnames
# # - set custom hostnames for roles by uncommenting corresponding lines
@@ -12,7 +12,7 @@ public_dns_nameservers: []
#openstack_etcd_hostname: "etcd"
#openstack_dns_hostname: "dns"
-openstack_ssh_public_key: "openshift"
+openstack_keypair_name: "openshift"
openstack_external_network_name: "public"
#openstack_private_network_name: "openshift-ansible-{{ stack_name }}-net"
# # A dedicated Neutron network name for containers data network