1 heat_template_version: pike
4 MongoDb service deployment using puppet
7 #Parameters not used EndpointMap
10 description: Dictionary packing service data
14 description: Mapping of service_name -> network name. Typically set
15 via parameter_defaults in the resource registry. This
16 mapping overrides those in ServiceNetMapDefaults.
23 description: Role name on which the service is applied
27 description: Parameters specific to the role
31 description: Mapping of service endpoint -> protocol. Typically set
32 via parameter_defaults in the resource registry.
36 description: Limit the amount of memory mongodb uses with systemd.
40 description: Fluentd logging configuration for mongodb.
43 path: /var/log/mongodb/mongodb.log
45 /(?<time>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d+\+\d{4})
51 default: '/etc/ipa/ca.crt'
53 description: Specifies the default CA cert to use if TLS is used for
54 services in the internal network.
58 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
62 type: ./mongodb-base.yaml
64 ServiceData: {get_param: ServiceData}
65 ServiceNetMap: {get_param: ServiceNetMap}
66 DefaultPasswords: {get_param: DefaultPasswords}
67 EndpointMap: {get_param: EndpointMap}
68 RoleName: {get_param: RoleName}
69 RoleParameters: {get_param: RoleParameters}
73 description: Service mongodb using composable services.
78 logging_source: {get_param: MongoDbLoggingSource}
81 - get_attr: [MongoDbBase, role_data, config_settings]
82 - tripleo::profile::base::database::mongodb::mongodb_replset: {get_attr: [MongoDbBase, aux_parameters, rplset_name]}
83 tripleo::profile::base::database::mongodb::memory_limit: {get_param: MongodbMemoryLimit}
84 mongodb::server::service_manage: True
85 tripleo.mongodb.firewall_rules:
88 '102 mongodb_sharding':
92 # NOTE: bind IP is found in Heat replacing the network name with the
93 # local node IP for the given network; replacement examples
94 # (eg. for internal_api):
96 # internal_api_uri -> [IP]
97 # internal_api_subnet - > IP/CIDR
98 mongodb::server::bind_ip: {get_param: [ServiceNetMap, MongodbNetwork]}
101 - internal_tls_enabled
103 generate_service_certificates: true
104 mongodb::server::ssl: true
105 mongodb::server::ssl_key: '/etc/pki/tls/certs/mongodb.pem'
106 mongodb::server::ssl_ca: {get_param: InternalTLSCAFile}
107 mongodb_certificate_specs:
108 service_pem: '/etc/pki/tls/certs/mongodb.pem'
109 service_certificate: '/etc/pki/tls/certs/mongodb.crt'
110 service_key: '/etc/pki/tls/private/mongodb.key'
113 template: "%{hiera('fqdn_NETWORK')}"
115 NETWORK: {get_param: [ServiceNetMap, MongodbNetwork]}
118 template: "mongodb/%{hiera('fqdn_NETWORK')}"
120 NETWORK: {get_param: [ServiceNetMap, MongodbNetwork]}
123 include ::tripleo::profile::base::database::mongodb
125 - name: Stop mongodb service
127 service: name=mongod state=stopped
128 - name: Start mongodb service
130 service: name=mongod state=started
133 - internal_tls_enabled
136 network: {get_param: [ServiceNetMap, MongodbNetwork]}