Deploying Containerized Applications on CCI Using Huawei Cloud Toolkit
Scenario
Huawei Cloud Toolkit is an extension of Huawei Cloud's product capabilities to developers' desktops. It helps developers quickly connect to Huawei Cloud for one-click deployment. Huawei Cloud Toolkit is a series of IDE plugins built based on the Huawei Cloud developer ecosystem tool system. It supports platforms such as VS Code and IntelliJ IDEA, as well as Huawei Cloud CodeArts IDE, helping developers build applications more efficiently and conveniently.
You can use the Deploy plugin in JetBrains to deploy containerized applications on CCI.
Configuring Docker Before Deploying Containerized Applications on CCI
The following are operations for you to configure the host where Docker is installed.
- On the top menu bar of IntelliJ IDEA, choose File > Settings. In the navigation pane, choose Huawei Cloud Toolkit Settings > Docker > Docker.
- Configure the remote SSH connection to the Docker host.
Docker parameters:
- IP: Enter the IP address of the host where Docker is installed.
- Port: Enter the SSH port number.
- Auth Mode: Select an authentication mode. The options are Password and Private Key.
- Username: Enter the username.
- Password/Private Key: Enter the password or the address of the private key.
Configuring a Registry Before Deploying Containerized Applications on CCI
A registry stores custom private Docker images. The process of configuring a registry is as follows:
- On the top menu bar of IntelliJ IDEA, choose File > Settings. In the navigation pane, choose Huawei Cloud Toolkit Settings > Docker > Registry.
- Configure the parameters.
Registry parameters:
- Registry: Select a registry from the drop-down list. You can click Add or Remove to add a registry or delete an existing registry.
- Name: Enter a registry name.
- Address: Enter the registry address, for example, registry.hub.docker.com.
- Username: Enter the username.
- Password: Enter the password.
- SWR has been enabled in your account (for details, see Getting Started with SWR). If SWR is used as the Docker image registry, you do not need to configure Registry.
- If you use a custom registry, ensure that it can be connected to.
- Click Test Connection to test the connectivity between the host and the custom registry. If Docker is not installed on the host, you can click Test Connection and install Docker as prompted.
Deploying Containerized Applications on CCI
- In the tool box on the left of IntelliJ IDEA, click Huawei Cloud Toolkit. On the main panel, click Huawei Cloud Deploy, and then select Deploy to Huawei Cloud.
Alternatively, choose Huawei Cloud Toolkit > Deploy to Huawei Cloud on the top menu bar. The CCI deployment panel is displayed.
- On the displayed panel, configure the parameters. There are two tabs on the panel: Image and Container. The following provides the details.
- Image tab
- You can specify the image build configuration required for deploying containerized applications on CCI in the Build Image parameter.
- In the Image Repositories parameter, you can select SWR or a custom registry.
Table 1 Parameters on the Image tab Parameter
Details
Steps
Build Image
- Context Directory: Select the file directory.
- Dockerfile: Select a Dockerfile.
- Region: Select a region.
- Namespace: Select a namespace.
- Image Name: Enter an image name.
- Version: Select an image tag.
Configure the parameters as required.
Image Repositories
Huawei Cloud SWR: Huawei Cloud image registry
- In the Image Repositories area, select Huawei Cloud SWR.
- Select a region, namespace, and image repository. Alternatively, search for a keyword in the search box and select an SWR repository.
Custom Container Registry: custom image registry
- In the Image Repositories area, select Custom Container Registry.
- Click Add on the right of the page to configure registry information or select a configured registry from the drop-down list.
You can use SWR or a custom registry as the repository source for deploying containerized applications on CCI.
- Image tab
- Click Run.
Verifying Deployment
- After the deployment is successful, the message "Success to deploy for CCI!" is displayed in the lower right corner.
- If the deployment fails, the message "Failed to deploy for CCI!" is displayed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot