Skip to content

Commit

Permalink
Merge pull request #117 from vbedida79/patch-290823-1
Browse files Browse the repository at this point in the history
tests_l2: Added qat workload
  • Loading branch information
uMartinXu authored Sep 13, 2023
2 parents 2deb078 + 730ba89 commit 573e29e
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tests/l2/qat/qatlib_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 \
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
29 changes: 29 additions & 0 deletions tests/l2/qat/qatlib_job.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 573e29e

Please sign in to comment.