Getting Started
AppStack centers your development, testing, delivery, and operations on applications, making the process efficient, secure, and orderly. This guide explains the entire application delivery process with steps tailored to different roles.
As a resource administrator
As a resource administrator, you are responsible for centrally managing your organization's infrastructure resources and allocating them to business applications. Follow these three steps to host and allocate resources.
Step 1: Create a service connection
-
To host an Alibaba Cloud Container Service for Kubernetes (ACK) cluster, create a Container Service for Kubernetes (ACK) service connection to authorize access (see service connection). To host a Kubernetes cluster from another vendor or a self-managed Kubernetes cluster, connect directly using the cluster's kubeconfig. The cluster's API Server must be publicly accessible.
-
To host an Alibaba Cloud ECS instance, create an ECS service connection to authorize access (see service connection). To host a third-party or self-managed host, connect by installing an agent on the host. The host must be publicly accessible.
Step 2: Import resources
AppStack supports hosting self-managed Kubernetes clusters and traditional hosts. For details, see Kubernetes cluster hosting and host cluster hosting.
Step 3: Allocate resources to business applications
-
If you are allocating resources from a self-managed Kubernetes cluster, you can skip this step. You can specify the namespace later in the deployment orchestration.
-
If you are allocating resources from a traditional host cluster, go to the target host cluster's details page and create a deployment group. You can then allocate this deployment group to business applications. For more information, see associate a deployment group.
In the left navigation pane, click Resource Pool to go to the resource pool page. The top of the page displays statistics, such as the number of general-purpose Kubernetes clusters, self-managed host groups, deployed applications, and deployment environments. Below are detailed lists of Kubernetes clusters and host clusters, including fields such as display name, cluster name, owner, and creation time. You can find the target host cluster in the host cluster list and open its details page.
As an application owner
As an application owner, you are responsible for the entire go-live process and the day-to-day development and operations of an application. These five steps guide you from code commit to production release.
Step 1: Create an application
In AppStack, an application is a unit that can be independently delivered as a service. Go to AppStack, click Create Application, enter the Application Name, Tags, and Description, and then click Create.
The Application Name is the unique identifier for the application and cannot be changed after creation. Owner is a required field.
Step 2: Configure deployment orchestration
Define the application's deployment process. AppStack supports Kubernetes YAML and host scripts. You can use a single orchestration definition with variables to manage differences between environments.
-
For more information about Kubernetes YAML orchestration, see Kubernetes deployment orchestration.
On the Edit Application Orchestration page, select the target resource tab, such as demo-deployment. In the YAML editor on the left, modify the configuration and define placeholders using template variable syntax, such as
{{ .Values.containerPort }}. Click Extract Placeholders. The custom placeholders appear in the list on the right, where you can set their type to "variable" and specify a reference value. In the Reference Variable Group section at the bottom, associate a variable group. Variables defined in the group, such asport=8080, can be referenced by placeholders using the$(port)syntax. This allows for environment-specific configurations. When you are finished, click Save. -
For more information about host application script orchestration, see host deployment orchestration.
On the Edit Application Orchestration page (host deployment), configure the artifact section: Select the HTTP type. Set Package Source to
{{ .AppStack.artifact.demoapp }}, Save Path to/home/admin/app/package.tgz, and Execution User to root. The start script contains three sequential commands: create a directory, extract the package withtar, and rundeploy.sh start. The stop script issh /home/admin/application/deploy.sh stop. In the Artifacts panel on the right, add an artifact record forartifact.demoapp(the artifact package URL). In the Placeholders section, add a variableenvName(string, value sourced from a variable). Placeholders in the script can then be assigned values from the associated variable group.
Step 3: Plan environments
Configure the environments and resources required for application deployment.
-
AppStack provides three preset environments: a development environment, a testing environment, and a production environment. You can view them on the application environment list page.
Each environment card displays the environment level, deployment status, and version information. You can click Create Environment in the upper-right corner to create a custom environment, or click Deploy Now on an environment card to start a deployment.
-
You can also create a custom environment, select a deployment method, and associate the corresponding resources and variable groups. For more information, see environment management.
For Deployment Method, you can select Kubernetes deployment or host deployment. The available options depend on the application orchestration method, and each environment can be assigned only one. Based on the selected method, associate the corresponding resource type, such as a Kubernetes cluster. A variable group is used to replace variables in the orchestration during deployment.
Step 4: Set up the development process
-
Configure the application development process, which typically consists of testing, pre-production, and production pipelines. These pipelines include steps for building, deploying, and manual gates.
The production stage pipeline includes the following steps: Pipeline Source (associated with a code repository and the master branch) → Image Build → Release Approval (manual gate) → Production Environment Deployment.
-
For the deployment step, select AppStack deployment. Then, select the application and environment to deploy to. The artifact is typically the output from an upstream build stage.
In this example, set Application to spring-cloud-a and Environment to production environment-prod. For the Artifact data source, select the output from the upstream build stage and reference it in the format
Tag.${DATETIME}. Then, select the options Automatically create a deployment order, Manual confirmation when the last deployment fails, and Manual confirmation when a new orchestration version is available.
Step 5: Release the application
When the code for a business requirement is ready for deployment, commit it and run the development, testing, and other stage pipelines to deploy the application to the corresponding environments.
The pipeline execution view shows the names and running statuses (such as Running or Succeeded) of pipelines for each stage, including development, testing, pre-production, and production. From this view, you can confirm that each stage has completed successfully.
You can view the details of a deployment order to monitor the progress of a batched release.
On the deployment order details page, the Deployment Progress section displays the progress bar for the batched release (for example, a two-batch release with a pause-after-first-batch policy, where completed batches are marked in green). It also shows the resource topology from Deployment → ReplicaSet → Pod, allowing you to view the readiness status of each Pod instance.
After a successful deployment, go to the environment's details page to view its resource status, check logs, and perform other verification. Once you have verified each environment, release the application to production to complete the delivery process.
On the production environment details page, in the Workload tab, you can see that the Deployment spring-cloud-a-prod is Succeeded (2/2). Both Pods under it are in the Running state. Click Details or Logs in the Actions column for each Pod to view its runtime information.