Pass ServiceNetMap to services
[apex-tripleo-heat-templates.git] / puppet / services / database / mongodb.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   MongoDb service deployment using puppet
5
6 parameters:
7   #Parameters not used EndpointMap
8   ServiceNetMap:
9     default: {}
10     description: Mapping of service_name -> network name. Typically set
11                  via parameter_defaults in the resource registry.  This
12                  mapping overrides those in ServiceNetMapDefaults.
13     type: json
14   EndpointMap:
15     default: {}
16     description: Mapping of service endpoint -> protocol. Typically set
17                  via parameter_defaults in the resource registry.
18     type: json
19
20 resources:
21   MongoDbBase:
22     type: ./mongodb-base.yaml
23     properties:
24       ServiceNetMap: {get_param: ServiceNetMap}
25       EndpointMap: {get_param: EndpointMap}
26
27 outputs:
28   role_data:
29     description: Service mongodb using composable services.
30     value:
31       service_name: mongodb
32       config_settings:
33         map_merge:
34           - get_attr: [MongoDbBase, role_data, config_settings]
35           - tripleo::profile::base::database::mongodb::mongodb_replset: {get_attr: [MongoDbBase, aux_parameters, rplset_name]}
36             mongodb::server::service_manage: True
37             tripleo.mongodb.firewall_rules:
38               '101 mongodb_config':
39                 dport: 27019
40               '102 mongodb_sharding':
41                 dport: 27018
42               '103 mongod':
43                 dport: 27017
44       step_config: |
45         include ::tripleo::profile::base::database::mongodb