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
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.
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.tarin 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.
After the upload succeeds, the container image information appears on the Image and tag pages.
Creating a Workload
Go to Container Orchestration > workload, click Create Workload, and follow the wizard.
Enter the name, select
Deploymentas the type, specify the replicas, and click Next.
Click Add Container to open the Add Container page.
On the Add Container page, enter the container name and select the
nginximage uploaded earlier. Click OK to save the container configuration and return to the container configuration page.On the container configuration page, click Next.
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.
After creating the workload, wait a few seconds and refresh the page. A Running state indicates that the container is running normally.
Creating a Service
Go to Container Management > Container Orchestration > service and click Create Service.
Enter a name, select the associated workload, select
NodePortas the type, and set Port to 80, Container Port to 80, and host port to 30080.After the service is created, its configuration appears in the service list.
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.
