Merge "More fixes for the Ceph docker images url parsing"
[apex-tripleo-heat-templates.git] / docker / services / logrotate-crond.yaml
1 heat_template_version: pike
2
3 description: >
4   Containerized logrotate with crond for containerized service logs rotation
5
6 parameters:
7   DockerCrondImage:
8     description: image
9     type: string
10   DockerCrondConfigImage:
11     description: The container image to use for the crond config_volume
12     type: string
13   EndpointMap:
14     default: {}
15     description: Mapping of service endpoint -> protocol. Typically set
16                  via parameter_defaults in the resource registry.
17     type: json
18   ServiceData:
19     default: {}
20     description: Dictionary packing service data
21     type: json
22   ServiceNetMap:
23     default: {}
24     description: Mapping of service_name -> network name. Typically set
25                  via parameter_defaults in the resource registry.  This
26                  mapping overrides those in ServiceNetMapDefaults.
27     type: json
28   DefaultPasswords:
29     default: {}
30     type: json
31   RoleName:
32     default: ''
33     description: Role name on which the service is applied
34     type: string
35   RoleParameters:
36     default: {}
37     description: Parameters specific to the role
38     type: json
39
40
41 resources:
42
43   ContainersCommon:
44     type: ./containers-common.yaml
45
46 outputs:
47   role_data:
48     description: Role data for the crond role.
49     value:
50       service_name: logrotate_crond
51       config_settings: {}
52       step_config: &step_config |
53         include ::tripleo::profile::base::logging::logrotate
54       # BEGIN DOCKER SETTINGS
55       puppet_config:
56         config_volume: crond
57         step_config: *step_config
58         config_image: {get_param: DockerCrondConfigImage}
59       kolla_config:
60         /var/lib/kolla/config_files/logrotate-crond.json:
61           command: /usr/sbin/crond -s -n
62           config_files:
63             - source: "/var/lib/kolla/config_files/src/*"
64               dest: "/"
65               merge: true
66               preserve_properties: true
67       docker_config:
68         step_4:
69           logrotate_crond:
70             image: {get_param: DockerCrondImage}
71             net: none
72             pid: host
73             privileged: true
74             user: root
75             restart: always
76             volumes:
77               list_concat:
78                 - {get_attr: [ContainersCommon, volumes]}
79                 -
80                   - /var/lib/kolla/config_files/logrotate-crond.json:/var/lib/kolla/config_files/config.json:ro
81                   - /var/lib/config-data/puppet-generated/crond/:/var/lib/kolla/config_files/src:ro
82                   - /var/log/containers:/var/log/containers
83             environment:
84               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS