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