Merge "Make ceilometer crontab removal idempotent"
[apex-tripleo-heat-templates.git] / puppet / services / ceph-base.yaml
1 heat_template_version: pike
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   GnocchiRbdPoolName:
33     default: metrics
34     type: string
35   NovaRbdPoolName:
36     default: vms
37     type: string
38   ServiceNetMap:
39     default: {}
40     description: Mapping of service_name -> network name. Typically set
41                  via parameter_defaults in the resource registry.  This
42                  mapping overrides those in ServiceNetMapDefaults.
43     type: json
44   DefaultPasswords:
45     default: {}
46     type: json
47   RoleName:
48     default: ''
49     description: Role name on which the service is applied
50     type: string
51   RoleParameters:
52     default: {}
53     description: Parameters specific to the role
54     type: json
55   EndpointMap:
56     default: {}
57     description: Mapping of service endpoint -> protocol. Typically set
58                  via parameter_defaults in the resource registry.
59     type: json
60   # DEPRECATED options for compatibility with overcloud.yaml
61   # This should be removed and manipulation of the ControllerServices list
62   # used instead, but we need client support for that first
63   ControllerEnableCephStorage:
64     default: false
65     description: Whether to deploy Ceph Storage (OSD) on the Controller
66     type: boolean
67
68 parameter_groups:
69 - label: deprecated
70   description: Do not use deprecated params, they will be removed.
71   parameters:
72   - ControllerEnableCephStorage
73
74 outputs:
75   role_data:
76     description: Role data for the Ceph base service.
77     value:
78       service_name: ceph_base
79       config_settings:
80         tripleo::profile::base::ceph::enable_ceph_storage: {get_param: ControllerEnableCephStorage}
81         ceph::profile::params::osds: {/srv/data: {}}
82         ceph::profile::params::manage_repo: false
83         ceph::profile::params::authentication_type: cephx
84         ceph::profile::params::fsid: {get_param: CephClusterFSID}
85         # FIXME(gfidente): we should not have to list the packages explicitly in the templates,
86         # but this has to stay until https://bugs.launchpad.net/puppet-ceph/+bug/1629933 is fixed
87         ceph::params::packages:
88           - ceph-base
89           - ceph-mon
90           - ceph-osd
91         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
92         # for the given network; replacement examples (eg. for internal_api):
93         # internal_api -> IP
94         # internal_api_uri -> [IP]
95         # internal_api_subnet - > IP/CIDR
96         ceph::profile::params::cluster_network:
97           str_replace:
98             template: "NETWORK_subnet"
99             params:
100               NETWORK: {get_param: [ServiceNetMap, CephClusterNetwork]}
101         ceph::profile::params::public_network:
102           str_replace:
103             template: "NETWORK_subnet"
104             params:
105               NETWORK: {get_param: [ServiceNetMap, CephMonNetwork]}
106         ceph::profile::params::public_addr: {get_param: [ServiceNetMap, CephMonNetwork]}
107         ceph::profile::params::client_keys:
108           map_replace:
109             - client.admin:
110                 secret: {get_param: CephAdminKey}
111                 mode: '0600'
112                 cap_mon: 'allow *'
113                 cap_osd: 'allow *'
114                 cap_mds: 'allow *'
115               client.bootstrap-osd:
116                 secret: {get_param: CephAdminKey}
117                 keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring'
118                 cap_mon: 'allow profile bootstrap-osd'
119               CEPH_CLIENT_KEY:
120                 secret: {get_param: CephClientKey}
121                 mode: '0644'
122                 cap_mon: 'allow r'
123                 cap_osd:
124                   str_replace:
125                     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'
126                     params:
127                       NOVA_POOL: {get_param: NovaRbdPoolName}
128                       CINDER_POOL: {get_param: CinderRbdPoolName}
129                       CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
130                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
131                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
132             - keys:
133                 CEPH_CLIENT_KEY:
134                   list_join: ['.', ['client', {get_param: CephClientUserName}]]