From d0546485f6d16418eb645e7474965eaefc376953 Mon Sep 17 00:00:00 2001 From: Harald Jensas Date: Mon, 19 Feb 2018 17:13:14 +0100 Subject: [PATCH] Add networking-baremetal * Adding Dockerfile to build image with ironic-neutron-agent. * Add ``neutron-base-plugin-networking-baremetal`` in kolla/common/config.py to enable building neutron with baremetal plugin. Since the ML2 mechanism driver and L2 Agent is in the same python package, the source install will include the ironic-neutron-agent as part of neutron-base. Change-Id: I232dcf44c8a56c268610053cf362714d52e6cb93 --- .../ironic-neutron-agent/Dockerfile.j2 | 32 +++++++++++++++++++ kolla/common/config.py | 4 +++ kolla/image/build.py | 2 ++ ...-networking-baremtal-ed44e0fc04371eb8.yaml | 17 ++++++++++ 4 files changed, 55 insertions(+) create mode 100644 docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 create mode 100644 releasenotes/notes/add-networking-baremtal-ed44e0fc04371eb8.yaml diff --git a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 new file mode 100644 index 0000000000..e8567aecba --- /dev/null +++ b/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 @@ -0,0 +1,32 @@ +FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block ironic_neutron_agent_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + + {% set ironic_neutron_agent_packages = [ + 'python-networking-baremetal', + 'python-ironic-neutron-agent' + ] %} + + {% elif base_distro in ['debian', 'ubuntu'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} + + {{ macros.install_packages(ironic_neutron_agent_packages | customizable("packages")) }} + +{% endif %} + + +{% block ironic_neutron_agent_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER neutron diff --git a/kolla/common/config.py b/kolla/common/config.py index 0a51f3c724..a45f7f6748 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -527,6 +527,10 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/neutron-fwaas/' 'neutron-fwaas-master.tar.gz')}, + 'neutron-base-plugin-networking-baremetal': { + 'type': 'url', + 'location': ('$tarballs_base/networking-baremetal/' + 'networking-baremetal-master.tar.gz')}, 'neutron-base-plugin-networking-generic-switch': { 'type': 'url', 'location': ('$tarballs_base/networking-generic-switch/' diff --git a/kolla/image/build.py b/kolla/image/build.py index 2ac591cf12..b1bc718d32 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -111,6 +111,7 @@ SKIPPED_IMAGES = { "ec2-api", "freezer-base", "heat-all", + "ironic-neutron-agent", "karbor-base", "kuryr-base", "mistral-event-engine", @@ -141,6 +142,7 @@ SKIPPED_IMAGES = { "ec2-api", "freezer-base", "heat-all", + "ironic-neutron-agent", "karbor-base", "kuryr-base", "mistral-event-engine", diff --git a/releasenotes/notes/add-networking-baremtal-ed44e0fc04371eb8.yaml b/releasenotes/notes/add-networking-baremtal-ed44e0fc04371eb8.yaml new file mode 100644 index 0000000000..e334e80466 --- /dev/null +++ b/releasenotes/notes/add-networking-baremtal-ed44e0fc04371eb8.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + Add networking-baremetal components: The ``baremetal`` ML2 mechanism driver + and the ``ironic-neutron-agent`` L2 agent. + + Networking Baremetal provides deep integration between the Networking + service and the Bare Metal service. Advanced networking features like + notifications of port status changes and routed networks support in clouds + with Bare Metal service. + + The ML2 mechanism driver is installed in the neutron-base image when + building from source. Binary users can use + ``neutron_server_packages_append`` to include the + ``python-networking-baremetal`` package when building neutron-server image. + The ``ironic-neutron-agent`` L2 agent is in the ``ironic-neutron-agent`` + image.