Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Quick Experience

Updated on 2024-07-01 GMT+08:00

Cloud Application Engine (CAE) simplifies hosting for serverless applications. With CAE, applications can be deployed within minutes using source code, software packages, or container images. CAE supports mainstream languages such as Java, Go, and Tomcat and multiple runtime systems. It provides seamless hosting of multiple types of applications, including web applications, microservices, and APIs. Also, it supports auto scaling based on resources or custom service metrics to cope with unexpected user access traffic. Related resources are billed on the pay-per-use basis. In addition, CAE enables zero infrastructure O&M, so that users can focus more on application service development.

In this example, CAE is bound to the GitHub source code repository, and a frontend and a backend component are deployed to build and archive source code and create applications.

The following figure shows the demo logical networking and calling relationship.

  • Component CAE-frontend: Frontend GUI developed using the Vue framework. It functions as the application entry and can send requests to the backend.
  • Component CAE-backend: Backend service developed using Spring Boot. It processes requests sent by the demo-frontend component.

Prerequisites

Creating an Environment

  1. Log in to the CAE console. If you use CAE for the first time, a message is displayed indicating that no environment has been created.
  2. Click Create Now. On the displayed page, set parameters by referring to Table 1.

    Table 1 Creating an environment

    Parameter

    Description

    Environment

    Enter an environment name.

    Enterprise Project

    Select an enterprise project.

    An enterprise project facilitates project-level management and grouping of cloud resources and users. The default project is default.

    It is available after the enterprise project function is enabled.

    Virtual Private Cloud

    Select the VPC to which the environment resource belongs from the drop-down list.

    To create a VPC, click Create VPC. For details, see Creating a VPC.

    NOTE:

    The VPC cannot be modified after the environment is created.

    Subnet

    Select a subnet from the drop-down list.

    If no subnet is available, click Create Subnet to access the network console and create a subnet. For details, see Creating a Subnet for the VPC.

    NOTE:

    Keep at least two available network IP addresses for CAE configuration and optimization.

    Security Group

    Select Automatically generated.

    NOTE:

    This group must allow access from the selected subnet to both the subnet gateway address and the access addresses and ports of middleware such as RDS and CSE instances.

    Organization

    If you use CAE for the first time, select Create Organization from the drop-down list and enter an organization name.

  3. Click OK. The creation progress is displayed in the Creating environment window. Then the environment is successfully created.

Creating an Application

  1. Choose Components.
  2. Click on the right of Application on the top to create an application.
  3. Enter an application name, for example, cae_test.
  4. Click OK.

Creating a Component

Create a frontend component.

  1. In the created application, click Create Component.

    NOTE:

    You can also click Try Now under the Getting Started template on the overview page. Select the corresponding environment and application, and click Deploy to create components demo-backend and demo-frontend.

  2. Configure the component.

    • Component: Enter cae-frontend.
    • Version: The default value is 1.0.0.
    • Specifications: Retain the default value. Change it if necessary.
    • Instances: Retain the default value. Change it if necessary.
    • Code Source: Select GitHub, and set Authorization, Username/Organization, Repository, and Branch.
      1. If you use CAE for the first time, create an authorization first. Click Create Authorization and set Authorization and Mode.
        • Authorization: Retain the default value. Change it if necessary.
        • Mode: Select Token.
        • Token: Obtain a token from the GitHub website. You can click to view details.
      2. Click OK. After the authorization is created, enter Username/Organization, Repository, and Branch.
        • Username/Organization: Select the username/organization created for GitHub.
        • Repository: Select cae-frontend.
        • Branch: Select master.
    • Language/Runtime System: Select Nodejs8.
    • Custom Build: Select Default.

  3. Click Create and Deploy Component. In the displayed dialog box, click Deploy Now. Wait until the component is deployed.

    NOTE:
    • Configure Component: Click Configure Component to go to the component configuration page. After configuring the component by referring to Configuring a Component, click Set and Deploy Component.
    • Create and Deploy Component: Directly create and deploy a component. Select this mode if components do not need to be configured individually.
    • Cancel: Cancel the creation. The component information will not be saved.

