Migrate neutron-vpnaas-agent to neutron-l3-agent
Closes-Bug: #1753617
Change-Id: I47cd8ba5a14da3c76d5b1eb0b4c0cf0c729eb2ff
Partially-Implements: blueprint restructure-neutron-vpnaas
(cherry picked from commit 1ca33914f8
)
This commit is contained in:
parent
1a623d7114
commit
c62c8da375
@ -134,7 +134,12 @@ RUN ln -s neutron-base-source/* neutron \
|
|||||||
&& chown -R neutron: /etc/neutron /usr/share/neutron \
|
&& chown -R neutron: /etc/neutron /usr/share/neutron \
|
||||||
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/neutron/rootwrap.conf \
|
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/neutron/rootwrap.conf \
|
||||||
&& if [ "$(ls /plugins)" ]; then \
|
&& if [ "$(ls /plugins)" ]; then \
|
||||||
{{ macros.install_pip(neutron_base_plugins_pip_packages) }}; \
|
{{ macros.install_pip(neutron_base_plugins_pip_packages) }} \
|
||||||
|
&& for neutron_plugins in $(ls /plugins); do \
|
||||||
|
if [[ -d "/plugins/$neutron_plugins/etc/neutron/rootwrap.d" ]]; then \
|
||||||
|
cp /plugins/$neutron_plugins/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,22 +6,41 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
{% import "macros.j2" as macros with context %}
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['debian', 'ubuntu'] %}
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set neutron_l3_agent_packages = [
|
||||||
|
'openstack-neutron-vpn-agent',
|
||||||
|
'libreswan'
|
||||||
|
] %}
|
||||||
|
|
||||||
|
# TODO(chenxing) Currently, there is no Ubuntu vpnaas package for Queens release.
|
||||||
|
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||||
|
|
||||||
{% set neutron_l3_agent_packages = [
|
{% set neutron_l3_agent_packages = [
|
||||||
'neutron-l3-agent'
|
'neutron-l3-agent',
|
||||||
|
'strongswan'
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif install_type == 'source' %}
|
|
||||||
{% set neutron_l3_agent_packages = [
|
|
||||||
'radvd'
|
|
||||||
] %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }}
|
{{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% elif install_type == 'source' %}
|
||||||
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set neutron_l3_agent_packages = [
|
||||||
|
'libreswan',
|
||||||
|
'radvd'
|
||||||
|
] %}
|
||||||
|
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||||
|
{% set neutron_l3_agent_packages = [
|
||||||
|
'strongswan',
|
||||||
|
'radvd'
|
||||||
|
] %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block neutron_l3_agent_footer %}{% endblock %}
|
{% block neutron_l3_agent_footer %}{% endblock %}
|
||||||
{% block footer %}{% endblock %}
|
{% block footer %}{% endblock %}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|||||||
OPTS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
OPTS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||||
neutron-db-manage ${OPTS} upgrade head
|
neutron-db-manage ${OPTS} upgrade head
|
||||||
neutron-db-manage ${OPTS} --subproject neutron-fwaas upgrade head
|
neutron-db-manage ${OPTS} --subproject neutron-fwaas upgrade head
|
||||||
|
neutron-db-manage ${OPTS} --subproject neutron-vpnaas upgrade head
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
|
||||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
||||||
|
|
||||||
{% block neutron_vpnaas_agent_header %}{% endblock %}
|
|
||||||
|
|
||||||
{% import "macros.j2" as macros with context %}
|
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
|
||||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
||||||
{% set neutron_vpnaas_agent_packages = [
|
|
||||||
'openstack-neutron-vpn-agent',
|
|
||||||
'openswan'
|
|
||||||
] %}
|
|
||||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
|
||||||
{% set neutron_vpnaas_agent_packages = [
|
|
||||||
'neutron-vpn-agent',
|
|
||||||
'strongswan'
|
|
||||||
] %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ macros.install_packages(neutron_vpnaas_agent_packages | customizable("packages")) }}
|
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
|
||||||
|
|
||||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
||||||
{% set neutron_vpnaas_agent_packages = [
|
|
||||||
'openswan'
|
|
||||||
] %}
|
|
||||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
|
||||||
{% set neutron_vpnaas_agent_packages = [
|
|
||||||
'strongswan'
|
|
||||||
] %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ macros.install_packages(neutron_vpnaas_agent_packages | customizable("packages")) }}
|
|
||||||
|
|
||||||
ADD neutron-vpnaas-agent-archive /neutron-vpnaas-agent-source
|
|
||||||
|
|
||||||
{% set neutron_vpnaas_agent_pip_packages = [
|
|
||||||
'/neutron_vpnaas'
|
|
||||||
] %}
|
|
||||||
|
|
||||||
RUN ln -s neutron-vpnaas-agent-source/* neutron_vpnaas \
|
|
||||||
&& {{ macros.install_pip(neutron_vpnaas_agent_pip_packages | customizable("pip_packages")) }} \
|
|
||||||
&& cp /neutron_vpnaas/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
|
||||||
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
|
|
||||||
|
|
||||||
{% block neutron_vpnaas_agent_footer %}{% endblock %}
|
|
||||||
{% block footer %}{% endblock %}
|
|
||||||
|
|
||||||
# TODO(pbourke): The libreswan driver required by redhat derived bases
|
|
||||||
# currently requires root in Neutron. Remove this if condition once
|
|
||||||
# https://bugs.launchpad.net/neutron/+bug/1644517 is addressed.
|
|
||||||
{% if base_distro in ['debian', 'ubuntu'] %}
|
|
||||||
USER neutron
|
|
||||||
{% endif %}
|
|
@ -542,6 +542,10 @@ SOURCES = {
|
|||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/vmware-nsx/'
|
'location': ('$tarballs_base/vmware-nsx/'
|
||||||
'vmware-nsx-stable-queens.tar.gz')},
|
'vmware-nsx-stable-queens.tar.gz')},
|
||||||
|
'neutron-base-plugin-vpnaas-agent': {
|
||||||
|
'type': 'url',
|
||||||
|
'location': ('$tarballs_base/neutron-vpnaas/'
|
||||||
|
'neutron-vpnaas-12.0.0.tar.gz')},
|
||||||
'neutron-bgp-dragent': {
|
'neutron-bgp-dragent': {
|
||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/neutron-dynamic-routing/'
|
'location': ('$tarballs_base/neutron-dynamic-routing/'
|
||||||
@ -578,10 +582,6 @@ SOURCES = {
|
|||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/vmware-nsxlib/'
|
'location': ('$tarballs_base/vmware-nsxlib/'
|
||||||
'vmware-nsxlib-stable-queens.tar.gz')},
|
'vmware-nsxlib-stable-queens.tar.gz')},
|
||||||
'neutron-server-plugin-vpnaas-agent': {
|
|
||||||
'type': 'url',
|
|
||||||
'location': ('$tarballs_base/neutron-vpnaas/'
|
|
||||||
'neutron-vpnaas-12.0.0.tar.gz')},
|
|
||||||
'neutron-vpnaas-agent': {
|
'neutron-vpnaas-agent': {
|
||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/neutron-vpnaas/'
|
'location': ('$tarballs_base/neutron-vpnaas/'
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The neutron-vpnaas-agent has been loaded just inside of the existing l3 agent
|
||||||
|
rather than requiring operators to run a completely different binary with a
|
||||||
|
subclass of the existing L3 agent.
|
||||||
|
|
||||||
|
deprecation:
|
||||||
|
- |
|
||||||
|
As neutron-vpnaas-agent can be loaded by the neutron l3 agent, neutron-vpnaas
|
||||||
|
standalone mode is not supported. It's time to remove this container.
|
Loading…
Reference in New Issue
Block a user