From d204f10ab53414dd46d5eb51fd99950d3ab70fa8 Mon Sep 17 00:00:00 2001 From: Steven Webster Date: Fri, 24 Apr 2020 10:59:59 -0400 Subject: [PATCH] Uprev the SR-IOV device plugin to the latest version This is intended primarily to pick up support for SR-IOV accelerators. The builder has been changed to a script model, as the device plugin's Dockerfile has been moved to a separate directory. The build-stx-images script does find this file, but the docker build will fail as the device plugin's source directory is no longer where the builder expects it to be. Instead, use the existing Makefile to assist in building the binary and image. Testing has been performed as follows: System Types: AIO-SX, Standard Cluster network types: IPv4, IPv6 NIC types: 82599ES 10-Gigabit [10fb], MT27710 Family [ConnectX-4 Lx] [1015], X710 for 10GbE [1572] IPAM types: host-local, calico, dhcp, static Connectivity between pods: DPDK, netdevice Story: 2006740 Task: 39610 Change-Id: If07bf2baa7d1cc32067cc73b37011ff808f0a527 Signed-off-by: Steven Webster --- ...build-sriov-network-device-plugin-image.sh | 38 +++++++++++++++++++ ...s-sriov-network-device.stable_docker_image | 10 +++-- 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 kubernetes/plugins/sriov-network-device-plugin/centos/build-sriov-network-device-plugin-image.sh diff --git a/kubernetes/plugins/sriov-network-device-plugin/centos/build-sriov-network-device-plugin-image.sh b/kubernetes/plugins/sriov-network-device-plugin/centos/build-sriov-network-device-plugin-image.sh new file mode 100644 index 000000000..7257663fe --- /dev/null +++ b/kubernetes/plugins/sriov-network-device-plugin/centos/build-sriov-network-device-plugin-image.sh @@ -0,0 +1,38 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2020 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +################################################################################ + +PROJECT=$1 +IMAGE_TAG=$2 + +if [ -z "${IMAGE_TAG}" ]; then + echo "image tag must be specified. build ${PROJECT} Aborting..." >&2 + exit 1 +fi + +make build +if [ $? -ne 0 ]; then + echo "Failed to build ${PROJECT}. Aborting..." >&2 + exit 1 +fi + +make image +if [ $? -ne 0 ]; then + echo "Failed to make ${PROJECT} image. Aborting..." >&2 + exit 1 +fi + +RETVAL=0 +docker tag nfvpe/${PROJECT}:latest "${IMAGE_TAG}" +if [ $? -ne 0 ]; then + echo "Failed to tag ${PROJECT} with ${IMAGE_TAG}. Aborting..." >&2 + RETVAL=1 +fi + +docker rmi nfvpe/${PROJECT}:latest +exit ${RETVAL} + diff --git a/kubernetes/plugins/sriov-network-device-plugin/centos/k8s-plugins-sriov-network-device.stable_docker_image b/kubernetes/plugins/sriov-network-device-plugin/centos/k8s-plugins-sriov-network-device.stable_docker_image index 7b4c4f4b0..ffdcd116c 100644 --- a/kubernetes/plugins/sriov-network-device-plugin/centos/k8s-plugins-sriov-network-device.stable_docker_image +++ b/kubernetes/plugins/sriov-network-device-plugin/centos/k8s-plugins-sriov-network-device.stable_docker_image @@ -1,5 +1,7 @@ -BUILDER=docker +BUILDER=script LABEL=k8s-plugins-sriov-network-device -DOCKER_REPO=https://github.com/intel/sriov-network-device-plugin.git -DOCKER_REF=000db15405f3ce3b7c2f9feb180c3051aa3f7aea - +SOURCE_REPO=https://github.com/intel/sriov-network-device-plugin.git +SOURCE_REF=4e0302aeb4812844524005686b74175d8b0fc515 +COMMAND=bash +SCRIPT=build-sriov-network-device-plugin-image.sh +ARGS="sriov-device-plugin"