From e24f02a706f6e812b6f6f15a1773ca2585e96838 Mon Sep 17 00:00:00 2001 From: Daniel Alvarez Date: Wed, 11 Oct 2017 09:35:25 +0200 Subject: [PATCH] Add Dockerfile for networking-ovn-metadata-agent This patch adds a new Dockerfile for the metadata agent in networking-ovn so that we can have a Kolla image to be deployed in OVN containerized environments. Change-Id: I8af4ae921ecca51a99886d5208abeb1a4eb42c83 Signed-off-by: Daniel Alvarez --- .../neutron-metadata-agent-ovn/Dockerfile.j2 | 39 +++++++++++++++++++ kolla/common/config.py | 4 ++ ...ta_agent_kolla_image-6f87ef59cf62cb8f.yaml | 6 +++ 3 files changed, 49 insertions(+) create mode 100644 docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 create mode 100644 releasenotes/notes/new_networking_ovn_metadata_agent_kolla_image-6f87ef59cf62cb8f.yaml diff --git a/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 new file mode 100644 index 0000000000..4a75f4a786 --- /dev/null +++ b/docker/neutron/neutron-metadata-agent-ovn/Dockerfile.j2 @@ -0,0 +1,39 @@ +FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block neutron_metadata_agent_ovn_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set neutron_metadata_agent_ovn_packages = [ + 'python-networking-ovn-metadata-agent' + ] %} + {% elif base_distro in ['debian', 'ubuntu'] %} + {% set neutron_metadata_agent_ovn_packages = [ + 'python-networking-ovn' + ] %} + {% endif %} + + {{ macros.install_packages(neutron_metadata_agent_ovn_packages | customizable("packages")) }} + +{% elif install_type == 'source' %} + +ADD plugins-archive / + + {% set neutron_metadata_agent_ovn_plugins_pip_packages = [ + '/plugins/*' + ] %} + +RUN if [ "$(ls /plugins)" ]; then \ + {{ macros.install_pip(neutron_metadata_agent_ovn_plugins_pip_packages | customizable("pip_packages")) }}; \ + fi + +{% endif %} + +{% block neutron_metadata_agent_ovn_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER neutron diff --git a/kolla/common/config.py b/kolla/common/config.py index f57dfcfeb8..2dae3c9aef 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -565,6 +565,10 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/networking-ovn/' 'networking-ovn-master.tar.gz')}, + 'neutron-metadata-agent-ovn-plugin-networking-ovn': { + 'type': 'url', + 'location': ('$tarballs_base/networking-ovn/' + 'networking-ovn-master.tar.gz')}, 'nova-base': { 'type': 'url', 'location': ('$tarballs_base/nova/' diff --git a/releasenotes/notes/new_networking_ovn_metadata_agent_kolla_image-6f87ef59cf62cb8f.yaml b/releasenotes/notes/new_networking_ovn_metadata_agent_kolla_image-6f87ef59cf62cb8f.yaml new file mode 100644 index 0000000000..e4ed7cf83f --- /dev/null +++ b/releasenotes/notes/new_networking_ovn_metadata_agent_kolla_image-6f87ef59cf62cb8f.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + A new agent for metadata API has been introduced in ``networking-ovn``. + This agent is to be deployed in compute nodes and, in order to support + a containerized deployment, a new Kolla image is created.