Browse Source

Build a Docker image with FPGA plugin

Create Intel FPGA plugins Docker images to StarlingX image build from
intel-device-plugins-for-kubernetes. Adjust the script to make it
more generic. Update intel-gpu-plugin to the latest codebase as well.

Change-Id: I4e60de505aca5d01c10a4db396a2311591b44ff0
Story: 2006495
Task: 36710
Signed-off-by: Alex Kozyrev <alex.kozyrev@windriver.com>
tags/v3.0.0.rc0
Alex Kozyrev 10 months ago
parent
commit
5f72ddb26a
6 changed files with 56 additions and 22 deletions
  1. +32
    -0
      kubernetes/plugins/intel-device-plugin/distroless/build-intel-device-plugins-image.sh
  2. +0
    -20
      kubernetes/plugins/intel-device-plugin/distroless/build-intel-gpu-plugin-image.sh
  3. +7
    -0
      kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-admissionwebhook.stable_docker_image
  4. +7
    -0
      kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-initcontainer.stable_docker_image
  5. +7
    -0
      kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-plugin.stable_docker_image
  6. +3
    -2
      kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image

+ 32
- 0
kubernetes/plugins/intel-device-plugin/distroless/build-intel-device-plugins-image.sh View File

@@ -0,0 +1,32 @@
#!/bin/bash
################################################################################
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
################################################################################

DEVICE=$1
IMAGE_TAG=$2

if [ -z "${IMAGE_TAG}" ]; then
echo "image tag must be specified. build ${DEVICE} Aborting..." >&2
exit 1
fi

make ${DEVICE}

if [ $? -ne 0 ]; then
echo "Failed to make ${DEVICE}. Aborting..." >&2
exit 1
fi

RETVAL=0
docker tag intel/${DEVICE}:devel "${IMAGE_TAG}"
if [ $? -ne 0 ]; then
echo "Failed to tag ${DEVICE} with ${IMAGE_TAG}. Aborting..." >&2
RETVAL=1
fi

docker rmi intel/${DEVICE}:devel
exit ${RETVAL}

+ 0
- 20
kubernetes/plugins/intel-device-plugin/distroless/build-intel-gpu-plugin-image.sh View File

@@ -1,20 +0,0 @@
#!/bin/bash

IMAGE_TAG=$1
PROXY=$2
DEVICE='intel-gpu-plugin'

if [ -z "${IMAGE_TAG}" ]; then
echo "image tag must be specified. build ${DEVICE} Aborting..." >&2
exit 1
fi

make ${DEVICE}

if [ $? -ne 0 ]; then
echo "Failed to make intel-gpu-plugin. Aborting..." >&2
exit 1
fi

# will exit 1 if "${IMAGE_TAG}" do not match docker tag formate
docker tag ${DEVICE}:devel "${IMAGE_TAG}"

+ 7
- 0
kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-admissionwebhook.stable_docker_image View File

@@ -0,0 +1,7 @@
BUILDER=script
LABEL=intel-fpga-admissionwebhook
SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git
SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1
COMMAND=bash
SCRIPT=build-intel-device-plugins-image.sh
ARGS=intel-fpga-admissionwebhook

+ 7
- 0
kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-initcontainer.stable_docker_image View File

@@ -0,0 +1,7 @@
BUILDER=script
LABEL=intel-fpga-initcontainer
SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git
SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1
COMMAND=bash
SCRIPT=build-intel-device-plugins-image.sh
ARGS=intel-fpga-initcontainer

+ 7
- 0
kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-plugin.stable_docker_image View File

@@ -0,0 +1,7 @@
BUILDER=script
LABEL=intel-fpga-plugin
SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git
SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1
COMMAND=bash
SCRIPT=build-intel-device-plugins-image.sh
ARGS=intel-fpga-plugin

+ 3
- 2
kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image View File

@@ -1,6 +1,7 @@
BUILDER=script
LABEL=intel-gpu-plugin
SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git
SOURCE_REF=156970adcaa6d4db42532110f370505d6777135b
SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1
COMMAND=bash
SCRIPT=build-intel-gpu-plugin-image.sh
SCRIPT=build-intel-device-plugins-image.sh
ARGS=intel-gpu-plugin

Loading…
Cancel
Save