Merge "Allow a user to specify a comma separated list of ntp servers"
[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 'openstack' 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   GlanceRbdPoolName:
37     default: images
38     type: string
39
40 resources:
41   CephClusterConfigImpl:
42     type: OS::Heat::StructuredConfig
43     properties:
44       group: os-apply-config
45       config:
46         hiera:
47           datafiles:
48             ceph_cluster:
49               mapped_data:
50                 ceph_storage_count: {get_param: ceph_storage_count}
51                 ceph_mon_initial_members:
52                   list_join:
53                   - ','
54                   - {get_param: ceph_mon_names}
55                 ceph::profile::params::mon_host:
56                   list_join:
57                   - ','
58                   - {get_param: ceph_mon_ips}
59                 ceph::profile::params::fsid: {get_param: ceph_fsid}
60                 ceph::profile::params::mon_key: {get_param: ceph_mon_key}
61                 # We should use a separated key for the non-admin clients
62                 ceph::profile::params::client_keys:
63                   str_replace:
64                     template: "{
65                       client.admin: {
66                         secret: 'ADMIN_KEY',
67                         mode: '0600',
68                         cap_mon: 'allow *',
69                         cap_osd: 'allow *',
70                         cap_mds: 'allow *'
71                       },
72                       client.bootstrap-osd: {
73                         secret: 'ADMIN_KEY',
74                         keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring',
75                         cap_mon: 'allow profile bootstrap-osd'
76                       },
77                       client.openstack: {
78                         secret: 'ADMIN_KEY',
79                         mode: '0644',
80                         cap_mon: 'allow r',
81                         cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL'
82                       }
83                     }"
84                     params:
85                       ADMIN_KEY: {get_param: ceph_admin_key}
86                       NOVA_POOL: {get_param: NovaRbdPoolName}
87                       CINDER_POOL: {get_param: CinderRbdPoolName}
88                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
89                 nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
90                 cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
91                 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
92                 ceph_pools:
93                   - {get_param: CinderRbdPoolName}
94                   - {get_param: NovaRbdPoolName}
95                   - {get_param: GlanceRbdPoolName}
96
97 outputs:
98   config_id:
99     description: The ID of the CephClusterConfigImpl resource.
100     value:
101       {get_resource: CephClusterConfigImpl}