Merge "Use tripleo profile for bigswitch agent"
[apex-tripleo-heat-templates.git] / docker / services / neutron-dhcp.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized Neutron DHCP service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerNeutronDHCPImage:
12     description: image
13     default: 'centos-binary-neutron-dhcp-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   EndpointMap:
21     default: {}
22     description: Mapping of service endpoint -> protocol. Typically set
23                  via parameter_defaults in the resource registry.
24     type: json
25   ServiceNetMap:
26     default: {}
27     description: Mapping of service_name -> network name. Typically set
28                  via parameter_defaults in the resource registry.  This
29                  mapping overrides those in ServiceNetMapDefaults.
30     type: json
31   DefaultPasswords:
32     default: {}
33     type: json
34
35 resources:
36
37   NeutronBase:
38     type: ../../puppet/services/neutron-dhcp.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 the Neutron DHCP role.
47     value:
48       service_name: {get_attr: [NeutronBase, role_data, service_name]}
49       config_settings:
50         map_merge:
51           - get_attr: [NeutronBase, role_data, config_settings]
52       step_config: &step_config
53         get_attr: [NeutronBase, role_data, step_config]
54       service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
55       # BEGIN DOCKER SETTINGS
56       puppet_config:
57         config_volume: neutron
58         puppet_tags: neutron_config,neutron_dhcp_agent_config
59         step_config: *step_config
60         config_image:
61           list_join:
62             - '/'
63             - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
64       kolla_config:
65         /var/lib/kolla/config_files/neutron_dhcp.json:
66           command: /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file /var/log/neutron/dhcp-agent.log
67       docker_config:
68         step_4:
69           neutron_dhcp:
70             image:
71               list_join:
72                 - '/'
73                 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronDHCPImage} ]
74             net: host
75             pid: host
76             privileged: true
77             restart: always
78             volumes:
79               - /var/lib/kolla/config_files/neutron_dhcp.json:/var/lib/kolla/config_files/config.json:ro
80               - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
81               - /etc/localtime:/etc/localtime:ro
82               - /etc/hosts:/etc/hosts:ro
83               - /lib/modules:/lib/modules:ro
84               - /run/:/run
85             environment:
86               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
87       upgrade_tasks:
88         - name: Stop and disable neutron_dhcp service
89           tags: step2
90           service: name=neutron-dhcp-agent state=stopped enabled=no