1 heat_template_version: pike
4 OpenStack containerized Neutron DHCP service
7 DockerNeutronDHCPImage:
10 DockerNeutronConfigImage:
11 description: The container image to use for the neutron config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
43 type: ./containers-common.yaml
46 type: ../../puppet/services/neutron-dhcp.yaml
48 EndpointMap: {get_param: EndpointMap}
49 ServiceData: {get_param: ServiceData}
50 ServiceNetMap: {get_param: ServiceNetMap}
51 DefaultPasswords: {get_param: DefaultPasswords}
52 RoleName: {get_param: RoleName}
53 RoleParameters: {get_param: RoleParameters}
57 description: Role data for the Neutron DHCP role.
59 service_name: {get_attr: [NeutronBase, role_data, service_name]}
62 - get_attr: [NeutronBase, role_data, config_settings]
63 step_config: &step_config
64 get_attr: [NeutronBase, role_data, step_config]
65 service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
66 # BEGIN DOCKER SETTINGS
68 config_volume: neutron
69 puppet_tags: neutron_config,neutron_dhcp_agent_config
70 step_config: *step_config
71 config_image: {get_param: DockerNeutronConfigImage}
73 /var/lib/kolla/config_files/neutron_dhcp.json:
74 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 --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-dhcp-agent
76 - source: "/var/lib/kolla/config_files/src/*"
79 preserve_properties: true
81 - path: /var/log/neutron
82 owner: neutron:neutron
84 - path: /var/lib/neutron
85 owner: neutron:neutron
90 image: {get_param: DockerNeutronDHCPImage}
97 - {get_attr: [ContainersCommon, volumes]}
99 - /var/lib/kolla/config_files/neutron_dhcp.json:/var/lib/kolla/config_files/config.json:ro
100 - /var/lib/config-data/puppet-generated/neutron/:/var/lib/kolla/config_files/src:ro
101 - /lib/modules:/lib/modules:ro
103 - /var/lib/neutron:/var/lib/neutron
104 - /var/log/containers/neutron:/var/log/neutron
106 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
108 - name: create /var/lib/neutron
110 path: /var/lib/neutron
112 - name: create persistent logs directory
114 path: /var/log/containers/neutron
117 - name: Check if neutron_dhcp_agent is deployed
118 command: systemctl is-enabled neutron-dhcp-agent
121 register: neutron_dhcp_agent_enabled
122 - name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running"
123 shell: /usr/bin/systemctl show 'neutron-dhcp-agent' --property ActiveState | grep '\bactive\b'
124 when: neutron_dhcp_agent_enabled.rc == 0
125 tags: step0,validation
126 - name: Stop and disable neutron_dhcp service
128 when: neutron_dhcp_agent_enabled.rc == 0
129 service: name=neutron-dhcp-agent state=stopped enabled=no