Use a single configuration file for specifying docker containers.
[apex-tripleo-heat-templates.git] / docker / services / manila-scheduler.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Manila Scheduler service
5
6 parameters:
7   DockerManilaSchedulerImage:
8     description: image
9     type: string
10   DockerManilaConfigImage:
11     description: The container image to use for the manila 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   ServiceNetMap:
19     default: {}
20     description: Mapping of service_name -> network name. Typically set
21                  via parameter_defaults in the resource registry.  This
22                  mapping overrides those in ServiceNetMapDefaults.
23     type: json
24   DefaultPasswords:
25     default: {}
26     type: json
27   RoleName:
28     default: ''
29     description: Role name on which the service is applied
30     type: string
31   RoleParameters:
32     default: {}
33     description: Parameters specific to the role
34     type: json
35
36 resources:
37
38   ContainersCommon:
39     type: ./containers-common.yaml
40
41   ManilaSchedulerPuppetBase:
42     type: ../../puppet/services/manila-scheduler.yaml
43     properties:
44       EndpointMap: {get_param: EndpointMap}
45       ServiceNetMap: {get_param: ServiceNetMap}
46       DefaultPasswords: {get_param: DefaultPasswords}
47
48 outputs:
49   role_data:
50     description: Role data for the Manila Scheduler role.
51     value:
52       service_name: {get_attr: [ManilaSchedulerPuppetBase, role_data, service_name]}
53       config_settings: {get_attr: [ManilaSchedulerPuppetBase, role_data, config_settings]}
54       step_config: &step_config
55         {get_attr: [ManilaSchedulerPuppetBase, role_data, step_config]}
56       service_config_settings: {get_attr: [ManilaSchedulerPuppetBase, role_data, service_config_settings]}
57       # BEGIN DOCKER SETTINGS #
58       puppet_config:
59         config_volume: manila
60         puppet_tags: manila_config,manila_scheduler_paste_ini
61         step_config: *step_config
62         config_image: {get_param: DockerManilaConfigImage}
63       kolla_config:
64         /var/lib/kolla/config_files/manila_scheduler.json:
65           command: /usr/bin/manila-scheduler --config-file /usr/share/manila/manila-dist.conf --config-file /etc/manila/manila.conf
66           config_files:
67             - source: "/var/lib/kolla/config_files/src/*"
68               dest: "/"
69               merge: true
70               preserve_properties: true
71           permissions:
72             - path: /var/log/manila
73               owner: manila:manila
74               recurse: true
75       docker_config:
76         step_4:
77           manila_scheduler:
78             image: {get_param: DockerManilaSchedulerImage}
79             net: host
80             restart: always
81             volumes:
82               list_concat:
83                 - {get_attr: [ContainersCommon, volumes]}
84                 -
85                   - /var/lib/kolla/config_files/manila_scheduler.json:/var/lib/kolla/config_files/config.json:ro
86                   - /var/lib/config-data/puppet-generated/manila/:/var/lib/kolla/config_files/src:ro
87                   - /var/log/containers/manila:/var/log/manila
88             environment:
89               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
90       host_prep_tasks:
91         - name: Create persistent manila logs directory
92           file:
93             path: /var/log/containers/manila
94             state: directory
95       upgrade_tasks:
96         - name: Stop and disable manila_scheduler service
97           tags: step2
98           service: name=openstack-manila-scheduler state=stopped enabled=no