9f49bc06875ede0b48f98b18bd104412c20ea20c
[apex-tripleo-heat-templates.git] / puppet / services / cinder-volume.yaml
1 heat_template_version: 2016-04-08
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   CinderLVMLoopDeviceSize:
24     default: 10280
25     description: The size of the loopback file used by the cinder LVM driver.
26     type: number
27   CinderNfsMountOptions:
28     default: ''
29     description: >
30       Mount options for NFS mounts used by Cinder NFS backend. Effective
31       when CinderEnableNfsBackend is true.
32     type: string
33   CinderNfsServers:
34     default: ''
35     description: >
36       NFS servers used by Cinder NFS backend. Effective when
37       CinderEnableNfsBackend is true.
38     type: comma_delimited_list
39   CinderRbdPoolName:
40     default: volumes
41     type: string
42   CephClientUserName:
43     default: openstack
44     type: string
45   EndpointMap:
46     default: {}
47     description: Mapping of service endpoint -> protocol. Typically set
48                  via parameter_defaults in the resource registry.
49     type: json
50
51 resources:
52
53   CinderBase:
54     type: ./cinder-base.yaml
55     properties:
56       EndpointMap: {get_param: EndpointMap}
57
58 outputs:
59   role_data:
60     description: Role data for the Cinder Volume role.
61     value:
62       service_name: cinder_volume
63       config_settings:
64         map_merge:
65           - get_attr: [CinderBase, role_data, config_settings]
66           - tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
67             tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
68             tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
69             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
70             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers:
71               str_replace:
72                 template: SERVERS
73                 params:
74                   SERVERS: {get_param: CinderNfsServers}
75             tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
76             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
77             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
78             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
79             tripleo.cinder_volume.firewall_rules:
80               '120 iscsi initiator':
81                 dport: 3260
82       step_config: |
83         include ::tripleo::profile::base::cinder::volume