Merge "Output the SSL Certificate and Key modulus"
[apex-tripleo-heat-templates.git] / puppet / swift-storage.yaml
index f6623be..b1746dc 100644 (file)
@@ -45,8 +45,9 @@ parameters:
     type: string
     hidden: true
   NtpServer:
-    type: string
     default: ''
+    description: Comma-separated list of ntp servers
+    type: comma_delimited_list
   EnablePackageInstall:
     default: 'false'
     description: Set to true to enable package installation via Puppet
@@ -76,7 +77,11 @@ parameters:
     description: |
       Role specific additional hiera configuration to inject into the cluster.
     type: json
-
+  NetworkDeploymentActions:
+    type: comma_delimited_list
+    description: >
+      Heat action when to apply network configuration changes
+    default: ['CREATE']
 
 resources:
 
@@ -148,6 +153,7 @@ resources:
     properties:
       config: {get_resource: NetworkConfig}
       server: {get_resource: SwiftStorage}
+      actions: {get_param: NetworkDeploymentActions}
 
   SwiftStorageHieraConfig:
     type: OS::Heat::StructuredConfig
@@ -207,15 +213,26 @@ resources:
         swift_min_part_hours: {get_param: MinPartHours}
         swift_part_power: {get_param: PartPower}
         swift_replicas: { get_param: Replicas}
-        ntp_servers:
-          str_replace:
-            template: '["server"]'
-            params:
-              server: {get_param: NtpServer}
+        ntp_servers: {get_param: NtpServer}
         enable_package_install: {get_param: EnablePackageInstall}
         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
         swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
 
+  # Resource for site-specific injection of root certificate
+  NodeTLSCAData:
+    depends_on: SwiftStorageHieraDeploy
+    type: OS::TripleO::NodeTLSCAData
+    properties:
+      server: {get_resource: SwiftStorage}
+
+  # Hook for site-specific additional pre-deployment config,
+  # applying to all nodes, e.g node registration/unregistration
+  NodeExtraConfig:
+    depends_on: NodeTLSCAData
+    type: OS::TripleO::NodeExtraConfig
+    properties:
+        server: {get_resource: SwiftStorage}
+
   UpdateConfig:
     type: OS::TripleO::Tasks::PackageUpdate
 
@@ -262,4 +279,5 @@ outputs:
       list_join:
         - ','
         - - {get_attr: [SwiftStorageHieraDeploy, deploy_stdout]}
+          - {get_attr: [NodeTLSCAData, deploy_stdout]}
           - {get_param: UpdateIdentifier}