summaryrefslogtreecommitdiffstats
path: root/roles/openshift_openstack
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-11-02 11:03:39 +0100
committerTomas Sedovic <tomas@sedovic.cz>2017-11-07 14:35:47 +1100
commitb95170503613bb97c00175324b31ed91f6f41ea1 (patch)
tree6021e692645f1233379909b3cb3f7b5795685f47 /roles/openshift_openstack
parentad84935b5021da5ab0d21ffdf630079c1a59083d (diff)
downloadopenshift-b95170503613bb97c00175324b31ed91f6f41ea1.tar.gz
openshift-b95170503613bb97c00175324b31ed91f6f41ea1.tar.bz2
openshift-b95170503613bb97c00175324b31ed91f6f41ea1.tar.xz
openshift-b95170503613bb97c00175324b31ed91f6f41ea1.zip
Namespace the OpenStack vars
This makes sure that all the variables used in the `openshift_openstack` role are prefixed with `openshift_openstack_` as is the convention.
Diffstat (limited to 'roles/openshift_openstack')
-rw-r--r--roles/openshift_openstack/defaults/main.yml132
-rw-r--r--roles/openshift_openstack/tasks/check-prerequisites.yml40
-rw-r--r--roles/openshift_openstack/tasks/hostname.yml2
-rw-r--r--roles/openshift_openstack/tasks/net_vars_check.yaml2
-rw-r--r--roles/openshift_openstack/tasks/node-packages.yml6
-rw-r--r--roles/openshift_openstack/tasks/populate-dns.yml66
-rw-r--r--roles/openshift_openstack/tasks/provision.yml8
-rw-r--r--roles/openshift_openstack/templates/docker-storage-setup-dm.j28
-rw-r--r--roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j210
-rw-r--r--roles/openshift_openstack/templates/heat_stack.yaml.j2336
-rw-r--r--roles/openshift_openstack/templates/heat_stack_server.yaml.j216
11 files changed, 314 insertions, 312 deletions
diff --git a/roles/openshift_openstack/defaults/main.yml b/roles/openshift_openstack/defaults/main.yml
index 1f9c09c96..3eca52963 100644
--- a/roles/openshift_openstack/defaults/main.yml
+++ b/roles/openshift_openstack/defaults/main.yml
@@ -1,28 +1,27 @@
---
-stack_state: 'present'
+openshift_openstack_stack_state: 'present'
-ssh_ingress_cidr: 0.0.0.0/0
-node_ingress_cidr: 0.0.0.0/0
-master_ingress_cidr: 0.0.0.0/0
-lb_ingress_cidr: 0.0.0.0/0
-bastion_ingress_cidr: 0.0.0.0/0
-openstack_num_etcd: 0
-openstack_num_masters: 1
-openstack_num_nodes: 1
-openstack_num_dns: 0
-openstack_num_infra: 1
-openstack_dns_nameservers: []
-openstack_nodes_to_remove: []
+openshift_openstack_ssh_ingress_cidr: 0.0.0.0/0
+openshift_openstack_node_ingress_cidr: 0.0.0.0/0
+openshift_openstack_lb_ingress_cidr: 0.0.0.0/0
+openshift_openstack_bastion_ingress_cidr: 0.0.0.0/0
+openshift_openstack_num_etcd: 0
+openshift_openstack_num_masters: 1
+openshift_openstack_num_nodes: 1
+openshift_openstack_num_dns: 0
+openshift_openstack_num_infra: 1
+openshift_openstack_dns_nameservers: []
+openshift_openstack_nodes_to_remove: []
-openshift_cluster_node_labels:
+openshift_openstack_cluster_node_labels:
app:
region: primary
infra:
region: infra
-install_debug_packages: false
-required_packages:
+openshift_openstack_install_debug_packages: false
+openshift_openstack_required_packages:
- docker
- NetworkManager
- wget
@@ -30,66 +29,69 @@ required_packages:
- net-tools
- bind-utils
- bridge-utils
-debug_packages:
+openshift_openstack_debug_packages:
- bash-completion
- vim-enhanced
# container-storage-setup
-docker_dev: "/dev/sdb"
-docker_vg: "docker-vol"
-docker_data_size: "95%VG"
-docker_dm_basesize: "3G"
-container_root_lv_name: "dockerlv"
-container_root_lv_mount_path: "/var/lib/docker"
+openshift_openstack_container_storage_setup:
+ docker_dev: "/dev/sdb"
+ docker_vg: "docker-vol"
+ docker_data_size: "95%VG"
+ docker_dm_basesize: "3G"
+ container_root_lv_name: "dockerlv"
+ container_root_lv_mount_path: "/var/lib/docker"
# populate-dns
-dns_records_rm: []
-dns_records_add: []
-external_nsupdate_keys: {}
+openshift_openstack_dns_records_add: []
+openshift_openstack_external_nsupdate_keys: {}
-full_dns_domain: "{{ (env_id|trim == '') | ternary(public_dns_domain, env_id + '.' + public_dns_domain) }}"
-openshift_app_domain: "apps"
+openshift_openstack_full_dns_domain: "{{ (openshift_openstack_clusterid|trim == '') | ternary(openshift_openstack_public_dns_domain, openshift_openstack_clusterid + '.' + openshift_openstack_public_dns_domain) }}"
+openshift_openstack_app_subdomain: "apps"
# heat vars
-stack_name: "{{ env_id }}.{{ public_dns_domain }}"
-openstack_subnet_prefix: "192.168.99"
-openstack_master_hostname: master
-openstack_infra_hostname: infra-node
-openstack_node_hostname: app-node
-openstack_lb_hostname: lb
-openstack_etcd_hostname: etcd
-openstack_dns_hostname: dns
-openstack_keypair_name: openshift
-openstack_lb_flavor: "{{ openstack_default_flavor }}"
-openstack_etcd_flavor: "{{ openstack_default_flavor }}"
-openstack_master_flavor: "{{ openstack_default_flavor }}"
-openstack_node_flavor: "{{ openstack_default_flavor }}"
-openstack_infra_flavor: "{{ openstack_default_flavor }}"
-openstack_dns_flavor: "{{ openstack_default_flavor }}"
-openstack_master_image: "{{ openstack_default_image_name }}"
-openstack_infra_image: "{{ openstack_default_image_name }}"
-openstack_node_image: "{{ openstack_default_image_name }}"
-openstack_lb_image: "{{ openstack_default_image_name }}"
-openstack_etcd_image: "{{ openstack_default_image_name }}"
-openstack_dns_image: "{{ openstack_default_image_name }}"
-openstack_provider_network_name: null
-openstack_external_network_name: null
-openstack_private_network: >-
- {% if openstack_provider_network_name | default(None) -%}
- {{ openstack_provider_network_name }}
+openshift_openstack_clusterid: openshift
+openshift_openstack_stack_name: "{{ openshift_openstack_clusterid }}.{{ openshift_openstack_public_dns_domain }}"
+openshift_openstack_subnet_prefix: "192.168.99"
+openshift_openstack_master_hostname: master
+openshift_openstack_infra_hostname: infra-node
+openshift_openstack_node_hostname: app-node
+openshift_openstack_lb_hostname: lb
+openshift_openstack_etcd_hostname: etcd
+openshift_openstack_dns_hostname: dns
+openshift_openstack_keypair_name: openshift
+openshift_openstack_lb_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_etcd_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_master_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_node_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_infra_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_dns_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_master_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_infra_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_node_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_lb_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_etcd_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_dns_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_provider_network_name: null
+openshift_openstack_external_network_name: null
+openshift_openstack_private_network: >-
+ {% if openshift_openstack_provider_network_name | default(None) -%}
+ {{ openshift_openstack_provider_network_name }}
{%- else -%}
- {{ openstack_private_network_name | default ('openshift-ansible-' + stack_name + '-net') }}
+ {{ openshift_openstack_private_network_name | default ('openshift-ansible-' + openshift_openstack_stack_name + '-net') }}
{%- endif -%}
-openstack_master_server_group_policies: []
-openstack_infra_server_group_policies: []
-openstack_master_volume_size: "{{ docker_volume_size }}"
-openstack_infra_volume_size: "{{ docker_volume_size }}"
-openstack_node_volume_size: "{{ docker_volume_size }}"
-openstack_etcd_volume_size: 2
-openstack_dns_volume_size: 1
-openstack_lb_volume_size: 5
-openstack_use_bastion: false
-openshift_ui_ssh_tunnel: false
+openshift_openstack_master_server_group_policies: []
+openshift_openstack_infra_server_group_policies: []
+openshift_openstack_docker_volume_size: 15
+openshift_openstack_master_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_infra_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_node_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_etcd_volume_size: 2
+openshift_openstack_dns_volume_size: 1
+openshift_openstack_lb_volume_size: 5
+openshift_openstack_use_bastion: false
+openshift_openstack_ui_ssh_tunnel: false
+openshift_openstack_ephemeral_volumes: false
diff --git a/roles/openshift_openstack/tasks/check-prerequisites.yml b/roles/openshift_openstack/tasks/check-prerequisites.yml
index a91e60640..57c7238d1 100644
--- a/roles/openshift_openstack/tasks/check-prerequisites.yml
+++ b/roles/openshift_openstack/tasks/check-prerequisites.yml
@@ -50,24 +50,24 @@
# Check Glance image
- name: Try to get image facts
os_image_facts:
- image: "{{ openstack_default_image_name }}"
+ image: "{{ openshift_openstack_default_image_name }}"
register: image_result
- name: Check that image is available
assert:
that: "image_result.ansible_facts.openstack_image"
- msg: "Image {{ openstack_default_image_name }} is not available"
+ msg: "Image {{ openshift_openstack_default_image_name }} is not available"
# Check network name
- name: Try to get network facts
os_networks_facts:
- name: "{{ openstack_external_network_name }}"
+ name: "{{ openshift_openstack_external_network_name }}"
register: network_result
- when: not openstack_provider_network_name|default(None)
+ when: not openshift_openstack_provider_network_name|default(None)
- name: Check that network is available
assert:
that: "network_result.ansible_facts.openstack_networks"
- msg: "Network {{ openstack_external_network_name }} is not available"
- when: not openstack_provider_network_name|default(None)
+ msg: "Network {{ openshift_openstack_external_network_name }} is not available"
+ when: not openshift_openstack_provider_network_name|default(None)
# Check keypair
# TODO kpilatov: there is no Ansible module for getting OS keypairs
@@ -76,30 +76,30 @@
- name: Try to show keypair
command: >
python -c 'import shade; cloud = shade.openstack_cloud();
- exit(cloud.get_keypair("{{ openstack_keypair_name }}") is None)'
+ exit(cloud.get_keypair("{{ openshift_openstack_keypair_name }}") is None)'
ignore_errors: yes
register: key_result
- name: Check that keypair is available
assert:
that: 'key_result.rc == 0'
- msg: "Keypair {{ openstack_keypair_name }} is not available"
+ msg: "Keypair {{ openshift_openstack_keypair_name }} is not available"
# Check that custom images are available
- include: custom_image_check.yaml
with_items:
- - "{{ openstack_master_image }}"
- - "{{ openstack_infra_image }}"
- - "{{ openstack_node_image }}"
- - "{{ openstack_lb_image }}"
- - "{{ openstack_etcd_image }}"
- - "{{ openstack_dns_image }}"
+ - "{{ openshift_openstack_master_image }}"
+ - "{{ openshift_openstack_infra_image }}"
+ - "{{ openshift_openstack_node_image }}"
+ - "{{ openshift_openstack_lb_image }}"
+ - "{{ openshift_openstack_etcd_image }}"
+ - "{{ openshift_openstack_dns_image }}"
# Check that custom flavors are available
- include: custom_flavor_check.yaml
with_items:
- - "{{ openstack_master_flavor }}"
- - "{{ openstack_infra_flavor }}"
- - "{{ openstack_node_flavor }}"
- - "{{ openstack_lb_flavor }}"
- - "{{ openstack_etcd_flavor }}"
- - "{{ openstack_dns_flavor }}"
+ - "{{ openshift_openstack_master_flavor }}"
+ - "{{ openshift_openstack_infra_flavor }}"
+ - "{{ openshift_openstack_node_flavor }}"
+ - "{{ openshift_openstack_lb_flavor }}"
+ - "{{ openshift_openstack_etcd_flavor }}"
+ - "{{ openshift_openstack_dns_flavor }}"
diff --git a/roles/openshift_openstack/tasks/hostname.yml b/roles/openshift_openstack/tasks/hostname.yml
index 9815d0e80..e1a18425f 100644
--- a/roles/openshift_openstack/tasks/hostname.yml
+++ b/roles/openshift_openstack/tasks/hostname.yml
@@ -5,7 +5,7 @@
- name: Setting FQDN Fact
set_fact:
- new_fqdn: "{{ new_hostname }}.{{ full_dns_domain }}"
+ new_fqdn: "{{ new_hostname }}.{{ openshift_openstack_full_dns_domain }}"
- name: Setting hostname and DNS domain
hostname: name="{{ new_fqdn }}"
diff --git a/roles/openshift_openstack/tasks/net_vars_check.yaml b/roles/openshift_openstack/tasks/net_vars_check.yaml
index 68afde415..18b9b21b9 100644
--- a/roles/openshift_openstack/tasks/net_vars_check.yaml
+++ b/roles/openshift_openstack/tasks/net_vars_check.yaml
@@ -3,7 +3,7 @@
fail:
msg: "Flannel SDN requires a dedicated containers data network and can not work over a provider network"
when:
- - openstack_provider_network_name is defined
+ - openshift_openstack_provider_network_name is defined
- openstack_private_data_network_name is defined
- name: Check the flannel network configuration
diff --git a/roles/openshift_openstack/tasks/node-packages.yml b/roles/openshift_openstack/tasks/node-packages.yml
index c65eaec3b..7864f5269 100644
--- a/roles/openshift_openstack/tasks/node-packages.yml
+++ b/roles/openshift_openstack/tasks/node-packages.yml
@@ -5,11 +5,11 @@
yum:
name: "{{ item }}"
state: latest
- with_items: "{{ required_packages }}"
+ with_items: "{{ openshift_openstack_required_packages }}"
- name: Install debug packages (optional)
yum:
name: "{{ item }}"
state: latest
- with_items: "{{ debug_packages }}"
- when: install_debug_packages|bool
+ with_items: "{{ openshift_openstack_debug_packages }}"
+ when: openshift_openstack_install_debug_packages|bool
diff --git a/roles/openshift_openstack/tasks/populate-dns.yml b/roles/openshift_openstack/tasks/populate-dns.yml
index 669b65a01..080c3aca9 100644
--- a/roles/openshift_openstack/tasks/populate-dns.yml
+++ b/roles/openshift_openstack/tasks/populate-dns.yml
@@ -5,41 +5,41 @@
- name: "Add wildcard records to the private A records for infrahosts"
set_fact:
- private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['private_v4'] } ] }}"
+ private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_openstack_app_subdomain, 'ip': hostvars[item]['private_v4'] } ] }}"
with_items: "{{ groups['infra_hosts'] }}"
- name: "Add public master cluster hostname records to the private A records (single master)"
set_fact:
- private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].private_v4 } ] }}"
+ private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].private_v4 } ] }}"
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- - openstack_num_masters == 1
+ - openshift_openstack_num_masters == 1
- name: "Add public master cluster hostname records to the private A records (multi-master)"
set_fact:
- private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].private_v4 } ] }}"
+ private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].private_v4 } ] }}"
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- - openstack_num_masters > 1
+ - openshift_openstack_num_masters > 1
- name: "Set the private DNS server to use the external value (if provided)"
set_fact:
- nsupdate_server_private: "{{ external_nsupdate_keys['private']['server'] }}"
- nsupdate_key_secret_private: "{{ external_nsupdate_keys['private']['key_secret'] }}"
- nsupdate_key_algorithm_private: "{{ external_nsupdate_keys['private']['key_algorithm'] }}"
- nsupdate_private_key_name: "{{ external_nsupdate_keys['private']['key_name']|default('private-' + full_dns_domain) }}"
+ nsupdate_server_private: "{{ openshift_openstack_external_nsupdate_keys['private']['server'] }}"
+ nsupdate_key_secret_private: "{{ openshift_openstack_external_nsupdate_keys['private']['key_secret'] }}"
+ nsupdate_key_algorithm_private: "{{ openshift_openstack_external_nsupdate_keys['private']['key_algorithm'] }}"
+ nsupdate_private_key_name: "{{ openshift_openstack_external_nsupdate_keys['private']['key_name']|default('private-' + openshift_openstack_full_dns_domain) }}"
when:
- - external_nsupdate_keys is defined
- - external_nsupdate_keys['private'] is defined
+ - openshift_openstack_external_nsupdate_keys is defined
+ - openshift_openstack_external_nsupdate_keys['private'] is defined
- name: "Generate the private Add section for DNS"
set_fact:
private_named_records:
- view: "private"
- zone: "{{ full_dns_domain }}"
+ zone: "{{ openshift_openstack_full_dns_domain }}"
server: "{{ nsupdate_server_private }}"
- key_name: "{{ nsupdate_private_key_name|default('private-' + full_dns_domain) }}"
+ key_name: "{{ nsupdate_private_key_name|default('private-' + openshift_openstack_full_dns_domain) }}"
key_secret: "{{ nsupdate_key_secret_private }}"
key_algorithm: "{{ nsupdate_key_algorithm_private | lower }}"
entries: "{{ private_records }}"
@@ -52,58 +52,58 @@
- name: "Add wildcard records to the public A records"
set_fact:
- public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['public_v4'] } ] }}"
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_openstack_app_subdomain, 'ip': hostvars[item]['public_v4'] } ] }}"
with_items: "{{ groups['infra_hosts'] }}"
when: hostvars[item]['public_v4'] is defined
- name: "Add public master cluster hostname records to the public A records (single master)"
set_fact:
- public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].public_v4 } ] }}"
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].public_v4 } ] }}"
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- - openstack_num_masters == 1
- - not openstack_use_bastion|bool
+ - openshift_openstack_num_masters == 1
+ - not openshift_openstack_use_bastion|bool
- name: "Add public master cluster hostname records to the public A records (single master behind a bastion)"
set_fact:
- public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.bastions[0]].public_v4 } ] }}"
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.bastions[0]].public_v4 } ] }}"
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- - openstack_num_masters == 1
- - openstack_use_bastion|bool
+ - openshift_openstack_num_masters == 1
+ - openshift_openstack_use_bastion|bool
- name: "Add public master cluster hostname records to the public A records (multi-master)"
set_fact:
- public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].public_v4 } ] }}"
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].public_v4 } ] }}"
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- - openstack_num_masters > 1
+ - openshift_openstack_num_masters > 1
- name: "Set the public DNS server details to use the external value (if provided)"
set_fact:
- nsupdate_server_public: "{{ external_nsupdate_keys['public']['server'] }}"
- nsupdate_key_secret_public: "{{ external_nsupdate_keys['public']['key_secret'] }}"
- nsupdate_key_algorithm_public: "{{ external_nsupdate_keys['public']['key_algorithm'] }}"
- nsupdate_public_key_name: "{{ external_nsupdate_keys['public']['key_name']|default('public-' + full_dns_domain) }}"
+ nsupdate_server_public: "{{ openshift_openstack_external_nsupdate_keys['public']['server'] }}"
+ nsupdate_key_secret_public: "{{ openshift_openstack_external_nsupdate_keys['public']['key_secret'] }}"
+ nsupdate_key_algorithm_public: "{{ openshift_openstack_external_nsupdate_keys['public']['key_algorithm'] }}"
+ nsupdate_public_key_name: "{{ openshift_openstack_external_nsupdate_keys['public']['key_name']|default('public-' + openshift_openstack_full_dns_domain) }}"
when:
- - external_nsupdate_keys is defined
- - external_nsupdate_keys['public'] is defined
+ - openshift_openstack_external_nsupdate_keys is defined
+ - openshift_openstack_external_nsupdate_keys['public'] is defined
- name: "Generate the public Add section for DNS"
set_fact:
public_named_records:
- view: "public"
- zone: "{{ full_dns_domain }}"
+ zone: "{{ openshift_openstack_full_dns_domain }}"
server: "{{ nsupdate_server_public }}"
- key_name: "{{ nsupdate_public_key_name|default('public-' + full_dns_domain) }}"
+ key_name: "{{ nsupdate_public_key_name|default('public-' + openshift_openstack_full_dns_domain) }}"
key_secret: "{{ nsupdate_key_secret_public }}"
key_algorithm: "{{ nsupdate_key_algorithm_public | lower }}"
entries: "{{ public_records }}"
-- name: "Generate the final dns_records_add"
+- name: "Generate the final openshift_openstack_dns_records_add"
set_fact:
- dns_records_add: "{{ private_named_records + public_named_records }}"
+ openshift_openstack_dns_records_add: "{{ private_named_records + public_named_records }}"
- name: "Add DNS A records"
@@ -119,7 +119,7 @@
# TODO(shadower): add a cleanup playbook that removes these records, too!
state: present
with_subelements:
- - "{{ dns_records_add | default({}) }}"
+ - "{{ openshift_openstack_dns_records_add | default({}) }}"
- entries
register: nsupdate_add_result
until: nsupdate_add_result|succeeded
diff --git a/roles/openshift_openstack/tasks/provision.yml b/roles/openshift_openstack/tasks/provision.yml
index e693f535a..dccbe334c 100644
--- a/roles/openshift_openstack/tasks/provision.yml
+++ b/roles/openshift_openstack/tasks/provision.yml
@@ -2,14 +2,14 @@
- name: Generate the templates
include: generate-templates.yml
when:
- - stack_state == 'present'
+ - openshift_openstack_stack_state == 'present'
- name: Handle the Stack (create/delete)
ignore_errors: False
register: stack_create
os_stack:
- name: "{{ stack_name }}"
- state: "{{ stack_state }}"
+ name: "{{ openshift_openstack_stack_name }}"
+ state: "{{ openshift_openstack_stack_state }}"
template: "{{ stack_template_path | default(omit) }}"
wait: yes
@@ -19,7 +19,7 @@
- name: CleanUp
include: cleanup.yml
when:
- - stack_state == 'present'
+ - openshift_openstack_stack_state == 'present'
# TODO(shadower): create the registry and PV Cinder volumes if specified
# and include the `prepare-and-format-cinder-volume` tasks to set it up
diff --git a/roles/openshift_openstack/templates/docker-storage-setup-dm.j2 b/roles/openshift_openstack/templates/docker-storage-setup-dm.j2
index b5869feff..32c6b5838 100644
--- a/roles/openshift_openstack/templates/docker-storage-setup-dm.j2
+++ b/roles/openshift_openstack/templates/docker-storage-setup-dm.j2
@@ -1,4 +1,4 @@
-DEVS="{{ docker_dev }}"
-VG="{{ docker_vg }}"
-DATA_SIZE="{{ docker_data_size }}"
-EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.basesize={{ docker_dm_basesize }}"
+DEVS="{{ openshift_openstack_container_storage_setup.docker_dev }}"
+VG="{{ openshift_openstack_container_storage_setup.docker_vg }}"
+DATA_SIZE="{{ openshift_openstack_container_storage_setup.docker_data_size }}"
+EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.basesize={{ openshift_openstack_container_storage_setup.docker_dm_basesize }}"
diff --git a/roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j2 b/roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j2
index d8b4a0276..1bf366bdc 100644
--- a/roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j2
+++ b/roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j2
@@ -1,7 +1,7 @@
-DEVS="{{ docker_dev }}"
-VG="{{ docker_vg }}"
-DATA_SIZE="{{ docker_data_size }}"
+DEVS="{{ openshift_openstack_container_storage_setup.docker_dev }}"
+VG="{{ openshift_openstack_container_storage_setup.docker_vg }}"
+DATA_SIZE="{{ openshift_openstack_container_storage_setup.docker_data_size }}"
STORAGE_DRIVER=overlay2
-CONTAINER_ROOT_LV_NAME="{{ container_root_lv_name }}"
-CONTAINER_ROOT_LV_MOUNT_PATH="{{ container_root_lv_mount_path }}"
+CONTAINER_ROOT_LV_NAME="{{ openshift_openstack_container_storage_setup.container_root_lv_name }}"
+CONTAINER_ROOT_LV_MOUNT_PATH="{{ openshift_openstack_container_storage_setup.container_root_lv_mount_path }}"
CONTAINER_ROOT_LV_SIZE=100%FREE
diff --git a/roles/openshift_openstack/templates/heat_stack.yaml.j2 b/roles/openshift_openstack/templates/heat_stack.yaml.j2
index 28634f9a4..bfa65b460 100644
--- a/roles/openshift_openstack/templates/heat_stack.yaml.j2
+++ b/roles/openshift_openstack/templates/heat_stack.yaml.j2
@@ -54,7 +54,7 @@ outputs:
description: Floating IPs of the nodes
value: { get_attr: [ infra_nodes, floating_ip ] }
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
dns_name:
description: Name of the DNS
value:
@@ -72,11 +72,11 @@ outputs:
{% endif %}
conditions:
- no_floating: {% if openstack_provider_network_name or openstack_use_bastion|bool %}true{% else %}false{% endif %}
+ no_floating: {% if openshift_openstack_provider_network_name or openshift_openstack_use_bastion|bool %}true{% else %}false{% endif %}
resources:
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
net:
type: OS::Neutron::Net
properties:
@@ -84,7 +84,7 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
subnet:
type: OS::Neutron::Subnet
@@ -93,26 +93,26 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-subnet
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
network: { get_resource: net }
cidr:
str_replace:
template: subnet_24_prefix.0/24
params:
- subnet_24_prefix: {{ openstack_subnet_prefix }}
+ subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
allocation_pools:
- start:
str_replace:
template: subnet_24_prefix.3
params:
- subnet_24_prefix: {{ openstack_subnet_prefix }}
+ subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
end:
str_replace:
template: subnet_24_prefix.254
params:
- subnet_24_prefix: {{ openstack_subnet_prefix }}
+ subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
dns_nameservers:
-{% for nameserver in openstack_dns_nameservers %}
+{% for nameserver in openshift_openstack_dns_nameservers %}
- {{ nameserver }}
{% endfor %}
@@ -120,13 +120,13 @@ resources:
data_net:
type: OS::Neutron::Net
properties:
- name: openshift-ansible-{{ stack_name }}-data-net
+ name: openshift-ansible-{{ openshift_openstack_stack_name }}-data-net
port_security_enabled: false
data_subnet:
type: OS::Neutron::Subnet
properties:
- name: openshift-ansible-{{ stack_name }}-data-subnet
+ name: openshift-ansible-{{ openshift_openstack_stack_name }}-data-subnet
network: { get_resource: data_net }
cidr: {{ osm_cluster_network_cidr|default('10.128.0.0/14') }}
gateway_ip: null
@@ -139,9 +139,9 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-router
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
external_gateway_info:
- network: {{ openstack_external_network_name }}
+ network: {{ openshift_openstack_external_network_name }}
interface:
type: OS::Neutron::RouterInterface
@@ -158,8 +158,8 @@ resources:
# str_replace:
# template: openshift-ansible-cluster_id-keypair
# params:
-# cluster_id: {{ stack_name }}
-# public_key: {{ openstack_keypair_name }}
+# cluster_id: {{ openshift_openstack_stack_name }}
+# public_key: {{ openshift_openstack_keypair_name }}
common-secgrp:
type: OS::Neutron::SecurityGroup
@@ -168,30 +168,30 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-common-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Basic ssh/icmp security group for cluster_id OpenShift cluster
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
port_range_min: 22
port_range_max: 22
- remote_ip_prefix: {{ ssh_ingress_cidr }}
-{% if openstack_use_bastion|bool %}
+ remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
+{% if openshift_openstack_use_bastion|bool %}
- direction: ingress
protocol: tcp
port_range_min: 22
port_range_max: 22
- remote_ip_prefix: {{ bastion_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_bastion_ingress_cidr }}
{% endif %}
- direction: ingress
protocol: icmp
- remote_ip_prefix: {{ ssh_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
flat-secgrp:
type: OS::Neutron::SecurityGroup
properties:
@@ -199,12 +199,12 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-flat-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id OpenShift cluster
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
@@ -280,12 +280,12 @@ resources:
protocol: tcp
port_range_min: 30000
port_range_max: 32767
- remote_ip_prefix: {{ node_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
- direction: ingress
protocol: tcp
port_range_min: 30000
port_range_max: 32767
- remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+ remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
{% else %}
master-secgrp:
type: OS::Neutron::SecurityGroup
@@ -294,12 +294,12 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-master-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id OpenShift cluster master
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
@@ -355,12 +355,12 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-etcd-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id etcd cluster
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
@@ -381,12 +381,12 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-node-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id OpenShift cluster nodes
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
@@ -412,12 +412,12 @@ resources:
protocol: tcp
port_range_min: 30000
port_range_max: 32767
- remote_ip_prefix: {{ node_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
- direction: ingress
protocol: tcp
port_range_min: 30000
port_range_max: 32767
- remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+ remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
{% endif %}
infra-secgrp:
@@ -427,12 +427,12 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-infra-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id OpenShift infrastructure cluster nodes
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: tcp
@@ -443,7 +443,7 @@ resources:
port_range_min: 443
port_range_max: 443
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
dns-secgrp:
type: OS::Neutron::SecurityGroup
properties:
@@ -451,67 +451,67 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-dns-secgrp
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
description:
str_replace:
template: Security group for cluster_id cluster DNS
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
rules:
- direction: ingress
protocol: udp
port_range_min: 53
port_range_max: 53
- remote_ip_prefix: {{ node_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
- direction: ingress
protocol: udp
port_range_min: 53
port_range_max: 53
- remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+ remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
- direction: ingress
protocol: tcp
port_range_min: 53
port_range_max: 53
- remote_ip_prefix: {{ node_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
- direction: ingress
protocol: tcp
port_range_min: 53
port_range_max: 53
- remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+ remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
{% endif %}
-{% if openstack_num_masters|int > 1 or openshift_ui_ssh_tunnel|bool %}
+{% if openshift_openstack_num_masters|int > 1 or openshift_openstack_ui_ssh_tunnel|bool %}
lb-secgrp:
type: OS::Neutron::SecurityGroup
properties:
- name: openshift-ansible-{{ stack_name }}-lb-secgrp
- description: Security group for {{ stack_name }} cluster Load Balancer
+ name: openshift-ansible-{{ openshift_openstack_stack_name }}-lb-secgrp
+ description: Security group for {{ openshift_openstack_stack_name }} cluster Load Balancer
rules:
- direction: ingress
protocol: tcp
port_range_min: {{ openshift_master_api_port | default(8443) }}
port_range_max: {{ openshift_master_api_port | default(8443) }}
- remote_ip_prefix: {{ lb_ingress_cidr | default(bastion_ingress_cidr) }}
-{% if openshift_ui_ssh_tunnel|bool %}
+ remote_ip_prefix: {{ openshift_openstack_lb_ingress_cidr | default(openshift_openstack_bastion_ingress_cidr) }}
+{% if openshift_openstack_ui_ssh_tunnel|bool %}
- direction: ingress
protocol: tcp
port_range_min: {{ openshift_master_api_port | default(8443) }}
port_range_max: {{ openshift_master_api_port | default(8443) }}
- remote_ip_prefix: {{ ssh_ingress_cidr }}
+ remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
{% endif %}
{% if openshift_master_console_port is defined and openshift_master_console_port != openshift_master_api_port %}
- direction: ingress
protocol: tcp
port_range_min: {{ openshift_master_console_port | default(8443) }}
port_range_max: {{ openshift_master_console_port | default(8443) }}
- remote_ip_prefix: {{ lb_ingress_cidr | default(bastion_ingress_cidr) }}
+ remote_ip_prefix: {{ openshift_openstack_lb_ingress_cidr | default(openshift_openstack_bastion_ingress_cidr) }}
{% endif %}
{% endif %}
etcd:
type: OS::Heat::ResourceGroup
properties:
- count: {{ openstack_num_etcd }}
+ count: {{ openshift_openstack_num_etcd }}
resource_def:
type: server.yaml
properties:
@@ -519,23 +519,23 @@ resources:
str_replace:
template: k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- k8s_type: {{ openstack_etcd_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ k8s_type: {{ openshift_openstack_etcd_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: etcds
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: etcd
- image: {{ openstack_etcd_image }}
- flavor: {{ openstack_etcd_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_etcd_image }}
+ flavor: {{ openshift_openstack_etcd_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -543,40 +543,40 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% endif %}
secgrp:
- - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} }
+ - { get_resource: {% if openshift_openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} }
- { get_resource: common-secgrp }
floating_network:
if:
- no_floating
- null
- - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+ - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
attach_float_net: false
{% endif %}
- volume_size: {{ openstack_etcd_volume_size }}
-{% if not openstack_provider_network_name %}
+ volume_size: {{ openshift_openstack_etcd_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
-{% if openstack_master_server_group_policies|length > 0 %}
+{% if openshift_openstack_master_server_group_policies|length > 0 %}
master_server_group:
type: OS::Nova::ServerGroup
properties:
name: master_server_group
- policies: {{ openstack_master_server_group_policies }}
+ policies: {{ openshift_openstack_master_server_group_policies }}
{% endif %}
-{% if openstack_infra_server_group_policies|length > 0 %}
+{% if openshift_openstack_infra_server_group_policies|length > 0 %}
infra_server_group:
type: OS::Nova::ServerGroup
properties:
name: infra_server_group
- policies: {{ openstack_infra_server_group_policies }}
+ policies: {{ openshift_openstack_infra_server_group_policies }}
{% endif %}
-{% if openstack_num_masters|int > 1 %}
+{% if openshift_openstack_num_masters|int > 1 %}
loadbalancer:
type: OS::Heat::ResourceGroup
properties:
@@ -588,23 +588,23 @@ resources:
str_replace:
template: k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- k8s_type: {{ openstack_lb_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ k8s_type: {{ openshift_openstack_lb_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: lb
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: lb
- image: {{ openstack_lb_image }}
- flavor: {{ openstack_lb_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_lb_image }}
+ flavor: {{ openshift_openstack_lb_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -612,16 +612,16 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% endif %}
secgrp:
- { get_resource: lb-secgrp }
- { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
- floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+ floating_network: {{ openshift_openstack_external_network_name }}
{% endif %}
- volume_size: {{ openstack_lb_volume_size }}
-{% if not openstack_provider_network_name %}
+ volume_size: {{ openshift_openstack_lb_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
@@ -630,7 +630,7 @@ resources:
masters:
type: OS::Heat::ResourceGroup
properties:
- count: {{ openstack_num_masters }}
+ count: {{ openshift_openstack_num_masters }}
resource_def:
type: server.yaml
properties:
@@ -638,23 +638,23 @@ resources:
str_replace:
template: k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- k8s_type: {{ openstack_master_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ k8s_type: {{ openshift_openstack_master_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: masters
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: master
- image: {{ openstack_master_image }}
- flavor: {{ openstack_master_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_master_image }}
+ flavor: {{ openshift_openstack_master_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -662,7 +662,7 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% if openshift_use_flannel|default(False)|bool %}
attach_data_net: true
data_net: { get_resource: data_net }
@@ -670,12 +670,12 @@ resources:
{% endif %}
{% endif %}
secgrp:
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
- { get_resource: flat-secgrp }
{% else %}
- { get_resource: master-secgrp }
- { get_resource: node-secgrp }
-{% if openstack_num_etcd|int == 0 %}
+{% if openshift_openstack_num_etcd|int == 0 %}
- { get_resource: etcd-secgrp }
{% endif %}
{% endif %}
@@ -684,16 +684,16 @@ resources:
if:
- no_floating
- null
- - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+ - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
attach_float_net: false
{% endif %}
- volume_size: {{ openstack_master_volume_size }}
-{% if openstack_master_server_group_policies|length > 0 %}
+ volume_size: {{ openshift_openstack_master_volume_size }}
+{% if openshift_openstack_master_server_group_policies|length > 0 %}
scheduler_hints:
group: { get_resource: master_server_group }
{% endif %}
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
@@ -701,9 +701,9 @@ resources:
compute_nodes:
type: OS::Heat::ResourceGroup
properties:
- count: {{ openstack_num_nodes }}
+ count: {{ openshift_openstack_num_nodes }}
removal_policies:
- - resource_list: {{ openstack_nodes_to_remove }}
+ - resource_list: {{ openshift_openstack_nodes_to_remove }}
resource_def:
type: server.yaml
properties:
@@ -711,28 +711,28 @@ resources:
str_replace:
template: sub_type_k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- sub_type_k8s_type: {{ openstack_node_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ sub_type_k8s_type: {{ openshift_openstack_node_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: nodes
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: node
subtype: app
node_labels:
-{% for k, v in openshift_cluster_node_labels.app.iteritems() %}
+{% for k, v in openshift_openstack_cluster_node_labels.app.iteritems() %}
{{ k|e }}: {{ v|e }}
{% endfor %}
- image: {{ openstack_node_image }}
- flavor: {{ openstack_node_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_node_image }}
+ flavor: {{ openshift_openstack_node_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -740,7 +740,7 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% if openshift_use_flannel|default(False)|bool %}
attach_data_net: true
data_net: { get_resource: data_net }
@@ -748,18 +748,18 @@ resources:
{% endif %}
{% endif %}
secgrp:
- - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}node-secgrp{% endif %} }
+ - { get_resource: {% if openshift_openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}node-secgrp{% endif %} }
- { get_resource: common-secgrp }
floating_network:
if:
- no_floating
- null
- - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+ - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
attach_float_net: false
{% endif %}
- volume_size: {{ openstack_node_volume_size }}
-{% if not openstack_provider_network_name %}
+ volume_size: {{ openshift_openstack_node_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
@@ -767,7 +767,7 @@ resources:
infra_nodes:
type: OS::Heat::ResourceGroup
properties:
- count: {{ openstack_num_infra }}
+ count: {{ openshift_openstack_num_infra }}
resource_def:
type: server.yaml
properties:
@@ -775,28 +775,28 @@ resources:
str_replace:
template: sub_type_k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- sub_type_k8s_type: {{ openstack_infra_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ sub_type_k8s_type: {{ openshift_openstack_infra_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: infra
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: node
subtype: infra
node_labels:
-{% for k, v in openshift_cluster_node_labels.infra.iteritems() %}
+{% for k, v in openshift_openstack_cluster_node_labels.infra.iteritems() %}
{{ k|e }}: {{ v|e }}
{% endfor %}
- image: {{ openstack_infra_image }}
- flavor: {{ openstack_infra_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_infra_image }}
+ flavor: {{ openshift_openstack_infra_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -804,7 +804,7 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% if openshift_use_flannel|default(False)|bool %}
attach_data_net: true
data_net: { get_resource: data_net }
@@ -813,34 +813,34 @@ resources:
{% endif %}
secgrp:
# TODO(bogdando) filter only required node rules into infra-secgrp
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
- { get_resource: flat-secgrp }
{% else %}
- { get_resource: node-secgrp }
{% endif %}
-{% if openshift_ui_ssh_tunnel|bool and openstack_num_masters|int < 2 %}
+{% if openshift_openstack_ui_ssh_tunnel|bool and openshift_openstack_num_masters|int < 2 %}
- { get_resource: lb-secgrp }
{% endif %}
- { get_resource: infra-secgrp }
- { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
- floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+ floating_network: {{ openshift_openstack_external_network_name }}
{% endif %}
- volume_size: {{ openstack_infra_volume_size }}
-{% if openstack_infra_server_group_policies|length > 0 %}
+ volume_size: {{ openshift_openstack_infra_volume_size }}
+{% if openshift_openstack_infra_server_group_policies|length > 0 %}
scheduler_hints:
group: { get_resource: infra_server_group }
{% endif %}
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
dns:
type: OS::Heat::ResourceGroup
properties:
- count: {{ openstack_num_dns }}
+ count: {{ openshift_openstack_num_dns }}
resource_def:
type: server.yaml
properties:
@@ -848,23 +848,23 @@ resources:
str_replace:
template: k8s_type-%index%.cluster_id
params:
- cluster_id: {{ stack_name }}
- k8s_type: {{ openstack_dns_hostname }}
- cluster_env: {{ public_dns_domain }}
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
+ k8s_type: {{ openshift_openstack_dns_hostname }}
+ cluster_env: {{ openshift_openstack_public_dns_domain }}
+ cluster_id: {{ openshift_openstack_stack_name }}
group:
str_replace:
template: k8s_type.cluster_id
params:
k8s_type: dns
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
type: dns
- image: {{ openstack_dns_image }}
- flavor: {{ openstack_dns_flavor }}
- key_name: {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
- net: {{ openstack_provider_network_name }}
- net_name: {{ openstack_provider_network_name }}
+ image: {{ openshift_openstack_dns_image }}
+ flavor: {{ openshift_openstack_dns_flavor }}
+ key_name: {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+ net: {{ openshift_openstack_provider_network_name }}
+ net_name: {{ openshift_openstack_provider_network_name }}
{% else %}
net: { get_resource: net }
subnet: { get_resource: subnet }
@@ -872,16 +872,16 @@ resources:
str_replace:
template: openshift-ansible-cluster_id-net
params:
- cluster_id: {{ stack_name }}
+ cluster_id: {{ openshift_openstack_stack_name }}
{% endif %}
secgrp:
- { get_resource: dns-secgrp }
- { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
- floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+ floating_network: {{ openshift_openstack_external_network_name }}
{% endif %}
- volume_size: {{ openstack_dns_volume_size }}
-{% if not openstack_provider_network_name %}
+ volume_size: {{ openshift_openstack_dns_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
depends_on:
- interface
{% endif %}
diff --git a/roles/openshift_openstack/templates/heat_stack_server.yaml.j2 b/roles/openshift_openstack/templates/heat_stack_server.yaml.j2
index 160345baf..a829da34f 100644
--- a/roles/openshift_openstack/templates/heat_stack_server.yaml.j2
+++ b/roles/openshift_openstack/templates/heat_stack_server.yaml.j2
@@ -61,7 +61,7 @@ parameters:
label: Net name
description: Net name
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
subnet:
type: string
label: Subnet ID
@@ -81,7 +81,7 @@ parameters:
label: Net ID
description: Net resource
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
data_subnet:
type: string
default: ''
@@ -102,7 +102,7 @@ parameters:
label: Attach-float-net
description: A switch for floating network port connection
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
floating_network:
type: string
default: ''
@@ -156,7 +156,7 @@ outputs:
- server
- addresses
- { get_param: net_name }
-{% if openstack_provider_network_name %}
+{% if openshift_openstack_provider_network_name %}
- 0
{% else %}
- 1
@@ -226,7 +226,7 @@ resources:
type: OS::Neutron::Port
properties:
network: { get_param: net }
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
fixed_ips:
- subnet: { get_param: subnet }
{% endif %}
@@ -239,13 +239,13 @@ resources:
properties:
network: { get_param: data_net }
port_security_enabled: false
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
fixed_ips:
- subnet: { get_param: data_subnet }
{% endif %}
{% endif %}
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
floating-ip:
condition: { not: no_floating }
type: OS::Neutron::FloatingIP
@@ -254,7 +254,7 @@ resources:
port_id: { get_resource: port }
{% endif %}
-{% if not ephemeral_volumes|default(false)|bool %}
+{% if not openshift_openstack_ephemeral_volumes|default(false)|bool %}
cinder_volume:
type: OS::Cinder::Volume
properties: