a438c1886da868a592ba7bdb3377b9b65aa51be8
[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   ServiceNetMap:
46     default: {}
47     description: Mapping of service_name -> network name. Typically set
48                  via parameter_defaults in the resource registry.  This
49                  mapping overrides those in ServiceNetMapDefaults.
50     type: json
51   EndpointMap:
52     default: {}
53     description: Mapping of service endpoint -> protocol. Typically set
54                  via parameter_defaults in the resource registry.
55     type: json
56
57 resources:
58
59   CinderBase:
60     type: ./cinder-base.yaml
61     properties:
62       ServiceNetMap: {get_param: ServiceNetMap}
63       EndpointMap: {get_param: EndpointMap}
64
65 outputs:
66   role_data:
67     description: Role data for the Cinder Volume role.
68     value:
69       service_name: cinder_volume
70       config_settings:
71         map_merge:
72           - get_attr: [CinderBase, role_data, config_settings]
73           - tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
74             tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
75             tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
76             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
77             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers:
78               str_replace:
79                 template: SERVERS
80                 params:
81                   SERVERS: {get_param: CinderNfsServers}
82             tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
83             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
84             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
85             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
86             tripleo.cinder_volume.firewall_rules:
87               '120 iscsi initiator':
88                 dport: 3260
89       step_config: |
90         include ::tripleo::profile::base::cinder::volume