Add metricd workers support in gnocchi
[apex-tripleo-heat-templates.git] / puppet / cinder-storage.yaml
index 7d00ffa..a66ea08 100644 (file)
@@ -1,9 +1,11 @@
-heat_template_version: 2015-04-30
+heat_template_version: 2016-10-14
 description: 'OpenStack cinder storage configured by Puppet'
 parameters:
-  Image:
-    default: overcloud-cinder-volume
+  BlockStorageImage:
+    default: overcloud-full
     type: string
+    constraints:
+      - custom_constraint: glance.image
   ExtraConfig:
     default: {}
     description: |
@@ -18,27 +20,16 @@ parameters:
   BlockStorageIPs:
     default: {}
     type: json
-  Flavor:
+  OvercloudBlockStorageFlavor:
     description: Flavor for block storage nodes to request when deploying.
     type: string
+    default: baremetal
     constraints:
       - custom_constraint: nova.flavor
   KeyName:
     default: default
     description: Name of an existing Nova key pair to enable SSH access to the instances
     type: string
-  SnmpdReadonlyUserName:
-    default: ro_snmp_user
-    description: The user name for SNMPd with readonly rights running on all Overcloud nodes
-    type: string
-  SnmpdReadonlyUserPassword:
-    description: The user password for SNMPd with readonly rights running on all Overcloud nodes
-    type: string
-    hidden: true
-  EnablePackageInstall:
-    default: 'false'
-    description: Set to true to enable package installation via Puppet
-    type: boolean
   UpdateIdentifier:
     default: ''
     type: string
@@ -57,6 +48,11 @@ 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
   NetworkDeploymentActions:
     type: comma_delimited_list
     description: >
@@ -70,7 +66,6 @@ parameters:
     constraints:
     - allowed_values: [POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL, ZAQAR_MESSAGE]
   CloudDomain:
-    default: ''
     type: string
     description: >
       The DNS domain used for the hosts. This should match the dhcp_domain
@@ -81,7 +76,7 @@ parameters:
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
-  SchedulerHints:
+  BlockStorageSchedulerHints:
     type: json
     description: Optional scheduler hints to pass to nova
     default: {}
@@ -91,14 +86,33 @@ parameters:
   ServiceConfigSettings:
     type: json
     default: {}
+  ServiceNames:
+    type: comma_delimited_list
+    default: []
+  MonitoringSubscriptions:
+    type: comma_delimited_list
+    default: []
+  ConfigCommand:
+    type: string
+    description: Command which will be run whenever configuration data changes
+    default: os-refresh-config --timeout 14400
+  LoggingSources:
+    type: json
+    default: []
+  LoggingGroups:
+    type: comma_delimited_list
+    default: []
 
 resources:
   BlockStorage:
-    type: OS::Nova::Server
+    type: OS::TripleO::Server
+    metadata:
+      os-collect-config:
+        command: {get_param: ConfigCommand}
     properties:
       image:
-        {get_param: Image}
-      flavor: {get_param: Flavor}
+        {get_param: BlockStorageImage}
+      flavor: {get_param: OvercloudBlockStorageFlavor}
       key_name: {get_param: KeyName}
       networks:
         - network: ctlplane
@@ -110,7 +124,7 @@ resources:
             params: {get_param: HostnameMap}
       software_config_transport: {get_param: SoftwareConfigTransport}
       metadata: {get_param: ServerMetadata}
-      scheduler_hints: {get_param: SchedulerHints}
+      scheduler_hints: {get_param: BlockStorageSchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
@@ -224,14 +238,6 @@ resources:
       server: {get_resource: BlockStorage}
       config: {get_resource: BlockStorageConfig}
       input_values:
-        snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
-        snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
-        cinder_iscsi_ip_address:
-          str_replace:
-            template: "'IP'"
-            params:
-              IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
-        enable_package_install: {get_param: EnablePackageInstall}
         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
 
   # Map heat metadata into hiera datafiles
@@ -246,36 +252,33 @@ resources:
             - heat_config_%{::deploy_config_name}
             - volume_extraconfig
             - extraconfig
+            - service_names
             - service_configs
             - volume
+            - bootstrap_node # provided by allNodesConfig
             - all_nodes # provided by allNodesConfig
+            - vip_data # provided by allNodesConfig
             - '"%{::osfamily}"'
-            - common
-            - network
           merge_behavior: deeper
           datafiles:
+            service_names:
+              mapped_data:
+                service_names: {get_param: ServiceNames}
+                sensu::subscriptions: {get_param: MonitoringSubscriptions}
             service_configs:
-              mapped_data: {get_param: ServiceConfigSettings}
-            common:
-              raw_data: {get_file: hieradata/common.yaml}
-            network:
               mapped_data:
-                net_ip_map: {get_attr: [NetIpMap, net_ip_map]}
-                net_ip_subnet_map: {get_attr: [NetIpMap, net_ip_subnet_map]}
-                net_ip_uri_map: {get_attr: [NetIpMap, net_ip_uri_map]}
+                map_replace:
+                  - {get_param: ServiceConfigSettings}
+                  - values: {get_attr: [NetIpMap, net_ip_map]}
             volume_extraconfig:
               mapped_data: {get_param: BlockStorageExtraConfig}
             extraconfig:
               mapped_data: {get_param: ExtraConfig}
             volume:
-              raw_data: {get_file: hieradata/volume.yaml}
               mapped_data:
-                # Cinder
-                tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_ip_address: {get_input: cinder_iscsi_ip_address}
-                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}
+                tripleo::profile::base::logging::fluentd::fluentd_sources: {get_param: LoggingSources}
+                tripleo::profile::base::logging::fluentd::fluentd_groups: {get_param: LoggingGroups}
 
   # Resource for site-specific injection of root certificate
   NodeTLSCAData:
@@ -306,6 +309,12 @@ resources:
           get_param: UpdateIdentifier
 
 outputs:
+  ip_address:
+    description: IP address of the server in the ctlplane network
+    value: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+  hostname:
+    description: Hostname of the server
+    value: {get_attr: [BlockStorage, name]}
   hosts_entry:
     value:
       str_replace:
@@ -317,6 +326,7 @@ outputs:
           STORAGE_MGMTIP STORAGE_MGMTHOST.DOMAIN STORAGE_MGMTHOST
           TENANTIP TENANTHOST.DOMAIN TENANTHOST
           MANAGEMENTIP MANAGEMENTHOST.DOMAIN MANAGEMENTHOST
+          CTLPLANEIP CTLPLANEHOST.DOMAIN CTLPLANEHOST
         params:
           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
           DOMAIN: {get_param: CloudDomain}
@@ -357,6 +367,12 @@ outputs:
             - '.'
             - - {get_attr: [BlockStorage, name]}
               - management
+          CTLPLANEIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+          CTLPLANEHOST:
+            list_join:
+            - '.'
+            - - {get_attr: [BlockStorage, name]}
+              - ctlplane
   nova_server_resource:
     description: Heat resource handle for the block storage server
     value:
@@ -379,11 +395,3 @@ outputs:
   management_ip_address:
     description: IP address of the server in the management network
     value: {get_attr: [ManagementPort, ip_address]}
-  config_identifier:
-    description: identifier which changes if the node configuration may need re-applying
-    value:
-      list_join:
-        - ''
-        - - {get_attr: [BlockStorageDeployment, deploy_stdout]}
-          - {get_attr: [NodeTLSCAData, deploy_stdout]}
-          - {get_param: UpdateIdentifier}