Merge "Convert noop NetworkExtraConfig to OS::Heat::None"
[apex-tripleo-heat-templates.git] / puppet / ceph-cluster-config.yaml
1 heat_template_version: 2015-04-30
2 description: 'Ceph Cluster config data for Puppet'
3
4 parameters:
5   ceph_storage_count:
6     default: 0
7     type: number
8     description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation.
9   ceph_external_mon_ips:
10     default: ''
11     type: string
12     description: List of external Ceph Mon host IPs.
13   ceph_client_key:
14     default: ''
15     type: string
16     description: Ceph key used to create the client user keyring.
17   ceph_fsid:
18     default: ''
19     type: string
20   ceph_admin_key:
21     default: ''
22     type: string
23   ceph_mon_key:
24     default: ''
25     type: string
26   ceph_mon_names:
27     type: comma_delimited_list
28   ceph_mon_ips:
29     type: comma_delimited_list
30   NovaRbdPoolName:
31     default: vms
32     type: string
33   CinderRbdPoolName:
34     default: volumes
35     type: string
36   CinderBackupRbdPoolName:
37     default: backups
38     type: string
39   GlanceRbdPoolName:
40     default: images
41     type: string
42   GnocchiRbdPoolName:
43     default: metrics
44     type: string
45   CephClientUserName:
46     default: openstack
47     type: string
48   CephIPv6:
49     default: False
50     type: boolean
51
52 resources:
53   CephClusterConfigImpl:
54     type: OS::Heat::StructuredConfig
55     properties:
56       group: os-apply-config
57       config:
58         hiera:
59           datafiles:
60             ceph_cluster:
61               mapped_data:
62                 ceph_ipv6: {get_param: CephIPv6}
63                 ceph_storage_count: {get_param: ceph_storage_count}
64                 ceph_mon_initial_members:
65                   list_join:
66                   - ','
67                   - {get_param: ceph_mon_names}
68                 ceph_mon_host:
69                   list_join:
70                   - ','
71                   - {get_param: ceph_mon_ips}
72                 ceph_mon_host_v6:
73                   str_replace:
74                     template: "'[IPS_LIST]'"
75                     params:
76                       IPS_LIST:
77                         list_join:
78                         - '],['
79                         - {get_param: ceph_mon_ips}
80                 ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
81                 ceph::profile::params::fsid: {get_param: ceph_fsid}
82                 ceph::profile::params::mon_key: {get_param: ceph_mon_key}
83                 # We should use a separated key for the non-admin clients
84                 ceph::profile::params::client_keys:
85                   str_replace:
86                     template: "{
87                       client.admin: {
88                         secret: 'ADMIN_KEY',
89                         mode: '0600',
90                         cap_mon: 'allow *',
91                         cap_osd: 'allow *',
92                         cap_mds: 'allow *'
93                       },
94                       client.bootstrap-osd: {
95                         secret: 'ADMIN_KEY',
96                         keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring',
97                         cap_mon: 'allow profile bootstrap-osd'
98                       },
99                       client.CLIENT_USER: {
100                         secret: 'CLIENT_KEY',
101                         mode: '0644',
102                         cap_mon: 'allow r',
103                         cap_osd: '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'
104                       }
105                     }"
106                     params:
107                       CLIENT_USER: {get_param: CephClientUserName}
108                       CLIENT_KEY: {get_param: ceph_client_key}
109                       ADMIN_KEY: {get_param: ceph_admin_key}
110                       NOVA_POOL: {get_param: NovaRbdPoolName}
111                       CINDER_POOL: {get_param: CinderRbdPoolName}
112                       CINDERBACKUP_POOL: {get_param: CinderBackupRbdPoolName}
113                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
114                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
115                 nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
116                 tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
117                 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
118                 gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
119                 gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
120                 nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
121                 glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
122                 nova::compute::rbd::rbd_keyring:
123                   list_join:
124                   - '.'
125                   - - 'client'
126                     - {get_param: CephClientUserName}
127                 gnocchi::storage::ceph::ceph_keyring:
128                   list_join:
129                   - '.'
130                   - - '/etc/ceph/ceph'
131                     - 'client'
132                     - {get_param: CephClientUserName}
133                     - 'keyring'
134                 tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName}
135                 ceph_pools:
136                   - {get_param: CinderRbdPoolName}
137                   - {get_param: CinderBackupRbdPoolName}
138                   - {get_param: NovaRbdPoolName}
139                   - {get_param: GlanceRbdPoolName}
140                   - {get_param: GnocchiRbdPoolName}
141
142 outputs:
143   config_id:
144     description: The ID of the CephClusterConfigImpl resource.
145     value:
146       {get_resource: CephClusterConfigImpl}