Remove osd_pool_default_min_size to allow Ceph cluster to do the right thing by default
[apex-tripleo-heat-templates.git] / puppet / services / ceph-base.yaml
1 heat_template_version: ocata
2
3 description: >
4   Ceph base service. Shared by all Ceph services.
5
6 parameters:
7   # NOTE(gfidente): needs a default to cope with external Ceph deployments were we don't pass (and need) an Admin key
8   CephAdminKey:
9     default: ''
10     description: The Ceph admin client key. Can be created with ceph-authtool --gen-print-key.
11     type: string
12     hidden: true
13   CephClientKey:
14     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.
15     type: string
16     hidden: true
17   CephClientUserName:
18     default: openstack
19     type: string
20   CephClusterFSID:
21     type: string
22     description: The Ceph cluster FSID. Must be a UUID.
23   CinderRbdPoolName:
24     default: volumes
25     type: string
26   CinderBackupRbdPoolName:
27     default: backups
28     type: string
29   GlanceRbdPoolName:
30     default: images
31     type: string
32   GlanceBackend:
33     default: swift
34     description: The short name of the Glance backend to use. Should be one
35       of swift, rbd, or file
36     type: string
37     constraints:
38     - allowed_values: ['swift', 'file', 'rbd']
39   GnocchiRbdPoolName:
40     default: metrics
41     type: string
42   NovaEnableRbdBackend:
43     default: false
44     description: Whether to enable or not the Rbd backend for Nova
45     type: boolean
46   NovaRbdPoolName:
47     default: vms
48     type: string
49   ServiceNetMap:
50     default: {}
51     description: Mapping of service_name -> network name. Typically set
52                  via parameter_defaults in the resource registry.  This
53                  mapping overrides those in ServiceNetMapDefaults.
54     type: json
55   DefaultPasswords:
56     default: {}
57     type: json
58   EndpointMap:
59     default: {}
60     description: Mapping of service endpoint -> protocol. Typically set
61                  via parameter_defaults in the resource registry.
62     type: json
63   # DEPRECATED options for compatibility with overcloud.yaml
64   # This should be removed and manipulation of the ControllerServices list
65   # used instead, but we need client support for that first
66   ControllerEnableCephStorage:
67     default: false
68     description: Whether to deploy Ceph Storage (OSD) on the Controller
69     type: boolean
70
71 parameter_groups:
72 - label: deprecated
73   description: Do not use deprecated params, they will be removed.
74   parameters:
75   - ControllerEnableCephStorage
76
77 conditions:
78   glance_multiple_locations:
79     and:
80     - equals:
81       - get_param: GlanceBackend
82       - rbd
83     - equals:
84       - get_param: NovaEnableRbdBackend
85       - true
86
87 outputs:
88   role_data:
89     description: Role data for the Ceph base service.
90     value:
91       service_name: ceph_base
92       config_settings:
93         tripleo::profile::base::ceph::enable_ceph_storage: {get_param: ControllerEnableCephStorage}
94         ceph::profile::params::osds: {/srv/data: {}}
95         ceph::profile::params::manage_repo: false
96         ceph::profile::params::authentication_type: cephx
97         ceph::profile::params::fsid: {get_param: CephClusterFSID}
98         # FIXME(gfidente): we should not have to list the packages explicitly in the templates,
99         # but this has to stay until https://bugs.launchpad.net/puppet-ceph/+bug/1629933 is fixed
100         ceph::params::packages:
101           - ceph-base
102           - ceph-mon
103           - ceph-osd
104         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
105         # for the given network; replacement examples (eg. for internal_api):
106         # internal_api -> IP
107         # internal_api_uri -> [IP]
108         # internal_api_subnet - > IP/CIDR
109         ceph::profile::params::cluster_network:
110           str_replace:
111             template: "NETWORK_subnet"
112             params:
113               NETWORK: {get_param: [ServiceNetMap, CephClusterNetwork]}
114         ceph::profile::params::public_network:
115           str_replace:
116             template: "NETWORK_subnet"
117             params:
118               NETWORK: {get_param: [ServiceNetMap, CephMonNetwork]}
119         ceph::profile::params::public_addr: {get_param: [ServiceNetMap, CephMonNetwork]}
120         ceph::profile::params::client_keys:
121           map_replace:
122             - client.admin:
123                 secret: {get_param: CephAdminKey}
124                 mode: '0600'
125                 cap_mon: 'allow *'
126                 cap_osd: 'allow *'
127                 cap_mds: 'allow *'
128               client.bootstrap-osd:
129                 secret: {get_param: CephAdminKey}
130                 keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring'
131                 cap_mon: 'allow profile bootstrap-osd'
132               CEPH_CLIENT_KEY:
133                 secret: {get_param: CephClientKey}
134                 mode: '0644'
135                 cap_mon: 'allow r'
136                 cap_osd:
137                   str_replace:
138                     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'
139                     params:
140                       NOVA_POOL: {get_param: NovaRbdPoolName}
141                       CINDER_POOL: {get_param: CinderRbdPoolName}
142                       CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
143                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
144                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
145             - keys:
146                 CEPH_CLIENT_KEY:
147                   list_join: ['.', ['client', {get_param: CephClientUserName}]]
148       service_config_settings:
149         glance_api:
150           glance::api::show_multiple_locations: {if: [glance_multiple_locations, true, false]}