This topic provides an example on how to enable Internet access for an application that is deployed on SAE.
Prerequisites
- SAE is activated. For more information, see Activate SAE.
- A virtual private cloud (VPC) and a vSwitch are created. For more information, see Create a VPC and a vSwitch.
- A namespace is created. For more information, see Create a namespace.
Background information
For example, Enterprise A wants to create an application in the China (Beijing) region in SAE, deploy a WordPress service on the application, and use an ApsaraDB RDS database that resides in the China (Hangzhou) region.
Create and deploy a WordPress application
- Log on to the SAE console.
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region and 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, set the Application Deployment Method parameter to Image and configure the parameters. Then, 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.
- Check the deployment result of the application. On the Basic Information page, view the basic information and instance deployment information of the application. If Running is displayed in the Status column on the Instance Deployment Information tab, the application is deployed.
- Bind a Server Load Balancer (SLB) instance to the application.
- Use the Internet-facing SLB instance to access the WordPress application.
Configure Internet access for the WordPress application
For more information, see Configure a NAT gateway for an SAE application to enable Internet access.
Configure an ApsaraDB RDS database that resides in another region for the WordPress application
- Purchase an ApsaraDB RDS instance.
- Configure a whitelist.
- In the left-side navigation pane, click Accounts. On the Accounts tab, click Create Account. In the Create Account panel, configure the parameters and click OK. Create an account and a database for the ApsaraDB RDS instance based on your business requirements. For more information, see Create databases and accounts for an ApsaraDB RDS for MySQL instance.
- Check whether the ApsaraDB RDS database that is created for the WordPress application can be accessed over the Internet.