Change flat network name for nosdn fdio scenario
[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.
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   ServiceData:
39     default: {}
40     description: Dictionary packing service data
41     type: json
42   ServiceNetMap:
43     default: {}
44     description: Mapping of service_name -> network name. Typically set
45                  via parameter_defaults in the resource registry.  This
46                  mapping overrides those in ServiceNetMapDefaults.
47     type: json
48   DefaultPasswords:
49     default: {}
50     type: json
51   RoleName:
52     default: ''
53     description: Role name on which the service is applied
54     type: string
55   RoleParameters:
56     default: {}
57     description: Parameters specific to the role
58     type: json
59   EndpointMap:
60     default: {}
61     description: Mapping of service endpoint -> protocol. Typically set
62                  via parameter_defaults in the resource registry.
63     type: json
64   ManilaCephFSNativeCephFSAuthId:
65     type: string
66     default: 'manila'
67   CephManilaClientKey:
68     default: ''
69     description: The Ceph client key. Can be created with ceph-authtool --gen-print-key.
70     type: string
71     hidden: true
72   # DEPRECATED options for compatibility with overcloud.yaml
73   # This should be removed and manipulation of the ControllerServices list
74   # used instead, but we need client support for that first
75   ControllerEnableCephStorage:
76     default: false
77     description: Whether to deploy Ceph Storage (OSD) on the Controller
78     type: boolean
79
80 parameter_groups:
81 - label: deprecated
82   description: Do not use deprecated params, they will be removed.
83   parameters:
84   - ControllerEnableCephStorage
85
86 outputs:
87   role_data:
88     description: Role data for the Ceph base service.
89     value:
90       service_name: ceph_base
91       config_settings:
92         tripleo::profile::base::ceph::enable_ceph_storage: {get_param: ControllerEnableCephStorage}
93         ceph::profile::params::osds: {/srv/data: {}}
94         ceph::profile::params::manage_repo: false
95         ceph::profile::params::authentication_type: cephx
96         ceph::profile::params::fsid: {get_param: CephClusterFSID}
97         # FIXME(gfidente): we should not have to list the packages explicitly in the templates,
98         # but this has to stay until https://bugs.launchpad.net/puppet-ceph/+bug/1629933 is fixed
99         ceph::params::packages:
100           - ceph-base
101           - ceph-mon
102         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
103         # for the given network; replacement examples (eg. for internal_api):
104         # internal_api -> IP
105         # internal_api_uri -> [IP]
106         # internal_api_subnet - > IP/CIDR
107         ceph::profile::params::cluster_network:
108           str_replace:
109             template: "NETWORK_subnet"
110             params:
111               NETWORK: {get_param: [ServiceNetMap, CephClusterNetwork]}
112         ceph::profile::params::public_network:
113           str_replace:
114             template: "NETWORK_subnet"
115             params:
116               NETWORK: {get_param: [ServiceNetMap, CephMonNetwork]}
117         ceph::profile::params::public_addr: {get_param: [ServiceNetMap, CephMonNetwork]}
118         ceph::profile::params::client_keys:
119           map_replace:
120             - client.admin:
121                 secret: {get_param: CephAdminKey}
122                 mode: '0600'
123                 cap_mon: 'allow *'
124                 cap_osd: 'allow *'
125                 cap_mds: 'allow *'
126               client.bootstrap-osd:
127                 secret: {get_param: CephAdminKey}
128                 keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring'
129                 cap_mon: 'allow profile bootstrap-osd'
130               CEPH_CLIENT_KEY:
131                 secret: {get_param: CephClientKey}
132                 mode: '0644'
133                 cap_mon: 'allow r'
134                 cap_osd:
135                   str_replace:
136                     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'
137                     params:
138                       NOVA_POOL: {get_param: NovaRbdPoolName}
139                       CINDER_POOL: {get_param: CinderRbdPoolName}
140                       CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
141                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
142                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
143               MANILA_CLIENT_KEY:
144                 mode: '0644'
145                 secret: {get_param: CephManilaClientKey}
146                 cap_mon: 'allow r, allow command \"auth del\", allow command \"auth caps\", allow command \"auth get\", allow command \"auth get-or-create\"'
147                 cap_mds: 'allow *'
148                 cap_osd: 'allow rw'
149             - keys:
150                 CEPH_CLIENT_KEY:
151                   list_join: ['.', ['client', {get_param: CephClientUserName}]]
152                 MANILA_CLIENT_KEY:
153                   list_join: ['.', ['client', {get_param: ManilaCephFSNativeCephFSAuthId}]]
154       service_config_settings:
155         ceph_osd:
156           ceph::params::packages:
157           - ceph-base
158           - ceph-mon
159           - ceph-osd