Merge "Additional parameters for Nuage Neutron plugin integration"
[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   GnocchiRbdPoolName:
40     default: metrics
41     type: string
42   CephClientUserName:
43     default: openstack
44     type: string
45   CephIPv6:
46     default: False
47     type: boolean
48
49 resources:
50   CephClusterConfigImpl:
51     type: OS::Heat::StructuredConfig
52     properties:
53       group: os-apply-config
54       config:
55         hiera:
56           datafiles:
57             ceph_cluster:
58               mapped_data:
59                 ceph_ipv6: {get_param: CephIPv6}
60                 ceph_storage_count: {get_param: ceph_storage_count}
61                 ceph_mon_initial_members:
62                   list_join:
63                   - ','
64                   - {get_param: ceph_mon_names}
65                 ceph_mon_host:
66                   list_join:
67                   - ','
68                   - {get_param: ceph_mon_ips}
69                 ceph_mon_host_v6:
70                   str_replace:
71                     template: "'[IPS_LIST]'"
72                     params:
73                       IPS_LIST:
74                         list_join:
75                         - '],['
76                         - {get_param: ceph_mon_ips}
77                 ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
78                 ceph::profile::params::fsid: {get_param: ceph_fsid}
79                 ceph::profile::params::mon_key: {get_param: ceph_mon_key}
80                 # We should use a separated key for the non-admin clients
81                 ceph::profile::params::client_keys:
82                   str_replace:
83                     template: "{
84                       client.admin: {
85                         secret: 'ADMIN_KEY',
86                         mode: '0600',
87                         cap_mon: 'allow *',
88                         cap_osd: 'allow *',
89                         cap_mds: 'allow *'
90                       },
91                       client.bootstrap-osd: {
92                         secret: 'ADMIN_KEY',
93                         keyring_path: '/var/lib/ceph/bootstrap-osd/ceph.keyring',
94                         cap_mon: 'allow profile bootstrap-osd'
95                       },
96                       client.CLIENT_USER: {
97                         secret: 'CLIENT_KEY',
98                         mode: '0644',
99                         cap_mon: 'allow r',
100                         cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=CINDER_POOL, allow rwx pool=NOVA_POOL, allow rwx pool=GLANCE_POOL, allow rwx pool=GNOCCHI_POOL'
101                       }
102                     }"
103                     params:
104                       CLIENT_USER: {get_param: CephClientUserName}
105                       CLIENT_KEY: {get_param: ceph_client_key}
106                       ADMIN_KEY: {get_param: ceph_admin_key}
107                       NOVA_POOL: {get_param: NovaRbdPoolName}
108                       CINDER_POOL: {get_param: CinderRbdPoolName}
109                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
110                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
111                 nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
112                 cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
113                 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
114                 gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
115                 gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
116                 nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
117                 glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
118                 nova::compute::rbd::rbd_keyring:
119                   list_join:
120                   - '.'
121                   - - 'client'
122                     - {get_param: CephClientUserName}
123                 gnocchi::storage::ceph::ceph_keyring:
124                   list_join:
125                   - '.'
126                   - - 'client'
127                     - {get_param: CephClientUserName}
128                 ceph_client_user_name: {get_param: CephClientUserName}
129                 ceph_pools:
130                   - {get_param: CinderRbdPoolName}
131                   - {get_param: NovaRbdPoolName}
132                   - {get_param: GlanceRbdPoolName}
133                   - {get_param: GnocchiRbdPoolName}
134
135 outputs:
136   config_id:
137     description: The ID of the CephClusterConfigImpl resource.
138     value:
139       {get_resource: CephClusterConfigImpl}