You can use an Apsara DevOps pipeline to automate code compilation, building, and application deployment on ECS instances.
Description
Alibaba Cloud Apsara DevOps is a cloud-native DevOps platform that helps enterprises achieve R&D and organizational agility through modern technologies and development patterns to create "dual-agility" organizations and deliver a tenfold increase in efficiency.
Pipeline, also known as flow, is an enterprise-grade, automated R&D delivery pipeline in the Apsara DevOps product suite. It provides continuous integration, continuous validation, and continuous release capabilities to automate builds, integrations, and deployments from development to production.
This topic walks you through setting up an Apsara DevOps pipeline to automate code compilation, building, and application deployment.
Limitations
Windows servers are not supported.
Procedure
To set up an Apsara DevOps pipeline, complete the following steps:
-
Bind an Apsara DevOps enterprise
-
Grant Apsara DevOps permission to publish ECS applications
-
Create or associate a pipeline
Go to Application Management, select your application, and then go to Deployment Management. Bind your Alibaba Cloud account to an Apsara DevOps enterprise. If your account is not associated with an enterprise, follow the prompts to bind or create one.

If you already have an Apsara DevOps enterprise, select it. Otherwise, click Create Enterprise and enter a name for the new enterprise.

After the enterprise is created, go to the enterprise page to access all Apsara DevOps tools.
Return to the ECS application page and bind the enterprise. If the enterprise list is empty, refresh the page.

Click Next to complete the enterprise binding.
After you bind the enterprise, grant Apsara DevOps permission to publish ECS applications.

After authorization is complete, you can create or associate a pipeline.
If your Apsara DevOps enterprise already has pipelines, select one to associate. Otherwise, create a new pipeline.

To create a pipeline, select a template. The following example uses the Java Build, Deploy to Alibaba Cloud ECS Application template.

The pipeline editor page opens. Configure your code source. The following example uses the sample code source provided by Apsara DevOps.

Open the Java Build and Upload node. Edit your build script and specify the directory for packaging the build output.


Click the ECS Application Deployment node. Select the target ECS application and application group, and then enter the deployment script.


Click Save and Run to start the build and release task. When the pipeline reaches the deployment node, click View Deployment Details to check the deployment status. If you selected a phased release, you can decide whether to proceed after each phase completes.



After the pipeline finishes, return to the application's Deployment Management page to view the associated pipeline information.

Manage Apsara Devops enterprise members
Resource Access Management (RAM) users who have not joined the Apsara DevOps enterprise cannot manage deployments. When they access the Deployment Management page, a message similar to the following may appear.

The enterprise administrator must add these users. Go to the Apsara DevOps enterprise admin console and choose Members > Invite Enterprise Members.


You can quickly add RAM users. Automatic synchronization is also supported.
For more information about managing RAM members in an Apsara DevOps enterprise, see Add a RAM user.