Build Containers with Intel® QAT Software
In this section we are building container image using the Intel® Device Plugin for Kubernetes. This image includes:
Intel® QuickAssist Technology Library (QATlib)
Intel® QuickAssist Technology(QAT) OpenSSL* Engine
Intel® Crypto Multi-buffer library
Intel® Multi-Buffer crypto for IPsec Library
Asynch Mode for NGINX*
The definition of image is available here.
Copy the repository.
cd ~ git clone https://github.com/intel/intel-device-plugins-for-kubernetes
Build the image. This step may take several minutes to complete.
cd intel-device-plugins-for-kubernetes make openssl-qat-engine
Container Image Definition
In this section of the document, we’ll take a look at key sections of the image definition.
Package Versions
Version strings for the individual components are included at the top of the file.
ARG QATLIB_VERSION="23.11.0"
ARG QAT_ENGINE_VERSION="v1.4.0"
ARG ASYNC_NGINX_VERSION="v0.5.1"
ARG IPSEC_MB_VERSION="v1.5"
ARG IPP_CRYPTO_VERSION="ippcp_2021.9.0"
Download Components
Source files for the individual components are downloaded.
git clone --depth 1 -b $ASYNC_NGINX_VERSION https://github.com/intel/asynch_mode_nginx.git && \
git clone --depth 1 -b $QAT_ENGINE_VERSION https://github.com/intel/QAT_Engine && \
git clone --depth 1 -b $IPP_CRYPTO_VERSION https://github.com/intel/ipp-crypto && \
git clone --depth 1 -b $IPSEC_MB_VERSION https://github.com/intel/intel-ipsec-mb && \
git clone --depth 1 -b $QATLIB_VERSION https://github.com/intel/qatlib
Build Components
Build instructions are included for each of the components listed above.
RUN cd /qatlib && \
./autogen.sh && \
./configure \
--prefix=/usr \
--enable-systemd=no && \
make -j && \
make install samples-install
Populating Contents
Individual components are installed to appropriate directories within the container. This happens at the end of the Docker File.
COPY --from=builder /usr/bin/*_sample* /usr/bin/
COPY --from=builder /usr/lib/libqat.so.4.1.0 /usr/lib/
COPY --from=builder /usr/lib/libusdm.so.0.1.0 /usr/lib/
COPY --from=builder /usr/lib64/libIPSec_MB.so.1 /usr/lib/x86_64-linux-gnu/
COPY --from=builder /usr/local/lib/libcrypto_mb.so.11.9 /usr/lib/x86_64-linux-gnu/
COPY --from=builder /usr/lib/x86_64-linux-gnu/engines-3/qatengine.so /usr/lib/x86_64-linux-gnu/engines-3/qatengine.so
COPY --from=builder /var/www/ /var/www/
COPY --from=builder /usr/lib64/nginx/* /usr/lib64/nginx/
COPY --from=builder /usr/bin/nginx /usr/bin
COPY --from=builder /usr/share/qat/calgary32 /usr/share/qat/
COPY --from=builder /usr/share/nginx/conf/* /usr/share/nginx/conf/
COPY --from=builder /qatlib/LICENSE /usr/share/package-licenses/qatlib/LICENSE
COPY --from=builder /QAT_Engine/LICENSE /usr/share/package-licenses/QAT_Engine/LICENSE
COPY --from=builder /ipp-crypto/LICENSE /usr/share/package-licenses/ipp-crypto/LICENSE
COPY --from=builder /asynch_mode_nginx/LICENSE /usr/share/package-licenses/asynch_mode_nginx/LICENSE
COPY --from=builder /intel-ipsec-mb/LICENSE /usr/share/package-licenses/intel-ipsec-mb/LICENSE
RUN ldconfig && apt update && env DEBIAN_FRONTEND=noninteractive apt install -y openssl haproxy