1 heat_template_version: pike
4 OpenStack containerized Neutron API service
9 default: 'tripleoupstream'
11 DockerNeutronApiImage:
13 default: 'centos-binary-neutron-server:latest'
15 DockerNeutronConfigImage:
16 description: The container image to use for the neutron config_volume
17 default: 'centos-binary-neutron-server:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
30 description: Mapping of service_name -> network name. Typically set
31 via parameter_defaults in the resource registry. This
32 mapping overrides those in ServiceNetMapDefaults.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
51 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
56 type: ./containers-common.yaml
59 type: ../../puppet/services/neutron-api.yaml
61 EndpointMap: {get_param: EndpointMap}
62 ServiceData: {get_param: ServiceData}
63 ServiceNetMap: {get_param: ServiceNetMap}
64 DefaultPasswords: {get_param: DefaultPasswords}
65 RoleName: {get_param: RoleName}
66 RoleParameters: {get_param: RoleParameters}
70 description: Role data for the Neutron API role.
72 service_name: {get_attr: [NeutronBase, role_data, service_name]}
75 - get_attr: [NeutronBase, role_data, config_settings]
76 step_config: &step_config
77 get_attr: [NeutronBase, role_data, step_config]
78 service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
79 # BEGIN DOCKER SETTINGS
81 config_volume: neutron
82 puppet_tags: neutron_config,neutron_api_config
83 step_config: *step_config
87 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
89 /var/lib/kolla/config_files/neutron_api.json:
90 command: /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-server
92 - source: "/var/lib/kolla/config_files/src/*"
95 preserve_properties: true
97 - path: /var/log/neutron
98 owner: neutron:neutron
100 /var/lib/kolla/config_files/neutron_server_tls_proxy.json:
101 command: /usr/sbin/httpd -DFOREGROUND
103 - source: "/var/lib/kolla/config_files/src/*"
106 preserve_properties: true
108 # db sync runs before permissions set by kolla_config
111 image: &neutron_api_image
114 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
118 - /var/log/containers/neutron:/var/log/neutron
119 command: ['/bin/bash', '-c', 'chown -R neutron:neutron /var/log/neutron']
122 image: *neutron_api_image
129 - {get_attr: [ContainersCommon, volumes]}
131 - /var/lib/config-data/neutron/etc/neutron:/etc/neutron:ro
132 - /var/lib/config-data/neutron/usr/share/neutron:/usr/share/neutron:ro
133 - /var/log/containers/neutron:/var/log/neutron
134 command: ['/usr/bin/bootstrap_host_exec', 'neutron_api', 'neutron-db-manage', 'upgrade', 'heads']
135 # FIXME: we should make config file permissions right
136 # and run as neutron user
137 #command: "/usr/bin/bootstrap_host_exec neutron_api su neutron -s /bin/bash -c 'neutron-db-manage upgrade heads'"
141 image: *neutron_api_image
147 - {get_attr: [ContainersCommon, volumes]}
149 - /var/lib/kolla/config_files/neutron_api.json:/var/lib/kolla/config_files/config.json:ro
150 - /var/lib/config-data/puppet-generated/neutron/:/var/lib/kolla/config_files/src:ro
151 - /var/log/containers/neutron:/var/log/neutron
153 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
155 - internal_tls_enabled
156 - neutron_server_tls_proxy:
157 image: *neutron_api_image
163 - {get_attr: [ContainersCommon, volumes]}
165 - /var/lib/kolla/config_files/neutron_server_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
166 - /var/lib/config-data/puppet-generated/neutron/:/var/lib/kolla/config_files/src:ro
167 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
168 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
170 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
173 - name: create persistent logs directory
175 path: /var/log/containers/neutron
178 - name: Stop and disable neutron_api service
180 service: name=neutron-server state=stopped enabled=no
182 get_attr: [NeutronBase, role_data, metadata_settings]