diff options
| author | Gowrishankar Muthukrishnan <gmuthukr@redhat.com> | 2019-10-17 12:58:56 +0530 |
|---|---|---|
| committer | Gowrishankar Muthukrishnan <gmuthukr@redhat.com> | 2020-01-21 12:00:02 +0530 |
| commit | 1c6145f0da28c370575882793f2809e72b338f5a (patch) | |
| tree | a47eaccdc36e4b2fcebd4cc9abf7a6620d52de4c /docker | |
| parent | 112928f5f07df7595aae5adc207ac8108bd90183 (diff) | |
| download | kolla-1c6145f0da28c370575882793f2809e72b338f5a.tar.gz kolla-1c6145f0da28c370575882793f2809e72b338f5a.zip | |
Provision building netcontrold container
Netcontrold container service[1] is used to load balance PMD
threads in OpenVSwitch for the dataplane traffic. This patch
enables building netcontrold container for Openstack.
[1] https://github.com/netcontrold/netcontrold-py
Change-Id: I09cb42323d36fcff49da81fc2356c9f83400d5d6
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr@redhat.com>
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2 | 38 | ||||
| -rw-r--r-- | docker/openvswitch/openvswitch-netcontrold/extend_start.sh | 7 |
2 files changed, 45 insertions, 0 deletions
diff --git a/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2 b/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2 new file mode 100644 index 000000000..197c46a9e --- /dev/null +++ b/docker/openvswitch/openvswitch-netcontrold/Dockerfile.j2 @@ -0,0 +1,38 @@ +FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block openvswitch_netcontrold_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + +{% block openvswitch_netcontrold_install %} + +{% set openvswitch_netcontrold_packages = [ + 'python3-pip', + ] %} + +{{ macros.install_packages(openvswitch_netcontrold_packages | customizable("packages")) }} + +{% set openvswitch_netcontrold_pip_packages = [ + 'netcontrold', + ] +%} + +RUN {{ macros.install_pip(openvswitch_netcontrold_pip_packages | customizable("pip_packages"), constraints = false, pip_version = "pip3") }} + +{% endblock %} + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start +RUN chmod 755 /usr/local/bin/kolla_openvswitch_extend_start + +{% block openvswitch_netcontrold_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-netcontrold/extend_start.sh b/docker/openvswitch/openvswitch-netcontrold/extend_start.sh new file mode 100644 index 000000000..716cb126c --- /dev/null +++ b/docker/openvswitch/openvswitch-netcontrold/extend_start.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [[ ! -d "/var/log/kolla/openvswitch/netcontrold" ]]; then + mkdir -p /var/log/kolla/openvswitch/netcontrold +fi +if [[ $(stat -c %a /var/log/kolla/openvswitch/netcontrold) != "755" ]]; then + chmod 755 /var/log/kolla/openvswitch/netcontrold +fi |
