Serverless App Engine (SAE) allows you to deploy applications by using images, such as images that belong to your Alibaba Cloud accounts, private images that belong to other Alibaba Cloud accounts, demo images, and public images that can be accessed over the Internet. This topic describes how to use an image to deploy a Python application in the SAE console.
Prerequisites
- A virtual private cloud (VPC) is created. For more information, see Create a VPC.
- A namespace is created. For more information, see Create a namespace.
- An image is created for the application.
(Optional) Configure image synchronization in the Container Registry console
If the Alibaba Cloud image repository that you want to use does not reside in the same region as your application, you must use the image synchronization feature of Container Registry to synchronize the image repository to the region where the application resides before you deploy the application.
- Log on to the Container Registry console.
- In the top navigation bar, select a region.
- On the Instances page, click Instance of Personal Edition to go to the Instance of Personal Edition page.
- In the left-side navigation pane, choose Repositories page, click the name of the repository that you want to manage. . On the
- In the left-side navigation pane, click Image Replication. On the Image Replication page, click Create .
- In the Sync dialog box, configure the following parameters and click Confirm.
- Tag: the version of the current image.
- Target: Specify the region, namespace, repository name, and version number of the destination repository in sequence.
After the image synchronization is completed, the image repository that you selected in the Container Registry console is synchronized to the specified destination repository. Then, you can select the image in the Deployment Configurations step when you deploy an application in the SAE console.
Deploy an application
- Log on to the SAE console.
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region. Then, click Create Application.
- In the Basic Information step, configure the parameters and click Next: Application Deployment Configurations.
Parameter Description Application Name Enter a custom application name.
VPC Select a configuration method for the VPC. Valid values:
- Custom Configuration: If you select this option, you must manually specify the namespace, VPC, vSwitch, and security group for the application that you want to create.
- Automatic Configuration: If you select this option, SAE automatically specifies the namespace, VPC, vSwitch, and security group for the application.
Namespace This parameter is required only if the VPC parameter is set to Custom Configuration. Select an existing namespace from the drop-down list.
Note Namespaces and VPCs are in one-to-one mapping relationships. For information about how to modify a VPC, see Create and manage a VPC.vSwitch This parameter is required only if the VPC parameter is set to Custom Configuration. Click Select vSwitch. In the Select vSwitch dialog box, configure the parameters.
You must specify at least one vSwitch. We recommend that you specify no more than three vSwitches. Each vSwitch must match at least one application instance.
Security Group This parameter is required only if the VPC parameter is set to Custom Configuration. Select a security group from the drop-down list.
Note If you have not created a security group in your VPC, click Create Security Group to create a security group as prompted. For more information, see Create a security group.Application Instances Select the number of instances that you want to create. VCPU Select the CPU specification for the instances that you want to create. Memory Select the memory specification for the instances that you want to create. Application Description Enter the basic information about the application. - In the Deployment Configurations step, configure the parameters.
- Click Next: Confirm Specifications.
- In the Specification Confirmation step, view the details of the application and the fee for the selected specifications. Then, click Confirm. The Creation Completed step appears. You can click Application Details to go to the Basic Information page of the application.
- Verify whether the configurations have taken effect.
- Method 1:
In the left-side navigation pane of the Basic Information page, click Change Records. On the Change Records page, view the change details. If Executed is displayed in the Change Status column, the application is deployed and the configurations have taken effect.
- Method 2:
On the Basic Information page, click the Instance Deployment Information tab to view the Status of the instances. If Running is displayed in the Status column, the application is deployed and the configurations have taken effect.
- Method 1:
References
Operation | References |
---|---|
Lifecycle management operations, such as updating, starting, stopping, and deleting an application, and scaling in or scaling out the instances for an application | Manage the lifecycle of an application |
Performance optimization operations, such as configuring auto scaling policies for an application, binding Server Load Balancer (SLB) instances to an application, and starting or stopping applications in batches | |
Application status-based operations, such as managing logs, configuring monitoring settings, viewing application events, and viewing change records |