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