Merge "Add networking-vpp ML2 mechanism driver support"
[apex-tripleo-heat-templates.git] / docker / services / neutron-l3.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Neutron L3 agent
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerNeutronL3AgentImage:
12     description: image
13     default: 'centos-binary-neutron-l3-agent:latest'
14     type: string
15   # we configure all neutron services in the same neutron
16   DockerNeutronConfigImage:
17     description: image
18     default: 'centos-binary-neutron-openvswitch-agent:latest'
19     type: string
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   DefaultPasswords:
27     default: {}
28     type: json
29   EndpointMap:
30     default: {}
31     description: Mapping of service endpoint -> protocol. Typically set
32                  via parameter_defaults in the resource registry.
33     type: json
34
35 resources:
36
37   ContainersCommon:
38     type: ./containers-common.yaml
39
40   NeutronL3Base:
41     type: ../../puppet/services/neutron-l3.yaml
42     properties:
43       EndpointMap: {get_param: EndpointMap}
44       ServiceNetMap: {get_param: ServiceNetMap}
45       DefaultPasswords: {get_param: DefaultPasswords}
46
47 outputs:
48   role_data:
49     description: Role data for Neutron L3 agent
50     value:
51       service_name: {get_attr: [NeutronL3Base, role_data, service_name]}
52       config_settings: {get_attr: [NeutronL3Base, role_data, config_settings]}
53       step_config: &step_config
54         get_attr: [NeutronL3Base, role_data, step_config]
55       puppet_config:
56         puppet_tags: neutron_config,neutron_l3_agent_config
57         config_volume: neutron
58         step_config: *step_config
59         config_image:
60           list_join:
61             - '/'
62             - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
63       kolla_config:
64         /var/lib/kolla/config_files/neutron-l3-agent.json:
65           command: /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/l3_agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini
66           permissions:
67             - path: /var/log/neutron
68               owner: neutron:neutron
69               recurse: true
70       docker_config:
71         step_4:
72           neutronl3agent:
73             image:
74               list_join:
75                 - '/'
76                 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ]
77             net: host
78             pid: host
79             privileged: true
80             restart: always
81             volumes:
82               list_concat:
83                 - {get_attr: [ContainersCommon, volumes]}
84                 -
85                   - /var/lib/kolla/config_files/neutron-l3-agent.json:/var/lib/kolla/config_files/config.json:ro
86                   - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
87                   - /lib/modules:/lib/modules:ro
88                   - /run:/run
89                   - /var/log/containers/neutron:/var/log/neutron
90             environment:
91               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
92       host_prep_tasks:
93         - name: create persistent logs directory
94           file:
95             path: /var/log/containers/neutron
96             state: directory