61b055717832dcfcd57aa272d79cca47292501b5
[apex-tripleo-heat-templates.git] / docker / services / multipathd.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Multipathd service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerMultipathdImage:
12     description: image
13     default: 'centos-binary-multipathd:latest'
14     type: string
15   DockerMultipathdConfigImage:
16     description: The container image to use for the multipathd config_volume
17     default: 'centos-binary-multipathd:latest'
18     type: string
19   EndpointMap:
20     default: {}
21     description: Mapping of service endpoint -> protocol. Typically set
22                  via parameter_defaults in the resource registry.
23     type: json
24   ServiceNetMap:
25     default: {}
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.
29     type: json
30   RoleName:
31     default: ''
32     description: Role name on which the service is applied
33     type: string
34   RoleParameters:
35     default: {}
36     description: Parameters specific to the role
37     type: json
38   DefaultPasswords:
39     default: {}
40     type: json
41
42 resources:
43
44   ContainersCommon:
45     type: ./containers-common.yaml
46
47 outputs:
48   role_data:
49     description: Role data for the Multipathd API role.
50     value:
51       service_name: multipathd
52       config_settings: {}
53       step_config: ''
54       service_config_settings: {}
55       # BEGIN DOCKER SETTINGS
56       puppet_config:
57         config_volume: multipathd
58         #puppet_tags: file
59         step_config: ''
60         config_image:
61           list_join:
62             - '/'
63             - [ {get_param: DockerNamespace}, {get_param: DockerMultipathdConfigImage} ]
64       kolla_config:
65         /var/lib/kolla/config_files/multipathd.json:
66           command: /usr/sbin/multipathd -d
67       docker_config:
68         step_3:
69           multipathd:
70             start_order: 1
71             image:
72               list_join:
73                 - '/'
74                 - [ {get_param: DockerNamespace}, {get_param: DockerMultipathdImage} ]
75             net: host
76             privileged: true
77             restart: always
78             volumes:
79               list_concat:
80                 - {get_attr: [ContainersCommon, volumes]}
81                 -
82                   - /var/lib/kolla/config_files/multipathd.json:/var/lib/kolla/config_files/config.json:ro
83                   - /dev/:/dev/
84                   - /run/:/run/
85                   - /sys:/sys
86                   - /lib/modules:/lib/modules:ro
87                   - /etc/iscsi:/etc/iscsi
88                   - /var/lib/cinder:/var/lib/cinder
89             environment:
90               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
91       host_prep_tasks:
92       upgrade_tasks:
93         - name: Stop and disable multipathd service
94           tags: step2
95           service: name=multipathd state=stopped enabled=no
96       metadata_settings: {}