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: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
47 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
52 type: ./containers-common.yaml
55 type: ../../puppet/services/neutron-api.yaml
57 EndpointMap: {get_param: EndpointMap}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 RoleName: {get_param: RoleName}
61 RoleParameters: {get_param: RoleParameters}
65 description: Role data for the Neutron API role.
67 service_name: {get_attr: [NeutronBase, role_data, service_name]}
70 - get_attr: [NeutronBase, role_data, config_settings]
71 step_config: &step_config
72 get_attr: [NeutronBase, role_data, step_config]
73 service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
74 # BEGIN DOCKER SETTINGS
76 config_volume: neutron
77 puppet_tags: neutron_config,neutron_api_config
78 step_config: *step_config
82 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
84 /var/lib/kolla/config_files/neutron_api.json:
85 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
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
92 - path: /var/log/neutron
93 owner: neutron:neutron
95 /var/lib/kolla/config_files/neutron_server_tls_proxy.json:
96 command: /usr/sbin/httpd -DFOREGROUND
98 - source: "/var/lib/kolla/config_files/src/*"
101 preserve_properties: true
103 # db sync runs before permissions set by kolla_config
106 image: &neutron_api_image
109 - [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
113 - /var/log/containers/neutron:/var/log/neutron
114 command: ['/bin/bash', '-c', 'chown -R neutron:neutron /var/log/neutron']
117 image: *neutron_api_image
124 - {get_attr: [ContainersCommon, volumes]}
126 - /var/lib/config-data/neutron/etc/neutron:/etc/neutron:ro
127 - /var/lib/config-data/neutron/usr/share/neutron:/usr/share/neutron:ro
128 - /var/log/containers/neutron:/var/log/neutron
129 command: ['/usr/bin/bootstrap_host_exec', 'neutron_api', 'neutron-db-manage', 'upgrade', 'heads']
130 # FIXME: we should make config file permissions right
131 # and run as neutron user
132 #command: "/usr/bin/bootstrap_host_exec neutron_api su neutron -s /bin/bash -c 'neutron-db-manage upgrade heads'"
136 image: *neutron_api_image
142 - {get_attr: [ContainersCommon, volumes]}
144 - /var/lib/kolla/config_files/neutron_api.json:/var/lib/kolla/config_files/config.json:ro
145 - /var/lib/config-data/puppet-generated/neutron/:/var/lib/kolla/config_files/src:ro
146 - /var/log/containers/neutron:/var/log/neutron
148 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
150 - internal_tls_enabled
151 - neutron_server_tls_proxy:
152 image: *neutron_api_image
158 - {get_attr: [ContainersCommon, volumes]}
160 - /var/lib/kolla/config_files/neutron_server_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
161 - /var/lib/config-data/puppet-generated/neutron/:/var/lib/kolla/config_files/src:ro
162 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
163 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
165 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
168 - name: create persistent logs directory
170 path: /var/log/containers/neutron
173 - name: Stop and disable neutron_api service
175 service: name=neutron-server state=stopped enabled=no
177 get_attr: [NeutronBase, role_data, metadata_settings]