Reuse the various service passwords as db passwords.
[apex-tripleo-heat-templates.git] / cinder-storage.yaml
index 3a93849..98123b8 100644 (file)
@@ -16,6 +16,11 @@ parameters:
     default: 5000
     description: The size of the loopback file used by the cinder LVM driver.
     type: number
+  CinderPassword:
+    default: unset
+    description: The password for the cinder service and db account, used by cinder-api.
+    type: string
+    hidden: true
   VirtualIP:
     default: ''
     type: string
@@ -103,9 +108,23 @@ resources:
         {get_param: Image}
       flavor: {get_param: Flavor}
       key_name: {get_param: KeyName}
-      user_data_format: SOFTWARE_CONFIG
       networks:
         - network: ctlplane
+      user_data_format: SOFTWARE_CONFIG
+      user_data: {get_resource: NodeUserData}
+
+  NodeUserData:
+    type: OS::TripleO::NodeUserData
+
+  NetworkConfig:
+    type: OS::TripleO::BlockStorage::Net::SoftwareConfig
+
+  NetworkDeployment:
+    type: OS::TripleO::SoftwareDeployment
+    properties:
+      config: {get_attr: [NetworkConfig, config_id]}
+      server: {get_resource: BlockStorage}
+
   BlockStorageDeployment:
     type: OS::Heat::StructuredDeployment
     properties:
@@ -113,7 +132,7 @@ resources:
       config: {get_resource: BlockStorageConfig}
       input_values:
         controller_virtual_ip: {get_param: VirtualIP}
-        cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: VirtualIP} , '/cinder']]}
+        cinder_dsn: {list_join: ['', ['mysql://cinder:', {get_param: CinderPassword}, '@', {get_param: VirtualIP} , '/cinder']]}
         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
       signal_transport: NO_SIGNAL