82e16f39754201a98b3c3d5a45cece80e063dc1d
[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   DefaultPasswords:
52     default: {}
53     type: json
54   EndpointMap:
55     default: {}
56     description: Mapping of service endpoint -> protocol. Typically set
57                  via parameter_defaults in the resource registry.
58     type: json
59   MonitoringSubscriptionCinderVolume:
60     default: 'overcloud-cinder-volume'
61     type: string
62   CinderVolumeLoggingSource:
63     type: json
64     default:
65       tag: openstack.cinder.volume
66       path: /var/log/cinder/cinder-volume.log
67
68 resources:
69
70   CinderBase:
71     type: ./cinder-base.yaml
72     properties:
73       ServiceNetMap: {get_param: ServiceNetMap}
74       DefaultPasswords: {get_param: DefaultPasswords}
75       EndpointMap: {get_param: EndpointMap}
76
77 outputs:
78   role_data:
79     description: Role data for the Cinder Volume role.
80     value:
81       service_name: cinder_volume
82       monitoring_subscription: {get_param: MonitoringSubscriptionCinderVolume}
83       logging_source: {get_param: CinderVolumeLoggingSource}
84       logging_groups:
85         - cinder
86       config_settings:
87         map_merge:
88           - get_attr: [CinderBase, role_data, config_settings]
89           - tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
90             tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
91             tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
92             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: {get_param: CinderNfsMountOptions}
93             tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers:
94               str_replace:
95                 template: SERVERS
96                 params:
97                   SERVERS: {get_param: CinderNfsServers}
98             tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
99             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper}
100             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
101             tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
102             tripleo.cinder_volume.firewall_rules:
103               '120 iscsi initiator':
104                 dport: 3260
105             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
106             # for the given network; replacement examples (eg. for internal_api):
107             # internal_api -> IP
108             # internal_api_uri -> [IP]
109             # internal_api_subnet - > IP/CIDR
110             tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_param: [ServiceNetMap, CinderIscsiNetwork]}
111       step_config: |
112         include ::tripleo::profile::base::cinder::volume