Merge "Remove hardcoded references to .novalocal in hostnames"
[apex-tripleo-heat-templates.git] / puppet / cinder-storage-puppet.yaml
index 104130b..708f6a9 100644 (file)
@@ -1,5 +1,5 @@
 heat_template_version: 2014-10-16
-description: 'Block Storage Configuration w/ Puppet'
+description: 'OpenStack cinder storage configured by Puppet'
 parameters:
   Image:
     default: overcloud-cinder-volume
@@ -16,6 +16,10 @@ parameters:
     default: 5000
     description: The size of the loopback file used by the cinder LVM driver.
     type: number
+  Debug:
+    default: ''
+    description: Set to True to enable debugging on all services.
+    type: string
   VirtualIP:
     default: ''
     type: string
@@ -71,10 +75,10 @@ parameters:
     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
     type: string
   RabbitPassword:
-    default: ''
+    default: 'guest'
     type: string
   RabbitUserName:
-    default: ''
+    default: 'guest'
     type: string
   RabbitClientUseSSL:
     default: false
@@ -111,9 +115,22 @@ 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
@@ -121,6 +138,7 @@ resources:
       server: {get_resource: BlockStorage}
       config: {get_resource: BlockStorageConfig}
       input_values:
+        debug: {get_param: Debug}
         cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: VirtualIP} , '/cinder']]}
         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
@@ -158,6 +176,7 @@ resources:
           hierarchy:
             - heat_config_%{::deploy_config_name}
             - volume
+            - '"%{::osfamily}"'
             - common
           datafiles:
             common:
@@ -168,6 +187,7 @@ resources:
                 cinder_iscsi_ip_address: local-ipv4
               mapped_data:
                 # Cinder
+                cinder::debug: {get_input: debug}
                 cinder::setup_test_volume::size: {get_input: cinder_lvm_loop_device_size}
                 cinder_iscsi_helper: {get_input: cinder_iscsi_helper}
                 cinder::database_connection: {get_input: cinder_dsn}
@@ -186,7 +206,7 @@ outputs:
   hosts_entry:
     value:
       str_replace:
-        template: "IP HOST HOST.novalocal"
+        template: "IP HOST"
         params:
           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
           HOST: {get_attr: [BlockStorage, name]}