Platform Functional Testing

Uploading Container Images

Download the appropriate container image for the CPU architecture and upload it to the repository. This section uses the file upload feature in repository to prepare a container image.

x86 architecture: http://oss.zstack.io/solutions/edge/container-images/nginx-latest.tar

ARM architecture: http://oss.zstack.io/solutions/edge/container-images/nginx-latest-arm.tar

  1. Create a repository.

    Go to Container Management > artifact repository > repository and click Create Repository. Enter the repository name, select the type, and click OK to create the repository.

    Creating a local image repository
  2. Upload a container image to the repository.

    Click the repository name to open its repository details page, select the Image tab, and click Upload. Select file upload, choose nginx-latest.tar in the file upload dialog, and click OK to upload the container image.

    Upload time depends primarily on network bandwidth. The test image is approximately 70 MB and takes about 1 minute to upload.

    Uploading a container image file to the repository

    After the upload succeeds, the container image information appears on the Image and tag pages.

    Container image and tag information after upload

Creating a Workload

  1. Go to Container Orchestration > workload, click Create Workload, and follow the wizard.

    Workload creation wizard entry
  2. Enter the name, select Deployment as the type, specify the replicas, and click Next.

    Workload name, type, and replicas
  3. Click Add Container to open the Add Container page.

  4. On the Add Container page, enter the container name and select the nginx image uploaded earlier. Click OK to save the container configuration and return to the container configuration page.

    On the container configuration page, click Next.

  5. Retain the default settings on the Image Mounting, Advanced Settings, and other pages. Click Next until the confirmation page appears.

    On the confirmation page, click OK to create the workload.

  6. After creating the workload, wait a few seconds and refresh the page. A Running state indicates that the container is running normally.

    Workload in the Running state

Creating a Service

  1. Go to Container Management > Container Orchestration > service and click Create Service.

    Container service creation entry
  2. Enter a name, select the associated workload, select NodePort as the type, and set Port to 80, Container Port to 80, and host port to 30080.

  3. After the service is created, its configuration appears in the service list.

    Service configuration after creation
  4. Access the container application using the IP address of any business cluster node and port 30080. Successful access confirms that the container application and service deployment tests have passed.

    Accessing nginx through a node address and NodePort