Add Dockerfile template for neutron
Change-Id: Ica2afc92cae3905765e4031ea921de9b44a153fd Partially-Implements: blueprint dockerfile-template
This commit is contained in:
parent
fa9492e6c6
commit
e0c78d6310
31
docker_templates/neutron/neutron-agents/Dockerfile.j2
Normal file
31
docker_templates/neutron/neutron-agents/Dockerfile.j2
Normal file
@ -0,0 +1,31 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||
|
||||
# Install supervisor
|
||||
RUN easy_install supervisor
|
||||
|
||||
# Install supervisor-stdout
|
||||
RUN pip install supervisor-stdout
|
||||
|
||||
# Configure supervisord
|
||||
RUN mkdir -p /var/log/supervisor/
|
||||
COPY supervisord.conf /etc/
|
||||
|
||||
{% endif %}
|
||||
|
||||
# TODO: SamYaple FWaaS is part of the l3-agent, not a seperate agent that is
|
||||
# why this file is needed. To support FWaaS we cannot have a seperate container
|
||||
# I need to figure out the best way to make this work together
|
||||
#
|
||||
# This file _does_ _not_ need to exist, you must remove referencing it from the
|
||||
# exec line in the start script. Also all these config options can exist in the
|
||||
# main neutron.conf if we wish
|
||||
COPY fwaas_driver.ini /etc/neutron/
|
||||
|
||||
COPY neutron-dhcp-agent/ /opt/kolla/neutron-dhcp-agent
|
||||
COPY neutron-l3-agent/ /opt/kolla/neutron-l3-agent
|
||||
COPY neutron-metadata-agent/ /opt/kolla/neutron-metadata-agent
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
1
docker_templates/neutron/neutron-agents/fwaas_driver.ini
Symbolic link
1
docker_templates/neutron/neutron-agents/fwaas_driver.ini
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-l3-agent/fwaas_driver.ini
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-dhcp-agent/config-external.sh
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-dhcp-agent/start.sh
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-l3-agent/config-external.sh
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-l3-agent/fwaas_driver.ini
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-l3-agent/start.sh
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-metadata-agent/config-external.sh
|
@ -0,0 +1 @@
|
||||
../../../../docker/common/neutron/neutron-metadata-agent/start.sh
|
1
docker_templates/neutron/neutron-agents/supervisord.conf
Symbolic link
1
docker_templates/neutron/neutron-agents/supervisord.conf
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-agents/supervisord.conf
|
39
docker_templates/neutron/neutron-base/Dockerfile.j2
Normal file
39
docker_templates/neutron/neutron-base/Dockerfile.j2
Normal file
@ -0,0 +1,39 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||
|
||||
RUN yum -y install openstack-neutron \
|
||||
openstack-neutron-ml2 \
|
||||
python-neutron-client \
|
||||
openvswitch \
|
||||
&& yum clean all
|
||||
|
||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||
|
||||
RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
ADD ./neutron.tar /
|
||||
RUN ln -s /neutron-* /neutron
|
||||
|
||||
RUN cd /neutron \
|
||||
&& useradd --user-group neutron \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip install /neutron \
|
||||
&& mkdir /etc/neutron /usr/share/neutron /var/log/neutron \
|
||||
&& cp -r etc/* /etc/neutron/ \
|
||||
&& cp -r etc/neutron/* /etc/neutron/ \
|
||||
&& cp etc/api-paste.ini /usr/share/neutron \
|
||||
&& mv /etc/neutron/neutron/ /etc/neutron/plugins/ \
|
||||
&& chown -R neutron: /etc/neutron /var/log/neutron \
|
||||
&& rm -rf /root/.cache
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY config-sudoers.sh /opt/kolla/
|
1
docker_templates/neutron/neutron-base/config-sudoers.sh
Symbolic link
1
docker_templates/neutron/neutron-base/config-sudoers.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-base/config-sudoers.sh
|
1
docker_templates/neutron/neutron-base/ip_wrapper.py
Symbolic link
1
docker_templates/neutron/neutron-base/ip_wrapper.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-base/ip_wrapper.py
|
@ -0,0 +1,23 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||
|
||||
# Install required packages
|
||||
RUN yum install -y ebtables openstack-neutron-linuxbridge \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
# Install required packages
|
||||
RUN yum install -y ebtables && yum clean all
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-linuxbridge-agent/config-external.sh
|
1
docker_templates/neutron/neutron-linuxbridge-agent/start.sh
Symbolic link
1
docker_templates/neutron/neutron-linuxbridge-agent/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-linuxbridge-agent/start.sh
|
@ -0,0 +1,28 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||
|
||||
# Install required packages
|
||||
RUN yum install -y openstack-neutron-openvswitch \
|
||||
openvswitch \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
# Install required packages
|
||||
RUN yum install -y \
|
||||
#TODO: will be addressed later
|
||||
https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \
|
||||
openvswitch \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-openvswitch-agent/config-external.sh
|
1
docker_templates/neutron/neutron-openvswitch-agent/start.sh
Symbolic link
1
docker_templates/neutron/neutron-openvswitch-agent/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-openvswitch-agent/start.sh
|
28
docker_templates/neutron/neutron-server/Dockerfile.j2
Normal file
28
docker_templates/neutron/neutron-server/Dockerfile.j2
Normal file
@ -0,0 +1,28 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-neutron-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
|
||||
|
||||
# Install required packages
|
||||
RUN yum install -y which \
|
||||
&& yum clean all
|
||||
|
||||
# See bug: https://bugs.launchpad.net/kolla/+bug/1483667
|
||||
# TODO(SamYaple): Check in on this and remove once unneccesary
|
||||
RUN pip install oslo.messaging==2.2.0
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
#Install required packages
|
||||
RUN yum install -y which \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
1
docker_templates/neutron/neutron-server/config-external.sh
Symbolic link
1
docker_templates/neutron/neutron-server/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-server/config-external.sh
|
1
docker_templates/neutron/neutron-server/start.sh
Symbolic link
1
docker_templates/neutron/neutron-server/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/neutron/neutron-server/start.sh
|
Loading…
Reference in New Issue
Block a user