Introduce network-based FQDNs via hiera
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Mon, 28 Nov 2016 10:58:25 +0000 (12:58 +0200)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Thu, 1 Dec 2016 09:08:41 +0000 (11:08 +0200)
Currently, one can get the network-based FQDNs via a custom puppet
fact. This is currently unreliable, as it's based on the ::hostname
fact which we assume it's set correctly by nova. However, this is not
necessarily the case (for instance, if you use pre-deployed services
such as we do with the multinode-jobs). In these cases, the
::hostname fact will return something other than what we specified in
nova, and effectively breaks the configurations in we relly too much
on the network-based FQDN facts.

By using hiera instead, we avoid this issue as we set those values to
be exactly what we expect (as we set them in the OS::TripleO::Server
resource.

Change-Id: I6ce31237098f57bdc0adfd3c42feef0073c224fb

puppet/blockstorage-role.yaml
puppet/cephstorage-role.yaml
puppet/compute-role.yaml
puppet/controller-role.yaml
puppet/objectstorage-role.yaml
puppet/role.role.j2.yaml

index 45552e0..c9bf894 100644 (file)
@@ -266,6 +266,42 @@ resources:
           extraconfig: {get_param: ExtraConfig}
           volume:
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [BlockStorage, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
 
   # Resource for site-specific injection of root certificate
   NodeTLSCAData:
index 03b57e2..18787a2 100644 (file)
@@ -271,6 +271,42 @@ resources:
           extraconfig: {get_param: ExtraConfig}
           ceph:
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [CephStorage, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
 
   # Resource for site-specific injection of root certificate
   NodeTLSCAData:
index 1346433..f359bf7 100644 (file)
@@ -284,6 +284,42 @@ resources:
           extraconfig: {get_param: ExtraConfig}
           compute:
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [NovaCompute, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
 
   NovaComputeDeployment:
     type: OS::TripleO::SoftwareDeployment
index 09e10ea..77b54ff 100644 (file)
@@ -344,6 +344,42 @@ resources:
             # Misc
             tripleo::haproxy::service_certificate: {get_attr: [NodeTLSData, deployed_ssl_certificate_path]}
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [Controller, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
 
   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
   ControllerExtraConfigPre:
index 533cd2c..60c12c3 100644 (file)
@@ -255,6 +255,43 @@ resources:
           extraconfig: {get_param: ExtraConfig}
           object:
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [SwiftStorage, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
+
 
   SwiftStorageHieraDeploy:
     type: OS::Heat::StructuredDeployment
index c2c322d..a09ed40 100644 (file)
@@ -279,6 +279,42 @@ resources:
             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
             tripleo::profile::base::logging::fluentd::fluentd_sources: {get_param: LoggingSources}
             tripleo::profile::base::logging::fluentd::fluentd_groups: {get_param: LoggingGroups}
+            fqdn_internal_api:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - internalapi
+                - {get_param: CloudDomain}
+            fqdn_storage:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - storage
+                - {get_param: CloudDomain}
+            fqdn_storage_mgmt:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - storagemgmt
+                - {get_param: CloudDomain}
+            fqdn_tenant:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - tenant
+                - {get_param: CloudDomain}
+            fqdn_management:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - management
+                - {get_param: CloudDomain}
+            fqdn_ctlplane:
+              list_join:
+              - '.'
+              - - {get_attr: [{{role}}, name]}
+                - ctlplane
+                - {get_param: CloudDomain}
 
   # Resource for site-specific injection of root certificate
   NodeTLSCAData: