From f0c87fc343258411d0cd5894d33b94fee5e48fa4 Mon Sep 17 00:00:00 2001 From: Thomas O'Neill Date: Wed, 8 Mar 2017 11:27:02 +0000 Subject: [PATCH] Add neutron-bgp-dragent service. Added neutron-bgp-dragent Dockerfile. Updated kolla/common/config.py with necessary sources. Implements: blueprint neutron-bgp-dragent Change-Id: If7f5c80eb10a1c418785d9c659ae18bfecfcfe33 --- .../neutron/neutron-bgp-dragent/Dockerfile.j2 | 36 +++++++++++++++++++ kolla/common/config.py | 16 ++++++--- ...-neutron-bgp-dragent-c831d5ec9a130937.yaml | 3 ++ tests/test_build.py | 2 ++ 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 docker/neutron/neutron-bgp-dragent/Dockerfile.j2 create mode 100644 releasenotes/notes/add-neutron-bgp-dragent-c831d5ec9a130937.yaml diff --git a/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 b/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 new file mode 100644 index 0000000000..525258b9fc --- /dev/null +++ b/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 @@ -0,0 +1,36 @@ +FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block neutron_bgp_dragent_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + {% elif base_distro in ['ubuntu', 'debian'] %} + {% set neutron_bgp_dragent_packages = [ + 'neutron-bgp-dragent' + ] %} + {% endif %} + +{{ macros.install_packages(neutron_bgp_dragent_packages | customizable("packages")) }} + +{% elif install_type == 'source' %} + +ADD neutron-bgp-dragent-archive /neutron-bgp-dragent-source + + {% set neutron_bgp_dragent_pip_packages = [ + '/neutron_dynamic_routing' + ] %} + +RUN ln -s neutron-bgp-dragent-source/* neutron_dynamic_routing \ + && {{ macros.install_pip(neutron_bgp_dragent_pip_packages | customizable("pip_packages")) }} + +{% endif %} + +{% block neutron_bgp_dragent_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER neutron diff --git a/kolla/common/config.py b/kolla/common/config.py index c47c3c660f..ec0fc1963f 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -443,22 +443,30 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/networking-generic-switch/' 'networking-generic-switch-master.tar.gz')}, + 'neutron-bgp-dragent': { + 'type': 'url', + 'location': ('$tarballs_base/neutron-dynamic-routing/' + 'neutron-dynamic-routing-master.tar.gz')}, 'neutron-lbaas-agent': { 'type': 'url', 'location': ('$tarballs_base/neutron-lbaas/' 'neutron-lbaas-master.tar.gz')}, + 'neutron-server-plugin-neutron-dynamic-routing': { + 'type': 'url', + 'location': ('$tarballs_base/neutron-dynamic-routing/' + 'neutron-dynamic-routing-master.tar.gz')}, 'neutron-server-plugin-neutron-lbaas': { 'type': 'url', 'location': ('$tarballs_base/neutron-lbaas/' 'neutron-lbaas-master.tar.gz')}, - 'neutron-sfc-agent': { - 'type': 'url', - 'location': ('$tarballs_base/networking-sfc/' - 'networking-sfc-master.tar.gz')}, 'neutron-server-plugin-vpnaas-agent': { 'type': 'url', 'location': ('$tarballs_base/neutron-vpnaas/' 'neutron-vpnaas-master.tar.gz')}, + 'neutron-sfc-agent': { + 'type': 'url', + 'location': ('$tarballs_base/networking-sfc/' + 'networking-sfc-master.tar.gz')}, 'neutron-vpnaas-agent': { 'type': 'url', 'location': ('$tarballs_base/neutron-vpnaas/' diff --git a/releasenotes/notes/add-neutron-bgp-dragent-c831d5ec9a130937.yaml b/releasenotes/notes/add-neutron-bgp-dragent-c831d5ec9a130937.yaml new file mode 100644 index 0000000000..b3ba6f8fe1 --- /dev/null +++ b/releasenotes/notes/add-neutron-bgp-dragent-c831d5ec9a130937.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add image for neutron-bgp-dragent container diff --git a/tests/test_build.py b/tests/test_build.py index 491637e5bc..034691bd2e 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -74,6 +74,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase): "kuryr-base", "manila-data", "monasca-base", + "neutron-bgp-dragent", "neutron-sfc-agent", "searchlight-base", "senlin-base", @@ -150,6 +151,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase): "kuryr-base", "manila-data", "monasca-base", + "neutron-bgp-dragent", "neutron-sfc-agent", "searchlight-base", "senlin-base",