Merge "Consume the NeutronMechanismDrivers from the hiera data"
[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
31 resources:
32   CephClusterConfigImpl:
33     type: OS::Heat::StructuredConfig
34     properties:
35       group: os-apply-config
36       config:
37         hiera:
38           datafiles:
39             ceph_cluster:
40               mapped_data:
41                 ceph_storage_count: {get_param: ceph_storage_count}
42                 ceph_mon_initial_members:
43                   list_join:
44                   - ','
45                   - {get_param: ceph_mon_names}
46                 ceph::profile::params::mon_host:
47                   list_join:
48                   - ','
49                   - {get_param: ceph_mon_ips}
50                 ceph::profile::params::fsid: {get_param: ceph_fsid}
51                 ceph::profile::params::mon_key: {get_param: ceph_mon_key}
52                 # We should use a separated key for the non-admin clients
53                 ceph::profile::params::client_keys:
54                   str_replace:
55                     template: "{
56                       client.admin: {
57                         secret: 'ADMIN_KEY',
58                         mode: '0600',
59                         cap_mon: 'allow *',
60                         cap_osd: 'allow *',
61                         cap_mds: 'allow *'
62                       },
63                       client.bootstrap-osd: {
64                         secret: 'ADMIN_KEY',
65                         keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring',
66                         cap_mon: 'allow profile bootstrap-osd'
67                       },
68                       client.openstack: {
69                         secret: 'ADMIN_KEY',
70                         mode: '0644',
71                         cap_mon: 'allow r',
72                         cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
73                       }
74                     }"
75                     params:
76                       ADMIN_KEY: {get_param: ceph_admin_key}
77
78 outputs:
79   config_id:
80     description: The ID of the CephClusterConfigImpl resource.
81     value:
82       {get_resource: CephClusterConfigImpl}