Merge "Configure ObjectStorage services via resource chains"
[apex-tripleo-heat-templates.git] / puppet / extraconfig / ceph / ceph-external-config.yaml
1 heat_template_version: 2015-04-30
2 description: 'Configure parameters for an external Ceph cluster via 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   # The following parameters are unused for external Ceph clusters and
21   # are here and exist for compatibility
22   ceph_admin_key:
23     default: ''
24     type: string
25   ceph_mon_key:
26     default: ''
27     type: string
28   ceph_mon_names:
29     type: comma_delimited_list
30   ceph_mon_ips:
31     type: comma_delimited_list
32   NovaRbdPoolName:
33     default: vms
34     type: string
35   CinderRbdPoolName:
36     default: volumes
37     type: string
38   GlanceRbdPoolName:
39     default: images
40     type: string
41   GnocchiRbdPoolName:
42     default: metrics
43     type: string
44   CephClientUserName:
45     default: openstack
46     type: string
47   CephIPv6:
48     default: False
49     type: boolean
50
51 resources:
52   CephClusterConfigImpl:
53     type: OS::Heat::StructuredConfig
54     properties:
55       group: os-apply-config
56       config:
57         hiera:
58           datafiles:
59             ceph_cluster:
60               mapped_data:
61                 ceph_storage_count: {get_param: ceph_storage_count}
62                 enable_external_ceph: true
63                 ceph_ipv6: {get_param: CephIPv6}
64                 ceph_mon_host: {get_param: ceph_external_mon_ips}
65                 ceph_mon_host_v6: {get_param: ceph_external_mon_ips}
66                 ceph::profile::params::fsid: {get_param: ceph_fsid}
67                 ceph::profile::params::client_keys:
68                   str_replace:
69                     template: "{
70                       client.CLIENT_USER: {
71                         secret: 'CLIENT_KEY',
72                         mode: '0644',
73                         cap_mon: 'allow r',
74                         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'
75                       }
76                     }"
77                     params:
78                       CLIENT_USER: {get_param: CephClientUserName}
79                       CLIENT_KEY: {get_param: ceph_client_key}
80                       NOVA_POOL: {get_param: NovaRbdPoolName}
81                       CINDER_POOL: {get_param: CinderRbdPoolName}
82                       GLANCE_POOL: {get_param: GlanceRbdPoolName}
83                       GNOCCHI_POOL: {get_param: GnocchiRbdPoolName}
84                 ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
85                 nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
86                 cinder_rbd_pool_name: {get_param: CinderRbdPoolName}
87                 glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
88                 gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
89                 gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
90                 nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
91                 glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
92                 nova::compute::rbd::rbd_keyring:
93                   list_join:
94                   - '.'
95                   - - 'client'
96                     - {get_param: CephClientUserName}
97                 gnocchi::storage::ceph::ceph_keyring:
98                   list_join:
99                   - '.'
100                   - - '/etc/ceph/ceph'
101                     - 'client'
102                     - {get_param: CephClientUserName}
103                     - 'keyring'
104                 ceph_client_user_name: {get_param: CephClientUserName}
105                 ceph_pools:
106                   - {get_param: CinderRbdPoolName}
107                   - {get_param: NovaRbdPoolName}
108                   - {get_param: GlanceRbdPoolName}
109                   - {get_param: GnocchiRbdPoolName}
110
111 outputs:
112   config_id:
113     description: The ID of the CephClusterConfigImpl resource.
114     value:
115       {get_resource: CephClusterConfigImpl}