Adds network/cidr mapping into a new service property
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / cinder-volume.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Cinder Volume service with Pacemaker configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33
34 resources:
35
36   CinderVolumeBase:
37     type: ../cinder-volume.yaml
38     properties:
39       ServiceData: {get_param: ServiceData}
40       ServiceNetMap: {get_param: ServiceNetMap}
41       DefaultPasswords: {get_param: DefaultPasswords}
42       EndpointMap: {get_param: EndpointMap}
43       RoleName: {get_param: RoleName}
44       RoleParameters: {get_param: RoleParameters}
45
46 outputs:
47   role_data:
48     description: Role data for the Cinder Volume role.
49     value:
50       service_name: cinder_volume
51       monitoring_subscription: {get_attr: [CinderVolumeBase, role_data, monitoring_subscription]}
52       logging_source: {get_attr: [CinderVolumeBase, role_data, logging_source]}
53       logging_groups: {get_attr: [CinderVolumeBase, role_data, logging_groups]}
54       config_settings:
55         map_merge:
56           - get_attr: [CinderVolumeBase, role_data, config_settings]
57           - cinder::volume::manage_service: false
58             cinder::volume::enabled: false
59             cinder::host: hostgroup
60       step_config:
61         include ::tripleo::profile::pacemaker::cinder::volume
62       upgrade_tasks:
63         - name: Stop cinder_volume service (pacemaker)
64           tags: step1
65           pacemaker_resource:
66             resource: openstack-cinder-volume
67             state: disable
68             wait_for_resource: true
69         - name: Sync cinder DB
70           tags: step5
71           command: cinder-manage db sync
72         - name: Start cinder_volume service (pacemaker)
73           tags: step5
74           pacemaker_resource:
75             resource: openstack-cinder-volume
76             state: enable