Create an Apsara Devops pipeline to deploy an application

Updated at:

You can use an Alibaba Cloud DevOps pipeline to automate code compilation, building, and application deployment on ECS instances.

Description

Alibaba Cloud 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 Alibaba Cloud 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 Alibaba Cloud DevOps pipeline to automate code compilation, building, and application deployment.

Limitations

Windows servers are not supported.

Procedure

To set up an Alibaba Cloud DevOps pipeline, complete the following steps:

  1. Bind an Alibaba Cloud DevOps enterprise

  2. Grant Alibaba Cloud DevOps permission to publish ECS applications

  3. 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 Alibaba Cloud DevOps enterprise. If your account is not associated with an enterprise, follow the prompts to bind or create one.

If you already have an Alibaba Cloud 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 Alibaba Cloud 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 Alibaba Cloud DevOps permission to publish ECS applications.

After authorization is complete, you can create or associate a pipeline.

If your Alibaba Cloud 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 Alibaba Cloud 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 Alibaba Cloud DevOps enterprise members

Resource Access Management (RAM) users who have not joined the Alibaba Cloud 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 Alibaba Cloud 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 Alibaba Cloud DevOps enterprise, see Add a RAM user.