Remove unsafe "unset" defaults
[apex-tripleo-heat-templates.git] / puppet / cinder-storage.yaml
index bf024aa..3e232ba 100644 (file)
@@ -17,7 +17,6 @@ parameters:
     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
@@ -44,14 +43,6 @@ parameters:
     type: string
     constraints:
       - custom_constraint: nova.flavor
-  GlancePort:
-    default: "9292"
-    description: Glance port.
-    type: string
-  GlanceProtocol:
-    default: http
-    description: Protocol to use when connecting to glance, set to https for SSL.
-    type: string
   KeyName:
     default: default
     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
@@ -59,6 +50,7 @@ parameters:
   RabbitPassword:
     default: 'guest'
     type: string
+    hidden: true
   RabbitUserName:
     default: 'guest'
     type: string
@@ -77,13 +69,13 @@ parameters:
     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
     type: string
   SnmpdReadonlyUserPassword:
-    default: unset
     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
     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
@@ -102,12 +94,35 @@ parameters:
     description: Mapping of service_name -> network name. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
   GlanceApiVirtualIP:
     type: string
     default: ''
   MysqlVirtualIP:
     type: string
     default: ''
+  NetworkDeploymentActions:
+    type: comma_delimited_list
+    description: >
+      Heat action when to apply network configuration changes
+    default: ['CREATE']
+  CloudDomain:
+    default: ''
+    type: string
+    description: >
+      The DNS domain used for the hosts. This should match the dhcp_domain
+      configured in the Undercloud neutron. Defaults to localdomain.
+  ServerMetadata:
+    default: {}
+    description: >
+      Extra properties or metadata passed to Nova for the created nodes in
+      the overcloud. It's accessible via the Nova metadata API.
+    type: json
+
 
 resources:
   BlockStorage:
@@ -122,6 +137,7 @@ resources:
       user_data_format: SOFTWARE_CONFIG
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
+      metadata: {get_param: ServerMetadata}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
@@ -179,6 +195,7 @@ resources:
     properties:
       config: {get_resource: NetworkConfig}
       server: {get_resource: BlockStorage}
+      actions: {get_param: NetworkDeploymentActions}
 
   BlockStorageDeployment:
     type: OS::Heat::StructuredDeployment
@@ -199,24 +216,14 @@ resources:
         cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
         cinder_iscsi_ip_address: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
-        glance_api_servers:
-          list_join:
-            - ''
-            - - {get_param: GlanceProtocol}
-              - '://'
-              - {get_param: GlanceApiVirtualIP}
-              - ':'
-              - {get_param: GlancePort}
+        glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
         rabbit_client_port: {get_param: RabbitClientPort}
-        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]}
 
   # Map heat metadata into hiera datafiles
   BlockStorageConfig:
@@ -258,13 +265,21 @@ resources:
                 cinder::glance::glance_api_servers: {get_input: glance_api_servers}
                 ntp::servers: {get_input: ntp_servers}
                 tripleo::packages::enable_install: {get_input: enable_package_install}
+                tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
 
+  # Resource for site-specific injection of root certificate
+  NodeTLSCAData:
+    depends_on: BlockStorageDeployment
+    type: OS::TripleO::NodeTLSCAData
+    properties:
+      server: {get_resource: BlockStorage}
+
   # Hook for site-specific additional pre-deployment config,
   # applying to all nodes, e.g node registration/unregistration
   NodeExtraConfig:
-    depends_on: BlockStorageDeployment
+    depends_on: NodeTLSCAData
     type: OS::TripleO::NodeExtraConfig
     properties:
         server: {get_resource: BlockStorage}
@@ -285,9 +300,10 @@ outputs:
   hosts_entry:
     value:
       str_replace:
-        template: "IP HOST.localdomain HOST"
+        template: "IP HOST.DOMAIN HOST"
         params:
           IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
+          DOMAIN: {get_param: CloudDomain}
           HOST: {get_attr: [BlockStorage, name]}
   nova_server_resource:
     description: Heat resource handle for the block storage server
@@ -304,4 +320,9 @@ outputs:
     value: {get_attr: [StorageMgmtPort, ip_address]}
   config_identifier:
     description: identifier which changes if the node configuration may need re-applying
-    value: {get_attr: [BlockStorageDeployment, deploy_stdout]}
+    value:
+      list_join:
+        - ''
+        - - {get_attr: [BlockStorageDeployment, deploy_stdout]}
+          - {get_attr: [NodeTLSCAData, deploy_stdout]}
+          - {get_param: UpdateIdentifier}