summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/cicdansible/group_vars/all.yml2
-rw-r--r--tools/cicdansible/heat/installer.yaml7
-rw-r--r--tools/cicdansible/heat/instance.yaml3
-rw-r--r--tools/cicdansible/heat/node.yaml3
-rw-r--r--tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml1
5 files changed, 16 insertions, 0 deletions
diff --git a/tools/cicdansible/group_vars/all.yml b/tools/cicdansible/group_vars/all.yml
index 4d044662..141bc5f1 100644
--- a/tools/cicdansible/group_vars/all.yml
+++ b/tools/cicdansible/group_vars/all.yml
@@ -26,6 +26,8 @@ infra_flavor_name: ""
installer_flavor_name: ""
#Name of the image for instances.
image_name: ""
+#Name of openstack availability zone to use for instances
+availability_zone: "nova"
#Whether to use a volume for /dockerdata-nfs or to use ephemeral disk.
#True by default, most openstack providers offer ssd volumes probably.
use_volume_for_nfs: true
diff --git a/tools/cicdansible/heat/installer.yaml b/tools/cicdansible/heat/installer.yaml
index 101c5263..885bc8af 100644
--- a/tools/cicdansible/heat/installer.yaml
+++ b/tools/cicdansible/heat/installer.yaml
@@ -34,6 +34,10 @@ parameters:
constraints:
- custom_constraint: glance.image
description: "must specify a valid image name"
+ availability_zone:
+ label: "availability zone"
+ description: "availability zone to use for scheduling instances"
+ type: string
subnet_cidr:
label: "private subnet cidr"
description: "Cidr of a private subnet instances will be connected to"
@@ -213,6 +217,7 @@ resources:
network: { get_resource: privnet }
subnet: { get_resource: privsubnet }
flavor_name: { get_param: node_flavor_name }
+ availability_zone: { get_param: availability_zone }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
demo_network: { get_param: demo_network }
@@ -255,6 +260,7 @@ resources:
subnet: { get_resource: privsubnet }
key_name: { get_resource: key }
flavor_name: { get_param: infra_flavor_name }
+ availability_zone: { get_param: availability_zone }
image_name: { get_param: image_name }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
@@ -280,6 +286,7 @@ resources:
instance_name: installer
image_name: { get_param: image_name }
flavor_name: { get_param: installer_flavor_name }
+ availability_zone: { get_param: availability_zone }
key_name: { get_resource: key }
network: { get_resource: privnet }
subnet: { get_resource: privsubnet }
diff --git a/tools/cicdansible/heat/instance.yaml b/tools/cicdansible/heat/instance.yaml
index 7d9715f7..30d8eea0 100644
--- a/tools/cicdansible/heat/instance.yaml
+++ b/tools/cicdansible/heat/instance.yaml
@@ -24,6 +24,8 @@ parameters:
demo_network:
type: string
default: ""
+ availability_zone:
+ type: string
conditions:
#Condition for demo network connection
connect_demo_net:
@@ -57,6 +59,7 @@ resources:
name: { get_param: instance_name }
image: { get_param: image_name }
flavor: { get_param: flavor_name }
+ availability_zone: { get_param: availability_zone }
key_name: { get_param: key_name }
config_drive: true
networks:
diff --git a/tools/cicdansible/heat/node.yaml b/tools/cicdansible/heat/node.yaml
index bee089fe..95622280 100644
--- a/tools/cicdansible/heat/node.yaml
+++ b/tools/cicdansible/heat/node.yaml
@@ -27,6 +27,8 @@ parameters:
default: ""
docker_storage_size:
type: number
+ availability_zone:
+ type: string
resources:
#Volume for storing /var/lib/docker for node.
docker_storage:
@@ -47,6 +49,7 @@ resources:
network: { get_param: network }
subnet: { get_param: subnet }
flavor_name: { get_param: flavor_name }
+ availability_zone: { get_param: availability_zone }
notify_command: { get_param: notify_command }
security_group: { get_param: security_group }
scheduler_hints: { get_param: scheduler_hints }
diff --git a/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml
index 609306b0..7fb2984b 100644
--- a/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml
+++ b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/heat.yml
@@ -30,6 +30,7 @@
node_flavor_name: "{{ node_flavor_name }}"
infra_flavor_name: "{{ infra_flavor_name }}"
installer_flavor_name: "{{ installer_flavor_name }}"
+ availability_zone: "{{ availability_zone }}"
node_ip: "{{ floating_ips_by_address[first_node_ip].id }}"
infra_ip: "{{ floating_ips_by_address[infra_ip].id }}"
installer_ip: "{{ floating_ips_by_address[installer_ip].id }}"