Create a backend component.

  1. In the created application, click Create Component.
  2. Configure the component.

    • Component: Enter cae-backend.
    • Version: The default value is 1.0.0.
    • Specifications: Retain the default value. Change it if necessary.
    • Instances: Retain the default value. Change it if necessary.
    • Code Source: Select GitHub, and set Authorization, Username/Organization, Repository, and Branch.
      1. If you use CAE for the first time, create an authorization first. Click Create Authorization and set Authorization and Mode.
        • Authorization: Retain the default value. Change it if necessary.
        • Mode: Select Token.
        • Token: Obtain a token from the GitHub website. You can click to view details.
      2. Click OK. After the authorization is created, enter Username/Organization, Repository, and Branch.
        • Username/Organization: Select the username/organization created for GitHub.
        • Repository: Select cae-backend.
        • Branch: Select master.
    • Language/Runtime System: Select java8.
    • Custom Build: Select Default.

  3. Click Create and Deploy Component. In the displayed dialog box, click Deploy Now. Wait until the component is deployed.

Configuring a Component

Configure a frontend component.

  1. Choose Component Configurations.
  2. Select cae-frontend from the drop-down list in the upper part of the page.
  3. Click Edit in the Access Mode module.
  4. In the Access Component from Another Environment area, click Load Balancing > Add Load Balancer.
  5. Configure the parameters based on Table 2.

    Table 2 Configuring external network access for load balancing

    Parameter

    Description

    Load Balancer

    Select Built-in load balancer.

    Access Control

    Select Allow all IP addresses.

    If you have configured an access control whitelist or blocklist, only IP addresses in the whitelist or not in the blocklist can access the component.

    Health Check

    Use the default value Start.

    Port Settings

    • Protocol: Select TCP.
    • Listening Port: Enter 8080.
    • Access Port: Select a valid port ranging from 0 to 65,535, for example, 20,004.

      The port number must be unique.

  6. Click OK.
  7. Click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.

Configure a backend component.

  1. Select cae-backend from the drop-down list in the upper part of the page.
  2. Click Edit in the Access Mode module.
  3. Select Load Balancing, click Add Load Balancer, and set parameters by referring to Table 3.

    Table 3 Configuring external network access for load balancing

    Parameter

    Description

    Load Balancer

    Select Built-in load balancer.

    Access Control

    Select Allow all IP addresses.

    If you have configured an access control whitelist or blocklist, only IP addresses in the whitelist or not in the blocklist can access the component.

    Health Check

    Use the default value Start.

    Port Settings

    • Protocol: Select TCP.
    • Listening Port: Enter 9090.
    • Access Port: Select a valid port ranging from 0 to 65,535, for example, 20,001.

      The port number must be unique.

  4. Click OK.
  5. Click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.

Configure environment variables for a frontend component.

  1. Select cae-frontend from the drop-down list in the upper part of the page.
  2. Click Edit in the Environment Variables module.
  3. Click Add Environment Variable and configure the environment variable by referring to Table 4.

    Table 4 Environment variable parameters

    Parameter

    Description

    Name

    Enter VUE_APP_BASE_URL.

    Variable/Variable Reference

    Enter the backend access address, which can be obtained from Components, as shown in Figure 1.

    Figure 1 Obtaining the backend access address

    Figure 2 Configuring frontend environment variables

  4. Click Save and then click OK to complete the configuration.
  5. Click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.

Accessing an Application

  1. Choose Components.
  2. Click the public network address in the Access Address column of the cae-frontend component to view the application page.

    Figure 3 Application page
    NOTE:

    If you select the private network access mode, log in to the cluster node and run the curl command. For details, see Private Network Access.

Application O&M

  1. On the Overview page, you can view the component health status and resource usage.
  2. Select the environment, application, and component to be viewed.

    • Click Component Events to display the entire running process of the component.
    • Click Component Monitoring. The number of running instances of the current component and the CPU and memory usage of each instance are displayed.
    • Click Component Logs. The logs of each instance are displayed.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback