Merge "Allow a user to disable MongoDB journaling"
[apex-tripleo-heat-templates.git] / puppet / ceph-storage-puppet.yaml
index 4bba126..2d08941 100644 (file)
@@ -39,6 +39,9 @@ parameters:
     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:
@@ -52,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
@@ -72,6 +76,12 @@ resources:
       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
+  NetIpMap:
+    type: OS::TripleO::Network::Ports::NetIpMap
+    properties:
+      StorageIp: {get_attr: [StoragePort, ip_address]}
+      StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
+
   NetIpSubnetMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
@@ -86,6 +96,7 @@ resources:
 
   CephStorageDeployment:
     type: OS::Heat::StructuredDeployment
+    depends_on: NetworkDeployment
     properties:
       config: {get_resource: CephStorageConfig}
       server: {get_resource: CephStorage}
@@ -140,7 +151,7 @@ outputs:
       str_replace:
         template: "IP HOST.localdomain HOST"
         params:
-          IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephStorageHostnameResolveNetwork]}]}
           HOST: {get_attr: [CephStorage, name]}
   nova_server_resource:
     description: Heat resource handle for the ceph storage server
@@ -152,3 +163,6 @@ 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]}