Define node's hostname in the cloud-init instead of defining in heat template
PROD-37076
Change-Id: I16465da4fd4791c589ec0dcf007636a93660a87f
diff --git a/tcp_tests/templates/_heat_environments/fragments/Compute.yaml b/tcp_tests/templates/_heat_environments/fragments/Compute.yaml
index 6efefa2..a49d700 100644
--- a/tcp_tests/templates/_heat_environments/fragments/Compute.yaml
+++ b/tcp_tests/templates/_heat_environments/fragments/Compute.yaml
@@ -88,8 +88,6 @@
user_data_format: RAW
user_data:
str_replace:
- #template: { get_file: underlay--user-data-cfg01--heat.yaml }
- #template: { get_file: ../underlay-userdata.yaml }
template: { get_param: underlay_userdata }
params:
hostname: { list_join: ['.', [ { get_param: instance_name }, { get_param: instance_domain } ]] }
diff --git a/tcp_tests/templates/_heat_environments/fragments/Instance.yaml b/tcp_tests/templates/_heat_environments/fragments/Instance.yaml
index 7fadf2d..91274bd 100644
--- a/tcp_tests/templates/_heat_environments/fragments/Instance.yaml
+++ b/tcp_tests/templates/_heat_environments/fragments/Instance.yaml
@@ -68,13 +68,11 @@
flavor: { get_param: instance_flavor }
image: { list_join: ['', [ 'ubuntu-vcp-', { get_param: mcp_version } ]] }
key_name: { get_param: key_pair }
- #hostname: { get_param: instance_name }
availability_zone: { get_param: availability_zone }
- name: { get_param: instance_name }
-# name:
-# list_join:
-# - '.'
-# - [ { get_param: instance_name }, { get_param: instance_domain } ]
+ name:
+ list_join:
+ - '.'
+ - [ { get_param: instance_name }, { get_param: instance_domain } ]
networks:
- port: { get_resource: instance_port01 }
- port: { get_resource: instance_port02 }
@@ -83,12 +81,9 @@
user_data_format: RAW
user_data:
str_replace:
- #template: { get_file: underlay--user-data-cfg01--heat.yaml }
template: { get_param: underlay_userdata }
- #template: { get_file: ../../templates/{ get_param: lab_config_name }/underlay-userdata.yaml }
params:
- hostname: { get_param: instance_name }
-# hostname: { list_join: ['.', [ { get_param: instance_name }, { get_param: instance_domain } ]] }
+ hostname: { list_join: [ '.', [ { get_param: instance_name }, { get_param: instance_domain } ] ] }
$node_hostname: { get_param: instance_name }
$node_domain: { get_param: instance_domain }
$config_host: { get_param: instance_config_host }
diff --git a/tcp_tests/templates/_heat_environments/fragments/Instance2Volumes.yaml b/tcp_tests/templates/_heat_environments/fragments/Instance2Volumes.yaml
index 94b75e4..b24df09 100644
--- a/tcp_tests/templates/_heat_environments/fragments/Instance2Volumes.yaml
+++ b/tcp_tests/templates/_heat_environments/fragments/Instance2Volumes.yaml
@@ -107,11 +107,10 @@
image: { list_join: ['', [ 'ubuntu-vcp-', { get_param: mcp_version } ]] }
key_name: { get_param: key_pair }
availability_zone: { get_param: availability_zone }
- name: { get_param: instance_name }
-# name:
-# list_join:
-# - '.'
-# - [ { get_param: instance_name }, { get_param: instance_domain } ]
+ name:
+ list_join:
+ - '.'
+ - [ { get_param: instance_name }, { get_param: instance_domain } ]
networks:
- port: { get_resource: instance_port01 }
- port: { get_resource: instance_port02 }
@@ -120,9 +119,7 @@
user_data_format: RAW
user_data:
str_replace:
- #template: { get_file: underlay--user-data-cfg01--heat.yaml }
template: { get_param: underlay_userdata }
- #template: { get_file: ../../templates/{ get_param: lab_config_name }/underlay-userdata.yaml }
params:
hostname: { list_join: ['.', [ { get_param: instance_name }, { get_param: instance_domain } ]] }
$node_hostname: { get_param: instance_name }
diff --git a/tcp_tests/templates/bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml b/tcp_tests/templates/bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/bm-cicd-pike-ovs-maas/underlay-userdata.yaml b/tcp_tests/templates/bm-cicd-pike-ovs-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/bm-cicd-pike-ovs-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/bm-cicd-pike-ovs-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/bm-cicd-queens-ovs-maas/underlay-userdata.yaml b/tcp_tests/templates/bm-cicd-queens-ovs-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/bm-cicd-queens-ovs-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/bm-cicd-queens-ovs-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/underlay-userdata.yaml b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/bm-e7-cicd-pike-odl-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/underlay-userdata.yaml b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/bm-e7-cicd-pike-ovs-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-bm-cicd-pike-contrail-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-bm-cicd-pike-contrail-sl/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/heat-bm-cicd-pike-contrail-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-bm-cicd-pike-contrail-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-bm-cicd-queens-contrail-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-bm-cicd-queens-contrail-sl/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/heat-bm-cicd-queens-contrail-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-bm-cicd-queens-contrail-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-cicd-pike-contrail-stb-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-cicd-pike-contrail-stb-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100755
--- a/tcp_tests/templates/heat-cicd-pike-contrail-stb-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-contrail-stb-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-dvr-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-cicd-queens-contrail41-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay-userdata.yaml b/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/heat-cicd-queens-dvr-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/released-bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml b/tcp_tests/templates/released-bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
index bb6338c..144be09 100644
--- a/tcp_tests/templates/released-bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
+++ b/tcp_tests/templates/released-bm-b300-cicd-queens-ovs-maas/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/released-heat-cicd-pike-contrail41-sl/underlay-userdata.yaml b/tcp_tests/templates/released-heat-cicd-pike-contrail41-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/released-heat-cicd-pike-contrail41-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/released-heat-cicd-pike-contrail41-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/released-heat-cicd-pike-dvr-sl/underlay-userdata.yaml b/tcp_tests/templates/released-heat-cicd-pike-dvr-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/released-heat-cicd-pike-dvr-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/released-heat-cicd-pike-dvr-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/released-heat-cicd-queens-contrail41-sl/underlay-userdata.yaml b/tcp_tests/templates/released-heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/released-heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/released-heat-cicd-queens-contrail41-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root
diff --git a/tcp_tests/templates/released-heat-cicd-queens-dvr-sl/underlay-userdata.yaml b/tcp_tests/templates/released-heat-cicd-queens-dvr-sl/underlay-userdata.yaml
index a0ddfdd..4d8b30f 100644
--- a/tcp_tests/templates/released-heat-cicd-queens-dvr-sl/underlay-userdata.yaml
+++ b/tcp_tests/templates/released-heat-cicd-queens-dvr-sl/underlay-userdata.yaml
@@ -1,5 +1,6 @@
#cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+fqdn: $node_hostname.$node_domain
ssh_pwauth: True
users:
- name: root