01daeafe89a58811fbae33ba5326de75e053442f
[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   DefaultPasswords:
15     default: {}
16     type: json
17   EndpointMap:
18     default: {}
19     description: Mapping of service endpoint -> protocol. Typically set
20                  via parameter_defaults in the resource registry.
21     type: json
22   MongoDbLoggingSource:
23     type: json
24     description: Fluentd logging configuration for mongodb.
25     default:
26       tag: database.mongodb
27       path: /var/log/mongodb/mongodb.log
28       format: >-
29         /(?<time>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d+\+\d{4})
30         (?<message>.*)$/
31
32 resources:
33   MongoDbBase:
34     type: ./mongodb-base.yaml
35     properties:
36       ServiceNetMap: {get_param: ServiceNetMap}
37       DefaultPasswords: {get_param: DefaultPasswords}
38       EndpointMap: {get_param: EndpointMap}
39
40 outputs:
41   role_data:
42     description: Service mongodb using composable services.
43     value:
44       service_name: mongodb
45       logging_groups:
46         - mongodb
47       logging_source: {get_param: MongoDbLoggingSource}
48       config_settings:
49         map_merge:
50           - get_attr: [MongoDbBase, role_data, config_settings]
51           - tripleo::profile::base::database::mongodb::mongodb_replset: {get_attr: [MongoDbBase, aux_parameters, rplset_name]}
52             mongodb::server::service_manage: True
53             tripleo.mongodb.firewall_rules:
54               '101 mongodb_config':
55                 dport: 27019
56               '102 mongodb_sharding':
57                 dport: 27018
58               '103 mongod':
59                 dport: 27017
60             # NOTE: bind IP is found in Heat replacing the network name with the
61             # local node IP for the given network; replacement examples
62             # (eg. for internal_api):
63             # internal_api -> IP
64             # internal_api_uri -> [IP]
65             # internal_api_subnet - > IP/CIDR
66             mongodb::server::bind_ip: {get_param: [ServiceNetMap, MongodbNetwork]}
67       step_config: |
68         include ::tripleo::profile::base::database::mongodb