Merge "scenario001: containerize services for CI"
[apex-tripleo-heat-templates.git] / puppet / controller-role.yaml
index 9bf110d..09e5b2b 100644 (file)
@@ -58,9 +58,13 @@ parameters:
     type: string
     constraints:
       - custom_constraint: nova.keypair
+  NeutronPhysicalBridge:
+    default: 'br-ex'
+    description: An OVS bridge to create for accessing external networks.
+    type: string
   NeutronPublicInterface:
     default: nic1
-    description: What interface to bridge onto br-ex for network nodes.
+    description: Which interface to add to the NeutronPhysicalBridge.
     type: string
   ServiceNetMap:
     default: {}
@@ -104,8 +108,8 @@ parameters:
     default: 'localdomain'
     type: string
     description: >
-      The DNS domain used for the hosts. This should match the dhcp_domain
-      configured in the Undercloud neutron. Defaults to localdomain.
+      The DNS domain used for the hosts. This must match the
+      overcloud_domain_name configured on the undercloud.
   ControllerServerMetadata:
     default: {}
     description: >
@@ -171,6 +175,28 @@ parameters:
       Map of server hostnames to blacklist from any triggered
       deployments. If the value is 1, the server will be blacklisted. This
       parameter is generated from the parent template.
+  RoleParameters:
+    type: json
+    description: Role Specific Parameters
+  DeploymentSwiftDataMap:
+    type: json
+    description: |
+      Map of servers to Swift container and object for storing deployment data.
+      The keys are the Heat assigned hostnames, and the value is a map of the
+      container/object name in Swift. Example value:
+        overcloud-controller-0:
+          container: overcloud-controller
+          object: 0
+        overcloud-controller-1:
+          container: overcloud-controller
+          object: 1
+        overcloud-controller-2:
+          container: overcloud-controller
+          object: 2
+        overcloud-novacompute-0:
+          container: overcloud-compute
+          object: 0
+    default: {}
 
 parameter_groups:
 - label: deprecated
@@ -184,7 +210,12 @@ conditions:
       equals:
         - {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
         - 1
-
+  deployment_swift_data_map_unset:
+    equals:
+      - get_param:
+          - DeploymentSwiftDataMap
+          - {get_param: Hostname}
+      - ""
 
 resources:
 
@@ -214,6 +245,12 @@ resources:
           - {get_param: ControllerServerMetadata}
           - {get_param: ServiceMetadataSettings}
       scheduler_hints: {get_param: ControllerSchedulerHints}
+      deployment_swift_data:
+        if:
+          - deployment_swift_data_map_unset
+          - {}
+          - {get_param: [DeploymentSwiftDataMap,
+                         {get_param: Hostname}]}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
@@ -401,6 +438,8 @@ resources:
     type: OS::TripleO::Controller::PreNetworkConfig
     properties:
       server: {get_resource: Controller}
+      RoleParameters: {get_param: RoleParameters}
+      ServiceNames: {get_param: ServiceNames}
 
   NetworkConfig:
     type: OS::TripleO::Controller::Net::SoftwareConfig
@@ -415,15 +454,18 @@ resources:
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
-    condition: server_not_blacklisted
     depends_on: PreNetworkConfig
     properties:
       name: NetworkDeployment
       config: {get_resource: NetworkConfig}
       server: {get_resource: Controller}
-      actions: {get_param: NetworkDeploymentActions}
+      actions:
+        if:
+          - server_not_blacklisted
+          - {get_param: NetworkDeploymentActions}
+          - []
       input_values:
-        bridge_name: br-ex
+        bridge_name: {get_param: NeutronPhysicalBridge}
         interface_name: {get_param: NeutronPublicInterface}
 
   # Resource for site-specific injection of root certificate
@@ -457,19 +499,27 @@ resources:
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
   ControllerUpgradeInitDeployment:
     type: OS::Heat::SoftwareDeployment
-    condition: server_not_blacklisted
     depends_on: NetworkDeployment
     properties:
       name: ControllerUpgradeInitDeployment
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
       server: {get_resource: Controller}
       config: {get_resource: ControllerUpgradeInitConfig}
 
   ControllerDeployment:
     type: OS::TripleO::SoftwareDeployment
-    condition: server_not_blacklisted
     depends_on: ControllerUpgradeInitDeployment
     properties:
       name: ControllerDeployment
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
       config: {get_resource: ControllerConfig}
       server: {get_resource: Controller}
       input_values:
@@ -486,6 +536,7 @@ resources:
         hierarchy:
           - '"%{::uuid}"'
           - heat_config_%{::deploy_config_name}
+          - config_step
           - controller_extraconfig
           - extraconfig
           - service_configs
@@ -529,6 +580,7 @@ resources:
             fqdn_tenant: {get_attr: [NetHostMap, value, tenant, fqdn]}
             fqdn_management: {get_attr: [NetHostMap, value, management, fqdn]}
             fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
+            fqdn_external: {get_attr: [NetHostMap, value, external, fqdn]}
 
   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
   ControllerExtraConfigPre:
@@ -550,10 +602,14 @@ resources:
 
   UpdateDeployment:
     type: OS::Heat::SoftwareDeployment
-    condition: server_not_blacklisted
     depends_on: NetworkDeployment
     properties:
       name: UpdateDeployment
+      actions:
+        if:
+          - server_not_blacklisted
+          - ['CREATE', 'UPDATE']
+          - []
       config: {get_resource: UpdateConfig}
       server: {get_resource: Controller}
       input_values:
@@ -675,3 +731,6 @@ CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY"
   tls_cert_modulus_md5:
     description: MD5 checksum of the TLS Certificate Modulus
     value: {get_attr: [NodeTLSData, cert_modulus_md5]}
+  os_collect_config:
+    description: The os-collect-config configuration associated with this server resource
+    value: {get_attr: [Controller, os_collect_config]}