Add build from source for Neutron

Change-Id: I49a336643737daaa20e835e44647ce74e2da2a81
Partially-implements: blueprint install-from-source
This commit is contained in:
Paul Bourke 2015-07-16 16:53:38 +00:00
parent 7302891206
commit affdac4ff0
42 changed files with 174 additions and 0 deletions

View File

@ -21,6 +21,7 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& rm get-pip.py
RUN pip install --upgrade \
cachetools \
crudini \
crux \
pip

View File

@ -0,0 +1,27 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
# 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/
# 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"]

View File

@ -0,0 +1 @@
../../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-l3-agent/fwaas_driver.ini

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-dhcp-agent/check.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-dhcp-agent/config-external.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-dhcp-agent/config-internal.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-dhcp-agent/start.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-l3-agent/check.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-l3-agent/config-external.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-l3-agent/config-internal.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-l3-agent/fwaas_driver.ini

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-l3-agent/start.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-metadata-agent/check.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-metadata-agent/config-external.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-metadata-agent/config-internal.sh

View File

@ -0,0 +1 @@
../../../../../common/neutron/neutron-metadata-agent/start.sh

View File

@ -0,0 +1,46 @@
[unix_http_server]
file = /var/run/supervisor.sock
[inet_http_server]
port = 127.0.0.1:9001
[supervisord]
nodaemon=true
logfile = /var/log/supervisor/supervisord.log
logfile_maxbytes = 200KB
logfile_backups = 1
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock
[program:neutron-dhcp-agent]
command=/opt/kolla/neutron-dhcp-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-metadata-agent]
command=/opt/kolla/neutron-metadata-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[program:neutron-l3-agent]
command=/opt/kolla/neutron-l3-agent/start.sh
priority=40
startsec=10
stderr_events_enabled=true
stdout_events_enabled=true
[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler

View File

@ -0,0 +1,11 @@
# Build info specific to this image. All values can be overridden in .buildconf
SOURCE_INSTALL_METHOD=curl
COMPONENT=neutron
SOURCE_INSTALL_AVAILABLE=1
# Used for git install method
: ${CLONE_FROM:=https://github.com/openstack/neutron}
# Used for curl install method
: ${TARBALL_URI:=http://tarballs.openstack.org/neutron/neutron-2015.1.0.tar.gz}

View File

@ -0,0 +1,19 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
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
COPY config-neutron.sh config-sudoers.sh /opt/kolla/

View File

@ -0,0 +1 @@
../../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-base/config-neutron.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-base/config-sudoers.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-base/ip_wrapper.py

View File

@ -0,0 +1,11 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Install required packages
RUN yum install -y ebtables && yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-linuxbridge-agent/check.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-linuxbridge-agent/config-external.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-linuxbridge-agent/config-internal.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-linuxbridge-agent/start.sh

View File

@ -0,0 +1,14 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Install required packages
RUN yum install -y \
https://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm \
openvswitch \
&& yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-openvswitch-agent/check.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-openvswitch-agent/config-external.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-openvswitch-agent/config-internal.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-openvswitch-agent/start.sh

View File

@ -0,0 +1,11 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
#Install required packages
RUN yum install -y which && \
yum clean all
COPY check.sh start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-server/check.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-server/config-external.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-server/config-internal.sh

View File

@ -0,0 +1 @@
../../../../common/neutron/neutron-server/start.sh