1 heat_template_version: pike
4 MongoDB service deployment using puppet and docker
9 default: 'tripleoupstream'
13 default: 'centos-binary-mongodb:latest'
15 DockerMongodbConfigImage:
16 description: The container image to use for the mongodb config_volume
17 default: 'centos-binary-mongodb:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
45 type: ../../../puppet/services/database/mongodb.yaml
47 EndpointMap: {get_param: EndpointMap}
48 ServiceNetMap: {get_param: ServiceNetMap}
49 DefaultPasswords: {get_param: DefaultPasswords}
50 RoleName: {get_param: RoleName}
51 RoleParameters: {get_param: RoleParameters}
55 description: Containerized service Mongodb using composable services.
57 service_name: {get_attr: [MongodbPuppetBase, role_data, service_name]}
60 - get_attr: [MongodbPuppetBase, role_data, config_settings]
61 - mongodb::server::fork: false
62 step_config: &step_config
65 - - "['Mongodb_database', 'Mongodb_user', 'Mongodb_replset'].each |String $val| { noop_resource($val) }"
66 - {get_attr: [MongodbPuppetBase, role_data, step_config]}
67 # BEGIN DOCKER SETTINGS #
69 config_volume: mongodb
70 puppet_tags: file # set this even though file is the default
71 step_config: *step_config
72 config_image: &mongodb_config_image
75 - [ {get_param: DockerNamespace}, {get_param: DockerMongodbConfigImage} ]
77 /var/lib/kolla/config_files/mongodb.json:
78 command: /usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongod.conf run
80 - path: /var/lib/mongodb
81 owner: mongodb:mongodb
83 - path: /var/log/mongodb
84 owner: mongodb:mongodb
92 - [ {get_param: DockerNamespace}, {get_param: DockerMongodbImage} ]
95 volumes: &mongodb_volumes
96 - /var/lib/kolla/config_files/mongodb.json:/var/lib/kolla/config_files/config.json
97 - /var/lib/config-data/mongodb/etc/mongod.conf:/etc/mongod.conf:ro
98 - /var/lib/config-data/mongodb/etc/mongos.conf:/etc/mongos.conf:ro
99 - /etc/localtime:/etc/localtime:ro
100 - /var/log/containers/mongodb:/var/log/mongodb
101 - /var/lib/mongodb:/var/lib/mongodb
103 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
105 # MySQL database initialization occurs only on single node
107 config_volume: 'mongodb_init_tasks'
108 puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset'
109 step_config: 'include ::tripleo::profile::base::database::mongodb'
110 config_image: *mongodb_config_image
112 - /var/lib/mongodb:/var/lib/mongodb
113 - /var/log/containers/mongodb:/var/log/mongodb
115 - name: create persistent directories
120 - /var/log/containers/mongodb
123 - name: Stop and disable mongodb service
125 service: name=mongod state=stopped enabled=no