summaryrefslogtreecommitdiffstats
path: root/tools/cicdansible/heat
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cicdansible/heat')
-rw-r--r--tools/cicdansible/heat/installer.yaml16
-rw-r--r--tools/cicdansible/heat/instance.yaml17
-rw-r--r--tools/cicdansible/heat/node.yaml4
3 files changed, 36 insertions, 1 deletions
diff --git a/tools/cicdansible/heat/installer.yaml b/tools/cicdansible/heat/installer.yaml
index 7b3f10c0..1f65f73f 100644
--- a/tools/cicdansible/heat/installer.yaml
+++ b/tools/cicdansible/heat/installer.yaml
@@ -94,6 +94,11 @@ parameters:
type: boolean
label: "use volume for nfs storage"
description: "Indicates whether a cinder volume should be used for nfs storage or not. If not checked, the nfs would be stored in the root disk"
+ demo_network:
+ label: "demo net id"
+ type: string
+ description: "specifies id of network used for demo usecases"
+ default: ""
conditions:
#Condition for nfs volume usage.
use_volume_for_nfs: { get_param: use_volume_for_nfs }
@@ -201,6 +206,7 @@ resources:
flavor_name: { get_param: node_flavor_name }
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
+ demo_network: { get_param: demo_network }
scheduler_hints:
group: { get_resource: anti_affinity_group }
depends_on: [routercon, instance_wait_handle]
@@ -243,6 +249,7 @@ resources:
notify_command: { get_attr: ["instance_wait_handle", "curl_cli"] }
security_group: { get_resource: secgroup }
scheduler_hints: {}
+ demo_network: { get_param: demo_network }
depends_on: [instance_wait_handle]
#Volume attachment for infra node.
resources_storage_attachment:
@@ -309,6 +316,15 @@ resources:
- []
#Output values
outputs:
+ network_name:
+ value: {get_attr: [privnet, name] }
+ description: "Name of private network"
+ network_id:
+ value: { get_resource: privnet }
+ description: "ID of private network"
+ subnet_id:
+ value: { get_resource: privsubnet }
+ description: "ID of private subnet"
installer_ip:
value: { get_attr: [installer, ip] }
description: "Internal ip of installer instance"
diff --git a/tools/cicdansible/heat/instance.yaml b/tools/cicdansible/heat/instance.yaml
index 5429eb6e..7d9715f7 100644
--- a/tools/cicdansible/heat/instance.yaml
+++ b/tools/cicdansible/heat/instance.yaml
@@ -21,6 +21,16 @@ parameters:
scheduler_hints:
type: json
default: {}
+ demo_network:
+ type: string
+ default: ""
+conditions:
+ #Condition for demo network connection
+ connect_demo_net:
+ not:
+ equals:
+ - get_param: demo_network
+ - ""
#Resources.
resources:
#This is the network port to attach instance to.
@@ -48,8 +58,13 @@ resources:
image: { get_param: image_name }
flavor: { get_param: flavor_name }
key_name: { get_param: key_name }
+ config_drive: true
networks:
- - port: { get_resource: port }
+ if:
+ - "connect_demo_net"
+ - - port: { get_resource: port }
+ - network: { get_param: demo_network }
+ - - port: { get_resource: port }
user_data_format: SOFTWARE_CONFIG
user_data: { get_resource: config }
scheduler_hints: { get_param: scheduler_hints }
diff --git a/tools/cicdansible/heat/node.yaml b/tools/cicdansible/heat/node.yaml
index cd628eec..12097770 100644
--- a/tools/cicdansible/heat/node.yaml
+++ b/tools/cicdansible/heat/node.yaml
@@ -22,6 +22,9 @@ parameters:
type: string
scheduler_hints:
type: json
+ demo_network:
+ type: string
+ default: ""
resources:
#Volume for storing /var/lib/docker for node.
docker_storage:
@@ -45,6 +48,7 @@ resources:
notify_command: { get_param: notify_command }
security_group: { get_param: security_group }
scheduler_hints: { get_param: scheduler_hints }
+ demo_network: { get_param: demo_network }
#Attachment of docker volume to node.
docker_storage_attachment:
type: OS::Cinder::VolumeAttachment