Best practice on application planning

更新时间:
复制 MD 格式

Plan applications

An application is a software service that provides a specific feature. It typically has a source code repository and multiple versions of artifacts that are compiled by using this source code repository, such as software installation packages and container images. Applications run on Alibaba Cloud infrastructure, such as Elastic Compute Service (ECS) instances and managed Container Service for Kubernetes (ACK) clusters, and use other cloud services such as databases, Server Load Balancer (SLB), and Domains. You can plan applications based on their features and artifacts, and import the corresponding cloud resources into application groups within applications.

Plan application groups

Application groups help you deploy, manage, and maintain applications. For example, you can publish an application by deploying one group at a time, configure monitoring and alerting with group-level metrics, perform batch O&M operations on group resources, and analyze costs by application group.

You can plan application groups by using the following policies.

  1. Plan application groups based on runtime environments, such as the production environment, staging environment, and routine environment. These runtime environments are independent but may not be completely isolated. For example, the staging environment and the production environment can share a database. The O&M requirements vary with the environment. Therefore, you need to deploy an application separately in different environments.

  2. Plan application groups based on zones. If your application supports cross-zone high availability, you can import resources in the same zone into an application group. You can then publish and maintain the application by application group to ensure that the application is always available.

  3. Plan a single application group. If your application is a simple application for testing or demonstration, you can import all resources into one application group.

Create an application group

Create an application group by using custom tags

If your resources already have tags, you can use those tags to create an application group. The application group and tags are then bound.

  1. If you add a tag to a resource, the resource is imported into the bound application group. If you remove a tag from a resource, the resource is removed from the bound application group.

  2. If you import resources into an application group, the bound tags are added to the resources. If you remove resources from an application group, the bound tags are removed from the resources.

You can view the bound tags on the Overview tab of the application group.

Create an application group from a resource group

You can create an application group from an existing resource group that you configure. The application group and resource group are then bound. You cannot manually import or remove resources on the Resources tab of a bound application group. Resource changes in the resource group are synchronized to the application group. You can view the bound resource group on the Overview tab of the application group.

Create an application group by manually importing resources

On the Create Application page, you can filter and import multiple resources to create an application group. An application management tag is automatically added to the imported resources. You can then manage resources on the Resources tab and view the generated tag on the Overview tab of the application group.

Create an application group from another dynamic group

You can create an application group from a scaling group, an ACK cluster, or a Resource Orchestration Service (ROS) stack. The application group and dynamic group are then bound, and changes in the dynamic group are synchronized. For example, if an ECS instance is created in a scaling group, it is automatically added to the bound application group.

Create or delete cloud resources by using the Application Management feature

The preceding methods decouple the lifecycle of the application from the lifecycle of its resources. Resources are not automatically created or deleted when the application changes. To automatically manage cloud resource lifecycles through Application Management, use one of the following methods:

  • Create resources based on scenarios. Use orchestration templates provided by OOS to deploy resources with a few clicks in graphical mode.

  • Create resources based on custom templates. Advanced users can use their own orchestration templates to create resources.

Both methods use Resource Orchestration Service (ROS), a template-based Infrastructure as Code (IaC) service, to create and manage resources. Stacks are automatically deleted if the bound application groups are deleted.