diff --git a/tests/l2/qat/qatlib_build.yaml b/tests/l2/qat/qatlib_build.yaml new file mode 100644 index 00000000..8b60c298 --- /dev/null +++ b/tests/l2/qat/qatlib_build.yaml @@ -0,0 +1,62 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: {} +--- +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: + triggers: + - type: "ConfigChange" + - type: "ImageChange" + runPolicy: "Serial" + source: + type: Dockerfile + dockerfile: | + + FROM registry.access.redhat.com/ubi8/ubi + ARG QATLIB_VERSION + + RUN dnf -y update && \ + dnf install -y gcc \ + systemd-devel \ + make \ + automake \ + autoconf \ + libtool \ + http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/Packages/nasm-2.15.03-3.el8.x86_64.rpm \ + openssl-devel \ + zlib-devel \ + git && \ + git clone -b $QATLIB_VERSION https://github.com/intel/qatlib + + RUN cd /qatlib && \ + ./autogen.sh && \ + ./configure \ + --prefix=/usr \ + --enable-systemd=no && \ + make -j && \ + make install samples-install + + WORKDIR /usr/bin + ENTRYPOINT ["/usr/bin/cpa_sample_code"] + strategy: + type: Docker + noCache: true + dockerStrategy: + buildArgs: + - name: "QATLIB_VERSION" + value: "23.08.0" + + output: + to: + kind: ImageStreamTag + name: intel-qat-workload:latest \ No newline at end of file diff --git a/tests/l2/qat/qatlib_job.yaml b/tests/l2/qat/qatlib_job.yaml new file mode 100644 index 00000000..6cb79a61 --- /dev/null +++ b/tests/l2/qat/qatlib_job.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: batch/v1 +kind: Job +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: + template: + spec: + restartPolicy: Never + containers: + - name: intel-qat-job + image: image-registry.openshift-image-registry.svc:5000/intel-qat/intel-qat-workload:latest + imagePullPolicy: IfNotPresent + command: ["./cpa_sample_code"] + securityContext: + capabilities: + add: + [IPC_LOCK] + resources: + requests: + qat.intel.com/dc: '1' + qat.intel.com/cy: '1' + limits: + qat.intel.com/dc: '1' + qat.intel.com/cy: '1' + serviceAccount: intel-qat \ No newline at end of file