1 heat_template_version: pike
4 MongoDB service deployment using puppet and docker
9 default: 'tripleoupstream'
13 default: 'centos-binary-mongodb:latest'
17 description: Mapping of service endpoint -> protocol. Typically set
18 via parameter_defaults in the resource registry.
22 description: Mapping of service_name -> network name. Typically set
23 via parameter_defaults in the resource registry. This
24 mapping overrides those in ServiceNetMapDefaults.
31 description: Role name on which the service is applied
35 description: Parameters specific to the role
41 type: ../../../puppet/services/database/mongodb.yaml
43 EndpointMap: {get_param: EndpointMap}
44 ServiceNetMap: {get_param: ServiceNetMap}
45 DefaultPasswords: {get_param: DefaultPasswords}
46 RoleName: {get_param: RoleName}
47 RoleParameters: {get_param: RoleParameters}
51 description: Containerized service Mongodb using composable services.
53 service_name: {get_attr: [MongodbPuppetBase, role_data, service_name]}
56 - get_attr: [MongodbPuppetBase, role_data, config_settings]
57 - mongodb::server::fork: false
58 step_config: &step_config
61 - - "['Mongodb_database', 'Mongodb_user', 'Mongodb_replset'].each |String $val| { noop_resource($val) }"
62 - {get_attr: [MongodbPuppetBase, role_data, step_config]}
63 # BEGIN DOCKER SETTINGS #
65 config_volume: mongodb
66 puppet_tags: file # set this even though file is the default
67 step_config: *step_config
68 config_image: &mongodb_image
71 - [ {get_param: DockerNamespace}, {get_param: DockerMongodbImage} ]
73 /var/lib/kolla/config_files/mongodb.json:
74 command: /usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongod.conf run
76 - path: /var/lib/mongodb
77 owner: mongodb:mongodb
79 - path: /var/log/mongodb
80 owner: mongodb:mongodb
88 volumes: &mongodb_volumes
89 - /var/lib/kolla/config_files/mongodb.json:/var/lib/kolla/config_files/config.json
90 - /var/lib/config-data/mongodb/etc/mongod.conf:/etc/mongod.conf:ro
91 - /var/lib/config-data/mongodb/etc/mongos.conf:/etc/mongos.conf:ro
92 - /etc/localtime:/etc/localtime:ro
93 - /var/log/containers/mongodb:/var/log/mongodb
94 - /var/lib/mongodb:/var/lib/mongodb
96 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
98 # MySQL database initialization occurs only on single node
100 config_volume: 'mongodb_init_tasks'
101 puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset'
102 step_config: 'include ::tripleo::profile::base::database::mongodb'
103 config_image: *mongodb_image
105 - /var/lib/mongodb:/var/lib/mongodb
106 - /var/log/containers/mongodb:/var/log/mongodb
108 - name: create persistent directories
113 - /var/log/containers/mongodb
116 - name: Stop and disable mongodb service
118 service: name=mongod state=stopped enabled=no