Enable Docker service for Compute role
[apex-tripleo-heat-templates.git] / docker / services / neutron-l3.yaml
1 heat_template_version: ocata
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   NeutronL3Base:
38     type: ../../puppet/services/neutron-l3.yaml
39     properties:
40       EndpointMap: {get_param: EndpointMap}
41       ServiceNetMap: {get_param: ServiceNetMap}
42       DefaultPasswords: {get_param: DefaultPasswords}
43
44 outputs:
45   role_data:
46     description: Role data for Neutron L3 agent
47     value:
48       service_name: {get_attr: [NeutronL3Base, role_data, service_name]}
49       config_settings: {get_attr: [NeutronL3Base, role_data, config_settings]}
50       step_config: &step_config
51         get_attr: [NeutronL3Base, role_data, step_config]
52       docker_image: &neutron_l3_agent_image
53         list_join:
54         - '/'
55         - [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ]
56
57       puppet_config:
58         puppet_tags: neutron_config,neutron_l3_agent_config
59         config_volume: neutron
60         step_config: *step_config
61         config_image:
62           list_join:
63             - '/'
64             - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
65       kolla_config:
66         /var/lib/kolla/config_files/neutron-l3-agent.json:
67            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
68            config_files:
69            - dest: /etc/neutron/neutron.conf
70              owner: neutron
71              perm: '0600'
72              source: /var/lib/kolla/config_files/src/etc/neutron/neutron.conf
73            - dest: /etc/neutron/l3_agent.ini
74              owner: root
75              perm: '0644'
76              source: /var/lib/kolla/config_files/src/etc/neutron/l3_agent.ini
77       docker_config:
78         step_4:
79           neutronl3agent:
80             image: *neutron_l3_agent_image
81             net: host
82             pid: host
83             privileged: true
84             restart: always
85             volumes:
86               - /var/lib/kolla/config_files/neutron-l3-agent.json:/var/lib/kolla/config_files/config.json:ro
87               - /var/lib/config-data/neutron:/var/lib/kolla/config_files/src:ro
88               - /etc/localtime:/etc/localtime:ro
89               - /lib/modules:/lib/modules:ro
90               - /run:/run
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS