28c3e5dff06571f7b6956b932761486172f573e3
[apex-tripleo-heat-templates.git] / puppet / services / ceph-mon.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   Ceph Monitor service.
5
6 parameters:
7   EndpointMap:
8     default: {}
9     description: Mapping of service endpoint -> protocol. Typically set
10                  via parameter_defaults in the resource registry.
11     type: json
12   CephIPv6:
13     default: False
14     type: boolean
15   CephMonKey:
16     description: The Ceph monitors key. Can be created with ceph-authtool --gen-print-key.
17     type: string
18     hidden: true
19   CinderRbdPoolName:
20     default: volumes
21     type: string
22   CinderBackupRbdPoolName:
23     default: backups
24     type: string
25   GlanceRbdPoolName:
26     default: images
27     type: string
28   GnocchiRbdPoolName:
29     default: metrics
30     type: string
31   NovaRbdPoolName:
32     default: vms
33     type: string
34   CephPools:
35     description: >
36       It can be used to override settings for one of the predefined pools, or to create
37       additional ones. Example:
38       {
39         "volumes": {
40           "size": 5,
41           "pg_num": 128,
42           "pgp_num": 128
43          }
44       }
45     default: {}
46     type: json
47
48 resources:
49   CephBase:
50     type: ./ceph-base.yaml
51
52 outputs:
53   role_data:
54     description: Role data for the Ceph Monitor service.
55     value:
56       service_name: ceph_mon
57       config_settings:
58         map_merge:
59           - get_attr: [CephBase, role_data, config_settings]
60           - ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
61             ceph::profile::params::mon_key: {get_param: CephMonKey}
62             # repeat returns items in a list, so we need to map_merge twice
63             tripleo::profile::base::ceph::mon::ceph_pools:
64               map_merge:
65                 - map_merge:
66                     repeat:
67                       for_each:
68                         <%pool%>:
69                           - {get_param: CinderRbdPoolName}
70                           - {get_param: CinderBackupRbdPoolName}
71                           - {get_param: NovaRbdPoolName}
72                           - {get_param: GlanceRbdPoolName}
73                           - {get_param: GnocchiRbdPoolName}
74                       template:
75                         <%pool%>:
76                           pg_num: 32
77                           pgp_num: 32
78                           size: 3
79                 - {get_param: CephPools}
80             tripleo.ceph_mon.firewall_rules:
81               '110 ceph_mon':
82                 dport:
83                   - 6789
84       step_config: |
85         include ::tripleo::profile::base::ceph::mon