From 896bd432a2d934c55a2ec793de8b2190e992f3e3 Mon Sep 17 00:00:00 2001 From: Mohammad Issa Date: Sun, 28 Aug 2022 17:26:29 +0000 Subject: [PATCH] Build Debian image(s): n3000-opae This change implements building Centos based image(s) for n3000-opae in a Debian build env. The Dockerfile will use an upstream version of centos:7.9.2009 as the $BASE. Test Plan: PASS: Build Centos based image in a Debian build env. Save the image in a tarball and transfer into a controller for testing. PASS: Use "system host-device-image-update controller-0" which uses the functionality of n3000-opae packages. The new built image is used as the main n3000-opae during command execution. --> Sysinv.log response: sysinv.fpga_agent.rpcapi [-] sending device_update_image to host controller-0 sysinv.conductor.manager [-] device_update_image_status: transaction_id: 1,status: in-progress, progress: None, err: None sysinv.conductor.manager [-] device_update_image_status: transaction_id: 1, status: completed, progress: None, err: None sysinv.conductor.manager [-] no more device images to process PASS: Check controller's fpga commands available through new built image by running "sudo docker run -t --privileged -e LC_ALL=en_US.UTF-8 -e LANG=en_US.UTF-8 -v /usr/../sysinv:/mnt/images registry.local:9001/docker.io/starlingx/n3000-opae:test ls /usr/bin/fpga*" --> Command Response: fpgabist fpgad fpgadiag fpga_dma_test fpgaflash fpgainfo fpgalpbk fpgamac fpgaotsu fpgaport fpgastats fpgasupdate Story: 2009831 Task: 46150 Signed-off-by: Mohammad Issa Change-Id: If1ad4ff7c731b463f877798be9607be9aa192397 --- debian_stable_docker_images.inc | 1 + kubernetes/n3000/debian/Dockerfile | 13 +++++++++++++ .../n3000/debian/n3000-opae.stable_docker_image | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 debian_stable_docker_images.inc create mode 100644 kubernetes/n3000/debian/Dockerfile create mode 100644 kubernetes/n3000/debian/n3000-opae.stable_docker_image diff --git a/debian_stable_docker_images.inc b/debian_stable_docker_images.inc new file mode 100644 index 000000000..49ab899a5 --- /dev/null +++ b/debian_stable_docker_images.inc @@ -0,0 +1 @@ +kubernetes/n3000 diff --git a/kubernetes/n3000/debian/Dockerfile b/kubernetes/n3000/debian/Dockerfile new file mode 100644 index 000000000..15bcd33f4 --- /dev/null +++ b/kubernetes/n3000/debian/Dockerfile @@ -0,0 +1,13 @@ +FROM centos:7.9.2009 +RUN yum install -y \ + pciutils which hwloc-libs libuuid-devel \ + sysvinit-tools epel-release \ + http://mirror.starlingx.cengn.ca/mirror/centos/github.com/OPAE/opae-sdk/releases/download/1.3.7-5/opae-devel-1.3.7-5.el7.x86_64.rpm \ + http://mirror.starlingx.cengn.ca/mirror/centos/github.com/OPAE/opae-sdk/releases/download/1.3.7-5/opae-libs-1.3.7-5.el7.x86_64.rpm \ + http://mirror.starlingx.cengn.ca/mirror/centos/github.com/OPAE/opae-sdk/releases/download/1.3.7-5/opae-tools-1.3.7-5.el7.x86_64.rpm \ + http://mirror.starlingx.cengn.ca/mirror/centos/github.com/OPAE/opae-sdk/releases/download/1.3.7-5/opae-tools-extra-1.3.7-5.el7.x86_64.rpm \ + http://mirror.starlingx.cengn.ca/mirror/centos/github.com/OPAE/opae-sdk/releases/download/1.3.7-5/opae.admin-1.0.3-2.el7.noarch.rpm && \ + yum install -y python-pip && \ + yum clean all && \ + rm -rf /var/cache/yum +RUN pip install intelhex diff --git a/kubernetes/n3000/debian/n3000-opae.stable_docker_image b/kubernetes/n3000/debian/n3000-opae.stable_docker_image new file mode 100644 index 000000000..a9a4a7e33 --- /dev/null +++ b/kubernetes/n3000/debian/n3000-opae.stable_docker_image @@ -0,0 +1,4 @@ +BUILDER=docker +LABEL=n3000-opae +DOCKER_FILE=./Dockerfile +DOCKER_CONTEXT=../docker