Customizations for Neutron
Change-Id: I5dbb030943abfa7eccc424859b694a508358c123 Partially-implements: blueprint third-party-plugin-support Co-Authored-By: Michal (inc0) Jastrzebski <inc007@gmail.com> Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
This commit is contained in:
parent
a409b1a03d
commit
9688f95f58
@ -1,61 +1,73 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
{% set neutron_base_packages = [
|
||||||
openstack-neutron \
|
'openstack-neutron',
|
||||||
openstack-neutron-ml2 \
|
'openstack-neutron-lbaas',
|
||||||
openvswitch \
|
'openstack-neutron-ml2',
|
||||||
openstack-neutron-lbaas \
|
'openvswitch',
|
||||||
python-openvswitch \
|
'python-openvswitch'
|
||||||
&& yum clean all
|
] %}
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_base_packages = [
|
||||||
iproute2 \
|
'iproute2',
|
||||||
neutron-plugin-ml2 \
|
'neutron-lbaas-agent',
|
||||||
neutron-server \
|
'neutron-plugin-ml2',
|
||||||
openvswitch-switch \
|
'neutron-server',
|
||||||
python-openvswitch \
|
'openvswitch-switch',
|
||||||
neutron-lbaas-agent \
|
'python-openvswitch'
|
||||||
&& apt-get clean \
|
] %}
|
||||||
&& mkdir -p /usr/share/neutron \
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_base_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% if base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/share/neutron \
|
||||||
&& ln -s /etc/neutron/api-paste.ini /usr/share/neutron/api-paste.ini
|
&& ln -s /etc/neutron/api-paste.ini /usr/share/neutron/api-paste.ini
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
{% set neutron_base_packages = [
|
||||||
conntrack-tools \
|
'conntrack-tools',
|
||||||
dnsmasq \
|
'dnsmasq',
|
||||||
dnsmasq-utils \
|
'dnsmasq-utils',
|
||||||
ipset \
|
'ipset',
|
||||||
openvswitch \
|
'openvswitch',
|
||||||
python-openvswitch \
|
'python-openvswitch',
|
||||||
uuid \
|
'uuid'
|
||||||
&& yum clean all
|
] %}
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_base_packages = [
|
||||||
iputils-arping \
|
'conntrack',
|
||||||
conntrack \
|
'dnsmasq',
|
||||||
dnsmasq \
|
'dnsmasq-utils',
|
||||||
dnsmasq-utils \
|
'iproute2',
|
||||||
iproute2 \
|
'ipset',
|
||||||
ipset \
|
'iptables',
|
||||||
iptables \
|
'iputils-arping',
|
||||||
openvswitch-switch \
|
'openvswitch-switch',
|
||||||
python-openvswitch \
|
'python-openvswitch',
|
||||||
uuid-runtime \
|
'uuid-runtime'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_base_packages | customizable("packages")) }}
|
||||||
|
|
||||||
ADD neutron-base-archive /neutron-base-source
|
ADD neutron-base-archive /neutron-base-source
|
||||||
RUN ln -s neutron-base-source/* neutron \
|
RUN ln -s neutron-base-source/* neutron \
|
||||||
&& useradd --user-group neutron \
|
&& useradd --user-group neutron \
|
||||||
@ -78,3 +90,5 @@ RUN usermod -a -G kolla neutron \
|
|||||||
&& chmod 440 /etc/sudoers.d/kolla_neutron_sudoers \
|
&& chmod 440 /etc/sudoers.d/kolla_neutron_sudoers \
|
||||||
&& touch /usr/local/bin/kolla_neutron_extend_start \
|
&& touch /usr/local/bin/kolla_neutron_extend_start \
|
||||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_neutron_extend_start
|
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_neutron_extend_start
|
||||||
|
|
||||||
|
{% block neutron_base_footer %}{% endblock %}
|
||||||
|
@ -1,16 +1,22 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if base_distro in ['ubuntu', 'debian'] %}
|
{% if base_distro in ['ubuntu', 'debian'] %}
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_dhcp_agent_packages = [
|
||||||
neutron-dhcp-agent \
|
'neutron-dhcp-agent'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_dhcp_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% block neutron_dhcp_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,30 +1,29 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['ubuntu', 'debian'] %}
|
{% if base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_l3_agent_packages = [
|
||||||
neutron-l3-agent \
|
'neutron-l3-agent'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
||||||
|
|
||||||
RUN yum -y install \
|
{% set neutron_l3_agent_packages = [
|
||||||
keepalived \
|
'keepalived'
|
||||||
&& yum clean all
|
] %}
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
keepalived \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% block neutron_l3_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,41 +1,32 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% set neutron_lbaas_agent_packages = [
|
||||||
|
'haproxy',
|
||||||
RUN yum -y install \
|
'net-tools'
|
||||||
haproxy \
|
] %}
|
||||||
net-tools \
|
{{ macros.install_packages(neutron_lbaas_agent_packages | customizable("packages")) }}
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
haproxy \
|
|
||||||
net-tools \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
{% set neutron_lbaas_agent_packages = [
|
||||||
openstack-neutron-lbaas \
|
'openstack-neutron-lbaas'
|
||||||
net-tools \
|
] %}
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_lbaas_agent_packages = [
|
||||||
neutron-lbaas-common \
|
'neutron-lbaas-common',
|
||||||
neutron-lbaasv2-agent \
|
'neutron-lbaasv2-agent',
|
||||||
python-neutron-lbaas \
|
'python-neutron-lbaas'
|
||||||
net-tools \
|
] %}
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_lbaas_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
|
|
||||||
ADD neutron-lbaas-agent-archive /neutron-lbaas-agent-source
|
ADD neutron-lbaas-agent-archive /neutron-lbaas-agent-source
|
||||||
@ -49,6 +40,8 @@ RUN ln -s neutron-lbaas-agent-source/* neutron_lbaas \
|
|||||||
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
||||||
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
|
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
|
||||||
|
|
||||||
|
{% block neutron_lbaas_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,41 +1,38 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
# Install required packages
|
{% set neutron_linuxbridge_agent_packages = [
|
||||||
RUN yum -y install \
|
'ebtables',
|
||||||
ebtables \
|
'openstack-neutron-linuxbridge'
|
||||||
openstack-neutron-linuxbridge \
|
] %}
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_linuxbridge_agent_packages = [
|
||||||
ebtables \
|
'ebtables',
|
||||||
neutron-plugin-linuxbridge-agent \
|
'neutron-plugin-linuxbridge-agent'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
||||||
|
|
||||||
# Install required packages
|
{% set neutron_linuxbridge_agent_packages = [
|
||||||
RUN yum -y install \
|
'bridge-utils',
|
||||||
ebtables \
|
'ebtables'
|
||||||
bridge-utils \
|
] %}
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
|
||||||
RUN apt-get -y install \
|
|
||||||
ebtables \
|
|
||||||
bridge-utils \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_linuxbridge_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% block neutron_linuxbridge_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if base_distro in ['ubuntu', 'debian'] %}
|
{% if base_distro in ['ubuntu', 'debian'] %}
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_metadata_agent_packages = [
|
||||||
neutron-metadata-agent \
|
'neutron-metadata-agent'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_metadata_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
COPY neutron_sudoers /etc/sudoers.d/neutron_sudoers
|
COPY neutron_sudoers /etc/sudoers.d/neutron_sudoers
|
||||||
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
||||||
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
||||||
@ -18,6 +22,8 @@ RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
|||||||
&& chmod 440 /etc/sudoers.d/neutron_sudoers \
|
&& chmod 440 /etc/sudoers.d/neutron_sudoers \
|
||||||
&& usermod -a -G kolla neutron
|
&& usermod -a -G kolla neutron
|
||||||
|
|
||||||
|
{% block neutron_metadata_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,25 +1,30 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
# Install required packages
|
{% set neutron_openvswitch_agent_packages = [
|
||||||
RUN yum -y install \
|
'openstack-neutron-openvswitch',
|
||||||
openstack-neutron-openvswitch \
|
'openvswitch'
|
||||||
openvswitch \
|
] %}
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_openvswitch_agent_packages = [
|
||||||
openvswitch-switch \
|
'neutron-plugin-openvswitch-agent',
|
||||||
neutron-plugin-openvswitch-agent \
|
'openvswitch-switch'
|
||||||
&& apt-get clean
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_openvswitch_agent_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% block neutron_openvswitch_agent_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
@ -1,23 +1,28 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
{% set neutron_server_packages = [
|
||||||
openstack-neutron-lbaas \
|
'openstack-neutron-lbaas'
|
||||||
&& yum clean all
|
] %}
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
|
||||||
RUN apt-get -y install --no-install-recommends \
|
{% set neutron_server_packages = [
|
||||||
neutron-lbaas-common \
|
'neutron-lbaas-common',
|
||||||
neutron-lbaasv2-agent \
|
'neutron-lbaasv2-agent',
|
||||||
python-neutron-lbaas \
|
'python-neutron-lbaas'
|
||||||
&& apt-get clean \
|
] %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(neutron_server_packages | customizable("packages")) }}
|
||||||
|
|
||||||
ADD plugins-archive /
|
ADD plugins-archive /
|
||||||
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
|
||||||
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
||||||
@ -25,6 +30,8 @@ RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
|
|||||||
pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \
|
pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
{% block neutron_server_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER neutron
|
USER neutron
|
||||||
|
Loading…
Reference in New Issue
Block a user