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