Don't set heat_stack_user_role to empty string
[apex-tripleo-heat-templates.git] / puppet / ceph-storage-puppet.yaml
index e3fa56b..245d8eb 100644 (file)
@@ -33,6 +33,15 @@ parameters:
     description: Mapping of service_name -> network name. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  UpdateIdentifier:
+    default: ''
+    type: string
+    description: >
+      Setting to a previously unused value during stack-update will trigger
+      package update on all nodes
+  Hostname:
+    type: string
+    default: '' # Defaults to Heat created hostname
 
 resources:
   CephStorage:
@@ -46,6 +55,7 @@ resources:
         - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
       user_data: {get_resource: NodeUserData}
+      name: {get_param: Hostname}
 
   NodeUserData:
     type: OS::TripleO::NodeUserData
@@ -80,6 +90,7 @@ resources:
 
   CephStorageDeployment:
     type: OS::Heat::StructuredDeployment
+    depends_on: NetworkDeployment
     properties:
       config: {get_resource: CephStorageConfig}
       server: {get_resource: CephStorage}
@@ -116,11 +127,23 @@ resources:
                 ceph::profile::params::cluster_network: {get_input: ceph_cluster_network}
                 ceph::profile::params::public_network: {get_input: ceph_public_network}
 
+  UpdateConfig:
+    type: OS::TripleO::Tasks::PackageUpdate
+
+  UpdateDeployment:
+    type: OS::Heat::SoftwareDeployment
+    properties:
+      config: {get_resource: UpdateConfig}
+      server: {get_resource: CephStorage}
+      input_values:
+        update_identifier:
+          get_param: UpdateIdentifier
+
 outputs:
   hosts_entry:
     value:
       str_replace:
-        template: "IP HOST"
+        template: "IP HOST.localdomain HOST"
         params:
           IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
           HOST: {get_attr: [CephStorage, name]}
@@ -134,3 +157,7 @@ outputs:
   storage_mgmt_ip_address:
     description: IP address of the server in the storage_mgmt network
     value: {get_attr: [StorageMgmtPort, ip_address]}
+  config_identifier:
+    description: identifier which changes if the node configuration may need re-applying
+    value: {get_attr: [CephStorageDeployment, deploy_stdout]}
+