aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakwasniewska <alicja.kwasniewska@intel.com>2015-08-13 04:24:42 +0200
committerakwasniewska <alicja.kwasniewska@intel.com>2015-08-13 09:48:44 +0200
commite0c78d631007daa263335c012fea1f20ed986e73 (patch)
treeb74a4589e68b8bc06f2a726989f377b8b319d512
parentfa9492e6c65648706998580f10a71976eab4af30 (diff)
downloadkolla-e0c78d631007daa263335c012fea1f20ed986e73.tar.gz
kolla-e0c78d631007daa263335c012fea1f20ed986e73.zip
Add Dockerfile template for neutron
Change-Id: Ica2afc92cae3905765e4031ea921de9b44a153fd Partially-Implements: blueprint dockerfile-template
-rw-r--r--docker_templates/neutron/neutron-agents/Dockerfile.j231
l---------docker_templates/neutron/neutron-agents/fwaas_driver.ini1
l---------docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh1
l---------docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh1
l---------docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh1
l---------docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini1
l---------docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh1
l---------docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh1
l---------docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh1
l---------docker_templates/neutron/neutron-agents/supervisord.conf1
-rw-r--r--docker_templates/neutron/neutron-base/Dockerfile.j239
l---------docker_templates/neutron/neutron-base/config-sudoers.sh1
l---------docker_templates/neutron/neutron-base/ip_wrapper.py1
-rw-r--r--docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j223
l---------docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh1
l---------docker_templates/neutron/neutron-linuxbridge-agent/start.sh1
-rw-r--r--docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j228
l---------docker_templates/neutron/neutron-openvswitch-agent/config-external.sh1
l---------docker_templates/neutron/neutron-openvswitch-agent/start.sh1
-rw-r--r--docker_templates/neutron/neutron-server/Dockerfile.j228
l---------docker_templates/neutron/neutron-server/config-external.sh1
l---------docker_templates/neutron/neutron-server/start.sh1
22 files changed, 166 insertions, 0 deletions
diff --git a/docker_templates/neutron/neutron-agents/Dockerfile.j2 b/docker_templates/neutron/neutron-agents/Dockerfile.j2
new file mode 100644
index 000000000..8c9b54d75
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/Dockerfile.j2
@@ -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"]
diff --git a/docker_templates/neutron/neutron-agents/fwaas_driver.ini b/docker_templates/neutron/neutron-agents/fwaas_driver.ini
new file mode 120000
index 000000000..1cee84b37
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/fwaas_driver.ini
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-l3-agent/fwaas_driver.ini \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh
new file mode 120000
index 000000000..9954a4eb3
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/config-external.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-dhcp-agent/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh
new file mode 120000
index 000000000..4679ff75c
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-dhcp-agent/start.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-dhcp-agent/start.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh
new file mode 120000
index 000000000..349f75584
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-l3-agent/config-external.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-l3-agent/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini b/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini
new file mode 120000
index 000000000..7e00b3b7f
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-l3-agent/fwaas_driver.ini
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-l3-agent/fwaas_driver.ini \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh
new file mode 120000
index 000000000..3b2b832d6
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-l3-agent/start.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-l3-agent/start.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh
new file mode 120000
index 000000000..eeeb72d51
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/config-external.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-metadata-agent/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh
new file mode 120000
index 000000000..a48455462
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/neutron-metadata-agent/start.sh
@@ -0,0 +1 @@
+../../../../docker/common/neutron/neutron-metadata-agent/start.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-agents/supervisord.conf b/docker_templates/neutron/neutron-agents/supervisord.conf
new file mode 120000
index 000000000..f4d48915d
--- /dev/null
+++ b/docker_templates/neutron/neutron-agents/supervisord.conf
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-agents/supervisord.conf \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-base/Dockerfile.j2 b/docker_templates/neutron/neutron-base/Dockerfile.j2
new file mode 100644
index 000000000..cce1f63ab
--- /dev/null
+++ b/docker_templates/neutron/neutron-base/Dockerfile.j2
@@ -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/
diff --git a/docker_templates/neutron/neutron-base/config-sudoers.sh b/docker_templates/neutron/neutron-base/config-sudoers.sh
new file mode 120000
index 000000000..02ea80ca7
--- /dev/null
+++ b/docker_templates/neutron/neutron-base/config-sudoers.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-base/config-sudoers.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-base/ip_wrapper.py b/docker_templates/neutron/neutron-base/ip_wrapper.py
new file mode 120000
index 000000000..ef59fec52
--- /dev/null
+++ b/docker_templates/neutron/neutron-base/ip_wrapper.py
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-base/ip_wrapper.py \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2
new file mode 100644
index 000000000..5a9099848
--- /dev/null
+++ b/docker_templates/neutron/neutron-linuxbridge-agent/Dockerfile.j2
@@ -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"]
diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh b/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh
new file mode 120000
index 000000000..1cf0fcc79
--- /dev/null
+++ b/docker_templates/neutron/neutron-linuxbridge-agent/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-linuxbridge-agent/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-linuxbridge-agent/start.sh b/docker_templates/neutron/neutron-linuxbridge-agent/start.sh
new file mode 120000
index 000000000..ed241551e
--- /dev/null
+++ b/docker_templates/neutron/neutron-linuxbridge-agent/start.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-linuxbridge-agent/start.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2
new file mode 100644
index 000000000..af8816690
--- /dev/null
+++ b/docker_templates/neutron/neutron-openvswitch-agent/Dockerfile.j2
@@ -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"]
diff --git a/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh b/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh
new file mode 120000
index 000000000..5b561db09
--- /dev/null
+++ b/docker_templates/neutron/neutron-openvswitch-agent/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-openvswitch-agent/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-openvswitch-agent/start.sh b/docker_templates/neutron/neutron-openvswitch-agent/start.sh
new file mode 120000
index 000000000..5a8cdc1ee
--- /dev/null
+++ b/docker_templates/neutron/neutron-openvswitch-agent/start.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-openvswitch-agent/start.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-server/Dockerfile.j2 b/docker_templates/neutron/neutron-server/Dockerfile.j2
new file mode 100644
index 000000000..a8febf955
--- /dev/null
+++ b/docker_templates/neutron/neutron-server/Dockerfile.j2
@@ -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"]
diff --git a/docker_templates/neutron/neutron-server/config-external.sh b/docker_templates/neutron/neutron-server/config-external.sh
new file mode 120000
index 000000000..b10058e78
--- /dev/null
+++ b/docker_templates/neutron/neutron-server/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-server/config-external.sh \ No newline at end of file
diff --git a/docker_templates/neutron/neutron-server/start.sh b/docker_templates/neutron/neutron-server/start.sh
new file mode 120000
index 000000000..389786a96
--- /dev/null
+++ b/docker_templates/neutron/neutron-server/start.sh
@@ -0,0 +1 @@
+../../../docker/common/neutron/neutron-server/start.sh \ No newline at end of file