Merge "Modify PreNetworkConfig config inline with role-specific parameters"
[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   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceNetMap:
21     default: {}
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.
25     type: json
26   RoleName:
27     default: ''
28     description: Role name on which the service is applied
29     type: string
30   RoleParameters:
31     default: {}
32     description: Parameters specific to the role
33     type: json
34   DefaultPasswords:
35     default: {}
36     type: json
37
38 resources:
39
40   ContainersCommon:
41     type: ./containers-common.yaml
42
43 outputs:
44   role_data:
45     description: Role data for the Multipathd API role.
46     value:
47       service_name: multipathd
48       config_settings: {}
49       step_config: ''
50       service_config_settings: {}
51       # BEGIN DOCKER SETTINGS
52       puppet_config:
53         config_volume: multipathd
54         #puppet_tags: file
55         step_config: ''
56         config_image: &multipathd_image
57           list_join:
58             - '/'
59             - [ {get_param: DockerNamespace}, {get_param: DockerMultipathdImage} ]
60       kolla_config:
61         /var/lib/kolla/config_files/multipathd.json:
62           command: /usr/sbin/multipathd -d
63       docker_config:
64         step_3:
65           multipathd:
66             start_order: 1
67             image: *multipathd_image
68             net: host
69             privileged: true
70             restart: always
71             volumes:
72               list_concat:
73                 - {get_attr: [ContainersCommon, volumes]}
74                 -
75                   - /var/lib/kolla/config_files/multipathd.json:/var/lib/kolla/config_files/config.json:ro
76                   - /dev/:/dev/
77                   - /run/:/run/
78                   - /sys:/sys
79                   - /lib/modules:/lib/modules:ro
80                   - /etc/iscsi:/etc/iscsi
81                   - /var/lib/cinder:/var/lib/cinder
82             environment:
83               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
84       host_prep_tasks:
85       upgrade_tasks:
86         - name: Stop and disable multipathd service
87           tags: step2
88           service: name=multipathd state=stopped enabled=no
89       metadata_settings: {}