Create an Apsara Devops pipeline to deploy an application

更新时间:
复制 MD 格式

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:

  1. Bind an Apsara DevOps enterprise

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

image

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

image

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.

image

Click Next to complete the enterprise binding.

After you bind the enterprise, grant Apsara DevOps permission to publish ECS applications.

image

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.

image

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

image

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

image

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

image

image

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

image

image

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.

image

image

image

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

image

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.

image

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

image

image

You can quickly add RAM users. Automatic synchronization is also supported.

image For more information about managing RAM members in an Apsara DevOps enterprise, see Add a RAM user.