Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / cinder-volume.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Cinder Volume service configured with Puppet
5
6 parameters:
7   CinderEnableNfsBackend:
8     default: false
9     description: Whether to enable or not the NFS backend for Cinder
10     type: boolean
11   CinderEnableIscsiBackend:
12     default: true
13     description: Whether to enable or not the Iscsi backend for Cinder
14     type: boolean
15   CinderEnableRbdBackend:
16     default: false
17     description: Whether to enable or not the Rbd backend for Cinder
18     type: boolean
19   CinderISCSIHelper:
20     default: lioadm
21     description: The iSCSI helper to use with cinder.
22     type: string
23   CinderISCSIProtocol:
24     default: iscsi
25     description: Whether to use TCP ('iscsi') or iSER RDMA ('iser') for iSCSI
26     type: string
27   CinderLVMLoopDeviceSize:
28     default: 10280
29     description: The size of the loopback file used by the cinder LVM driver.
30     type: number
31   CinderNfsMountOptions:
32     default: ''
33     description: >
34       Mount options for NFS mounts used by Cinder NFS backend. Effective
35       when CinderEnableNfsBackend is true.
36     type: string
37   CinderNfsServers:
38     default: ''
39     description: >
40       NFS servers used by Cinder NFS backend. Effective when
41       CinderEnableNfsBackend is true.
42     type: comma_delimited_list
43   CinderNasSecureFileOperations:
44     default: false
45     description: >
46       Controls whether security enhanced NFS file operations are enabled.
47       Valid values are 'auto', 'true' or 'false'. Effective when
48       CinderEnableNfsBackend is true.
49     type: string
50   CinderNasSecureFilePermissions:
51     default: false
52     description: >
53       Controls whether security enhanced NFS file permissions are enabled.
54       Valid values are 'auto', 'true' or 'false'. Effective when
55       CinderEnableNfsBackend is true.
56     type: string
57   CinderRbdPoolName:
58     default: volumes
59     type: string
60   CephClientUserName:
61     default: openstack
62     type: string
63   ServiceData:
64     default: {}
65     description: Dictionary packing service data
66     type: json
67   ServiceNetMap:
68     default: {}
69     description: Mapping of service_name -> network name. Typically set
70                  via parameter_defaults in the resource registry.  This
71                  mapping overrides those in ServiceNetMapDefaults.
72     type: json
73   DefaultPasswords:
74     default: {}
75     type: json
76   RoleName:
77     default: ''
78     description: Role name on which the service is applied
79     type: string
80   RoleParameters:
81     default: {}
82     description: Parameters specific to the role
83     type: json
84   EndpointMap:
85     default: {}
86     description: Mapping of service endpoint -> protocol. Typically set
87                  via parameter_defaults in the resource registry.
88     type: json
89   MonitoringSubscriptionCinderVolume:
90     default: 'overcloud-cinder-volume'
91     type: string
92   CinderVolumeLoggingSource:
93     type: json
94     default:
95       tag: openstack.cinder.volume
96       path: /var/log/cinder/cinder-volume.log
97
98 resources:
99
100   CinderBase:
101     type: ./cinder-base.yaml
102     properties:
103       ServiceData: {get_param: ServiceData}
104       ServiceNetMap: {get_param: ServiceNetMap}
105       DefaultPasswords: {get_param: DefaultPasswords}
106       EndpointMap: {get_param: EndpointMap}
107       RoleName: {get_param: RoleName}
108       RoleParameters: {get_param: RoleParameters}
109
110 outputs:
111   role_data:
112     description: Role data for the Cinder Volume role.
113     value:
114       service_name: cinder_volume
115       monitoring_subscription: {get_param: MonitoringSubscriptionCinderVolume}
116       logging_source: {get_param: CinderVolumeLoggingSource}
117       logging_groups:
118         - cinder
119       config_settings:
120         map_merge:
121           - get_attr: [CinderBase, role_data, config_settings]
122           - tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
123             tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
124             tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
125             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
126             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers: {get_param: CinderNfsServers}
127             tripleo::profile::base::cinder::volume::nfs::cinder_nas_secure_file_operations: {get_param: CinderNasSecureFileOperations}
128             tripleo::profile::base::cinder::volume::nfs::cinder_nas_secure_file_permissions: {get_param: CinderNasSecureFilePermissions}
129             tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
130             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
131             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_protocol: {get_param: CinderISCSIProtocol}
132             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
133             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
134             tripleo.cinder_volume.firewall_rules:
135               '120 iscsi initiator':
136                 dport: 3260
137             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
138             # for the given network; replacement examples (eg. for internal_api):
139             # internal_api -> IP
140             # internal_api_uri -> [IP]
141             # internal_api_subnet - > IP/CIDR
142             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_param: [ServiceNetMap, CinderIscsiNetwork]}
143       step_config: |
144         include ::tripleo::profile::base::cinder::volume
145       upgrade_tasks:
146         - name: Check if cinder_volume is deployed
147           command: systemctl is-enabled openstack-cinder-volume
148           tags: common
149           ignore_errors: True
150           register: cinder_volume_enabled
151         - name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
152           shell: /usr/bin/systemctl show 'openstack-cinder-volume' --property ActiveState | grep '\bactive\b'
153           when: cinder_volume_enabled.rc == 0
154           tags: step0,validation
155         - name: Stop cinder_volume service
156           tags: step1
157           when: cinder_volume_enabled.rc == 0
158           service: name=openstack-cinder-volume state=stopped