Containerize Ceilometer Agents
[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   RoleName:
30     default: ''
31     description: Role name on which the service is applied
32     type: string
33   RoleParameters:
34     default: {}
35     description: Parameters specific to the role
36     type: json
37   EndpointMap:
38     default: {}
39     description: Mapping of service endpoint -> protocol. Typically set
40                  via parameter_defaults in the resource registry.
41     type: json
42
43 resources:
44
45   ContainersCommon:
46     type: ./containers-common.yaml
47
48   NeutronL3Base:
49     type: ../../puppet/services/neutron-l3.yaml
50     properties:
51       EndpointMap: {get_param: EndpointMap}
52       ServiceNetMap: {get_param: ServiceNetMap}
53       DefaultPasswords: {get_param: DefaultPasswords}
54       RoleName: {get_param: RoleName}
55       RoleParameters: {get_param: RoleParameters}
56
57 outputs:
58   role_data:
59     description: Role data for Neutron L3 agent
60     value:
61       service_name: {get_attr: [NeutronL3Base, role_data, service_name]}
62       config_settings: {get_attr: [NeutronL3Base, role_data, config_settings]}
63       step_config: &step_config
64         get_attr: [NeutronL3Base, role_data, step_config]
65       puppet_config:
66         puppet_tags: neutron_config,neutron_l3_agent_config
67         config_volume: neutron
68         step_config: *step_config
69         config_image:
70           list_join:
71             - '/'
72             - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
73       kolla_config:
74         /var/lib/kolla/config_files/neutron-l3-agent.json:
75           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
76           permissions:
77             - path: /var/log/neutron
78               owner: neutron:neutron
79               recurse: true
80       docker_config:
81         step_4:
82           neutronl3agent:
83             image:
84               list_join:
85                 - '/'
86                 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ]
87             net: host
88             pid: host
89             privileged: true
90             restart: always
91             volumes:
92               list_concat:
93                 - {get_attr: [ContainersCommon, volumes]}
94                 -
95                   - /var/lib/kolla/config_files/neutron-l3-agent.json:/var/lib/kolla/config_files/config.json:ro
96                   - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
97                   - /lib/modules:/lib/modules:ro
98                   - /run:/run
99                   - /var/log/containers/neutron:/var/log/neutron
100             environment:
101               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
102       host_prep_tasks:
103         - name: create persistent logs directory
104           file:
105             path: /var/log/containers/neutron
106             state: directory