Merge "Enables support for configuring Cinder with Dell EMC ScaleIO storage backend."
[apex-tripleo-heat-templates.git] / puppet / services / ceph-external.yaml
1 heat_template_version: ocata
2
3 description: >
4   Ceph External service.
5
6 parameters:
7   CephClientKey:
8     description: The Ceph client key. Can be created with ceph-authtool --gen-print-key. Currently only used for external Ceph deployments to create the openstack user keyring.
9     type: string
10     hidden: true
11   CephClientUserName:
12     default: openstack
13     type: string
14   CephClusterFSID:
15     type: string
16     description: The Ceph cluster FSID. Must be a UUID.
17   CephExternalMonHost:
18     default: ''
19     type: string
20     description: List of externally managed Ceph Mon Host IPs. Only used for external Ceph deployments.
21   CinderRbdPoolName:
22     default: volumes
23     type: string
24   CinderBackupRbdPoolName:
25     default: backups
26     type: string
27   GlanceRbdPoolName:
28     default: images
29     type: string
30   GlanceBackend:
31     default: swift
32     description: The short name of the Glance backend to use. Should be one
33       of swift, rbd, or file
34     type: string
35     constraints:
36     - allowed_values: ['swift', 'file', 'rbd']
37   GnocchiRbdPoolName:
38     default: metrics
39     type: string
40   NovaEnableRbdBackend:
41     default: false
42     description: Whether to enable or not the Rbd backend for Nova
43     type: boolean
44   NovaRbdPoolName:
45     default: vms
46     type: string
47   ServiceNetMap:
48     default: {}
49     description: Mapping of service_name -> network name. Typically set
50                  via parameter_defaults in the resource registry.  This
51                  mapping overrides those in ServiceNetMapDefaults.
52     type: json
53   DefaultPasswords:
54     default: {}
55     type: json
56   EndpointMap:
57     default: {}
58     description: Mapping of service endpoint -> protocol. Typically set
59                  via parameter_defaults in the resource registry.
60     type: json
61   MonitoringSubscriptionCephExternal:
62     default: 'overcloud-ceph-external'
63     type: string
64   RbdDefaultFeatures:
65     default: ''
66     description: The default features enabled when creating a block device
67                  image. Only applies to format 2 images. Set to '1' for Jewel
68                  clients using older Ceph servers.
69     type: string
70
71 conditions:
72   glance_multiple_locations:
73     and:
74     - equals:
75       - get_param: GlanceBackend
76       - rbd
77     - equals:
78       - get_param: NovaEnableRbdBackend
79       - true
80
81 outputs:
82   role_data:
83     description: Role data for the Ceph External service.
84     value:
85       service_name: ceph_external
86       monitoring_subscription: {get_param: MonitoringSubscriptionCephExternal}
87       config_settings:
88         tripleo::profile::base::ceph::ceph_mon_host: {get_param: CephExternalMonHost}
89         ceph::profile::params::fsid: {get_param: CephClusterFSID}
90         ceph::profile::params::rbd_default_features: {get_param: RbdDefaultFeatures}
91         ceph::profile::params::client_keys:
92           map_replace:
93             - CEPH_CLIENT_KEY:
94                 secret: {get_param: CephClientKey}
95                 mode: '0644'
96                 cap_mon: 'allow r'
97                 cap_osd:
98                   str_replace:
99                     template: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=CINDERBACKUP_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL, allow rwx pool=GNOCCHI_POOL'
100                     params:
101                       NOVA_POOL: {get_param: NovaRbdPoolName}
102                       CINDER_POOL: {get_param: CinderRbdPoolName}
103                       CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
104                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
105                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
106             - keys:
107                 CEPH_CLIENT_KEY:
108                   list_join: ['.', ['client', {get_param: CephClientUserName}]]
109         ceph::profile::params::manage_repo: false
110         # FIXME(gfidente): we should not have to list the packages explicitly in
111         # the templates, but this should stay until the following is fixed:
112         # https://bugs.launchpad.net/puppet-ceph/+bug/1629933
113         ceph::params::packages:
114           - ceph-base
115           - ceph-mon
116           - ceph-osd
117       service_config_settings:
118         glance_api:
119           glance::api::show_multiple_locations: {if: [glance_multiple_locations, true, false]}
120       step_config: |
121         include ::tripleo::profile::base::ceph::client