Merge "Enable internal TLS for ceilometer"
[apex-tripleo-heat-templates.git] / overcloud.j2.yaml
index 6d655c7..d8d38c2 100644 (file)
@@ -214,8 +214,19 @@ resources:
       EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
       DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
 
+  {{role.name}}HostsDeployment:
+    type: OS::Heat::StructuredDeployments
+    properties:
+      name: {{role.name}}HostsDeployment
+      config: {get_attr: [hostsConfig, config_id]}
+      servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
+
   {{role.name}}AllNodesDeployment:
     type: OS::Heat::StructuredDeployments
+    depends_on:
+{% for role_inner in roles %}
+      - {{role_inner.name}}HostsDeployment
+{% endfor %}
     properties:
       name: {{role.name}}AllNodesDeployment
       config: {get_attr: [allNodesConfig, config_id]}
@@ -303,6 +314,16 @@ resources:
           MonitoringSubscriptions: {get_attr: [{{role.name}}ServiceChain, role_data, monitoring_subscriptions]}
 {% endfor %}
 
+  hostsConfig:
+    type: OS::TripleO::Hosts::SoftwareConfig
+    properties:
+      hosts:
+{% for role in roles %}
+        - list_join:
+            - '\n'
+            - {get_attr: [{{role.name}}, hosts_entry]}
+{% endfor %}
+
   allNodesConfig:
     type: OS::TripleO::AllNodes::SoftwareConfig
     properties:
@@ -311,12 +332,6 @@ resources:
       cloud_name_storage: {get_param: CloudNameStorage}
       cloud_name_storage_mgmt: {get_param: CloudNameStorageManagement}
       cloud_name_ctlplane: {get_param: CloudNameCtlplane}
-      hosts:
-{% for role in roles %}
-        - list_join:
-            - '\n'
-            - {get_attr: [{{role.name}}, hosts_entry]}
-{% endfor %}
       enabled_services:
         list_join:
           - ','
@@ -517,6 +532,10 @@ resources:
   # Post deployment steps for all roles
   AllNodesDeploySteps:
     type: OS::TripleO::PostDeploySteps
+{% for role in roles %}
+    depends_on:
+      - {{role.name}}AllNodesDeployment
+{% endfor %}
     properties:
       servers:
 {% for role in roles %}
@@ -558,6 +577,9 @@ outputs:
   GnocchiInternalVip:
     description: VIP for Gnocchi API internal endpoint
     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, GnocchiApiNetwork]}]}
+  MistralInternalVip:
+    description: VIP for Mistral API internal endpoint
+    value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MistralApiNetwork]}]}
   HeatInternalVip:
     description: VIP for Heat API internal endpoint
     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, HeatApiNetwork]}]}
@@ -596,7 +618,36 @@ outputs:
       The content that should be appended to your /etc/hosts if you want to get
       hostname-based access to the deployed nodes (useful for testing without
       setting up a DNS).
-    value: {get_attr: [allNodesConfig, hosts_entries]}
+    value:
+      list_join:
+      - "\n"
+      - - {get_attr: [hostsConfig, hosts_entries]}
+      -
+        - str_replace:
+            template: IP  HOST
+            params:
+              IP: {get_attr: [VipMap, net_ip_map, external]}
+              HOST: {get_param: CloudName}
+        - str_replace:
+            template: IP  HOST
+            params:
+              IP: {get_attr: [VipMap, net_ip_map, ctlplane]}
+              HOST: {get_param: CloudNameCtlplane}
+        - str_replace:
+            template: IP  HOST
+            params:
+              IP: {get_attr: [VipMap, net_ip_map, internal_api]}
+              HOST: {get_param: CloudNameInternal}
+        - str_replace:
+            template: IP  HOST
+            params:
+              IP: {get_attr: [VipMap, net_ip_map, storage]}
+              HOST: {get_param: CloudNameStorage}
+        - str_replace:
+            template: IP  HOST
+            params:
+              IP: {get_attr: [VipMap, net_ip_map, storage_mgmt]}
+              HOST: {get_param: CloudNameStorageManagement}
   EnabledServices:
     description: The services enabled on each role
     value: