Rate This Document
Findability
Accuracy
Completeness
Readability

Creating a Compilation Container and a Deployment Container on the Compilation Node

To avoid installing extra software in the cluster, you are advised to use another server outside the cluster to create a container image. The server, referred to as the compilation node in this section, must use the same hardware configuration and OS as the cluster. To efficiently manage and perform software build and deployment, you need to build a compilation container and a deployment container on the compilation node.

  1. Download the openEuler-22.03-LTS-SP4 base image.
    1
    wget http://repo.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP4/docker_img/aarch64/openEuler-docker.aarch64.tar.xz
    
  2. Import the downloaded base image.
    1
    podman load -i openEuler-docker.aarch64.tar.xz
    
  3. Create a container based on the image. Before starting the container, run the unset commands to reset the proxy environment variables on the physical machine.
    1
    2
    3
    unset http_proxy
    unset https_proxy
    podman run -dit --name openeuler2203sp4_base --hostname openeuler2203sp4_base -p 10000:22 --privileged --ipc=host docker.io/library/openeuler-22.03-lts-sp4:latest
    
  4. Access the container.
    1
    podman exec -it openeuler2203sp4_base /bin/bash
    
  5. Configure environment variables such as proxies in the container. You are not advised to configure the environment variables in bashrc.
    1
    2
    3
    export TMOUT=0
    export http_proxy=http://xxx      // Set it as required.
    export https_proxy=http://xxx     // Set it as required.
    
  6. Install the software packages in the container.
    1
    yum install openssh-server openssh-clients passwd vim perf sysstat dos2unix htop sshpass jq numactl hostname python3 python3-devel python3-pip tar createrepo ipmitool iproute git systemd psmisc udev wget rpmdevtools gtk-doc pam-devel xmlsec1-devel libtool libtool-ltdl-devel cmake gcc-c++ libstdc++-static java-1.8.0-openjdk java-1.8.0-openjdk-devel fio iputils make -y
    
  7. Install the RDMA dependency packages in the container.
    1
    yum install libibverbs-devel librdmacm-devel numactl-devel -y
    
  8. Exit the container and create an image.
    1
    2
    exit
    podman commit openeuler2203sp4_base openeuler2203sp4_base:v2203sp4
    
  9. Start the compilation container.
    1
    podman run --name openeuler2203sp4_build --hostname openeuler2203sp4_base -p 10001:22 --privileged --ipc=host -dti localhost/openeuler2203sp4_base:v2203sp4 /usr/sbin/init
    
  10. Create a deployment container.
    1
    podman run --name openeuler2203sp4_release --hostname openeuler2203sp4_base -p 10003:22 --privileged --ipc=host -dti localhost/openeuler2203sp4_base:v2203sp4 /usr/sbin/init
    
  11. Verify that the container environment variables do not contain proxy configurations. Otherwise, reset the proxy environment variables on the physical machine and perform steps from 3.
    1
    podman inspect openeuler2203sp4_release | grep Env -A 10
    

    • You can run the following commands to delete a container. [CONTAINER_ID] can be queried by running the podman ps command.
      1
      2
      podman stop [CONTAINER_ID]
      podman rm [CONTAINER_ID]
      
    • You can run the following command to delete an image. [IMAGE_ID] can be queried by running the podman images command. To delete an image, you need to delete all containers created based on the image as well.
      1
      podman rmi [IMAGE_ID]