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 <dalvarez@redhat.com>
This commit is contained in:
Daniel Alvarez 2017-10-11 09:35:25 +02:00
parent 2564b6aecd
commit e24f02a706
3 changed files with 49 additions and 0 deletions

View File

@ -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

View File

@ -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/'

View File

@ -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.