Create an application from a Git repository
Application Management integrates capabilities for resources, security, monitoring, events, O&M, and release. It serves developers who need to quickly create applications and O&M teams that need unified resource management, and it improves the automation level and efficiency of O&M work. If your code is hosted in a Git repository and you want to manage it directly in Application Management, follow the steps in this topic to create an application from the Git repository.
Background information
Before you create an application from a Git repository, familiarize yourself with the Cloud Native Buildpacks (CNB) open source technology. CNB is designed to give developers a more efficient and more secure way to convert code into container images that run in any environment.
CNB supports multiple programming languages and frameworks, and it automatically selects the appropriate runtime and libraries based on the requirements of the application, which ensures consistency across different environments. CNB also uses layered images to optimize build time and storage efficiency, which makes updates and maintenance more efficient and flexible. For more information, see Cloud Native Buildpacks.
Features
Application Management supports the following Git-based workflows:
-
You provide a code repository address and authorize Application Management to access it. Application Management clones the repository to the build server, builds a container image from the repository, uploads the image to Container Registry (ACR), creates one ECS instance based on the parameters that you specify, deploys the Docker runtime environment on the cloud server, and runs the container application.
-
After the code in the repository is updated, you can update the application program with one click in Application Management. Application Management pulls the latest code from the remote repository, builds and updates the container image, and runs the new version of the container application.
-
You can modify the ECS instance configuration, including instance type and public bandwidth.
Limits
-
Only single-instance ECS applications are supported, with Alibaba Cloud Linux 3 as the operating system.
-
Public and private code repositories on the GitHub and Gitee code hosting platforms are supported. The repository must contain a supported programming language, namely Java, Python, Go, Node.js, Ruby, or PHP. Only then can the application be deployed directly.
-
The code repository must meet the Buildpacks requirements so that it can be built and run correctly.
For example, Java projects need a
pom.xmlorgradle.xxxfile. Python projects need aProcfileto define the start command.NoteCheck whether your code repository meets the requirements and whether you need to add configuration files so that the application code can be built and run correctly.
Procedure
-
Navigate to the CloudOps Orchestration Service (OOS) > Application Management page.
-
On the Create Application tab, set the creation method to Create From Git Repository.
-
In the Application Source section, configure the Git platform, the Git repository user, and other parameters.
Authorize the Application Management OAuth app to access the code repository as your account on the code hosting platform.
ImportantTo pull the code successfully, you must complete the authorization even if you deploy a public code repository. Code hosting platforms enforce strict throttling on unauthenticated API calls, and unauthenticated API calls fail easily.

-
In the Basic Information and Configure Application Groups sections, set the application name, the application description, and the deployment region and name of the application group.
-
In the Application Configuration section, select a Code Branch, and then set the environment variables for the container runtime and the application listening port.
The application listening port is passed to the application process as the PORT environment variable. The application code must read the PORT environment variable and listen on this port. Otherwise, enter the port number on which the application code listens by default.

-
In the ECS instance password and ECS instance configuration sections, set the initial password of the new cloud server, and select the billing method, instance type, and network settings of the cloud server.
-
After you review the cost details, click Create.
NoteIt takes some time to build the application. Please wait.
After the application is deployed, view the access endpoint of the application in the Application Output section of the {value, select, home {Overview} events {Events} tags {Tags} diagnostic {Diagnostics} stability {ECS Care Plans} cloudAssistant {Cloud Assistant} cloudAssistantNext {Cloud Assistant (New Version)} app {Applications} elasticAgent {Elastic Computing Agent} instancesAndImages {Instances & Images} server {Instances} image {Images} imageCatalog {Image Catalog} softwareLicense {Software License} eci {Elastic Container Instance} ddh {Dedicated Hosts} shp {Smart Hosting Pools} cloudBox {CloudBox} dedicatedRegion {Dedicated Region} cluster {Super Computing Clusters} reservedInstance {Reserved Instances} resourceAssurance {Resource Advisor} elasticityAssurance {Resource Reservation (Elastic Assurance & Capacity Reservation)} savingPlan {Savings Plans} networkAndSecurity {Network & Security} securityGroup {Security Groups} networkInterfaces {Elastic Network Interfaces} keyPair {Key Pairs} vpc {VPC} storageAndSnapshots {Storage & Snapshots} machineBackup {ECS Instance Backup} disk {Cloud Disks} snapshot {Snapshots} volume {Shared Block Storage} storageCapacityUnit {Storage Capacity Units} dedicatedBlockStorageCluster {Dedicated Block Storage Clusters} diskDisasterReplica {Async Replication} nas {NAS} deploymentAndElastic {Deployment & Elasticity} launchTemplate {Launch Templates} deploymentSet {Deployment Sets} ros {ROS} fleet {Auto Provisioning} ess {Auto Scaling} imageBuilder {Image Builder} smc {SMC} opsAndMonitor {Maintenance & Monitoring} oos {OOS} migration {Migration Plans} log {Operation Logs} task {Tasks} cloudMonitor {CloudMonitor} license {License Manager} product {Frequently Used Services} prefixList {Prefix Lists} prefixList_portRangeList {Prefix Lists and Port Lists} commonly {My Services} feedback {Feedback} storage {Block Storage} spotAdvisor {Preemptible Instances} securityGroupSnapshotPolicy {Security Group Snapshot Policy} fileBackUp {File Backup} other {{value}}} tab of the application. An HTTP address is returned by default.

Related operations
-
Quick operations
Quick operations include Update Application, Update Application Program, modify environment variables, and modify cloud server configurations. This example uses Update Application Program:
-
In the Quick Actions section of the {value, select, home {Overview} events {Events} tags {Tags} diagnostic {Diagnostics} stability {ECS Care Plans} cloudAssistant {Cloud Assistant} cloudAssistantNext {Cloud Assistant (New Version)} app {Applications} elasticAgent {Elastic Computing Agent} instancesAndImages {Instances & Images} server {Instances} image {Images} imageCatalog {Image Catalog} softwareLicense {Software License} eci {Elastic Container Instance} ddh {Dedicated Hosts} shp {Smart Hosting Pools} cloudBox {CloudBox} dedicatedRegion {Dedicated Region} cluster {Super Computing Clusters} reservedInstance {Reserved Instances} resourceAssurance {Resource Advisor} elasticityAssurance {Resource Reservation (Elastic Assurance & Capacity Reservation)} savingPlan {Savings Plans} networkAndSecurity {Network & Security} securityGroup {Security Groups} networkInterfaces {Elastic Network Interfaces} keyPair {Key Pairs} vpc {VPC} storageAndSnapshots {Storage & Snapshots} machineBackup {ECS Instance Backup} disk {Cloud Disks} snapshot {Snapshots} volume {Shared Block Storage} storageCapacityUnit {Storage Capacity Units} dedicatedBlockStorageCluster {Dedicated Block Storage Clusters} diskDisasterReplica {Async Replication} nas {NAS} deploymentAndElastic {Deployment & Elasticity} launchTemplate {Launch Templates} deploymentSet {Deployment Sets} ros {ROS} fleet {Auto Provisioning} ess {Auto Scaling} imageBuilder {Image Builder} smc {SMC} opsAndMonitor {Maintenance & Monitoring} oos {OOS} migration {Migration Plans} log {Operation Logs} task {Tasks} cloudMonitor {CloudMonitor} license {License Manager} product {Frequently Used Services} prefixList {Prefix Lists} prefixList_portRangeList {Prefix Lists and Port Lists} commonly {My Services} feedback {Feedback} storage {Block Storage} spotAdvisor {Preemptible Instances} securityGroupSnapshotPolicy {Security Group Snapshot Policy} fileBackUp {File Backup} other {{value}}} tab of the application, click Update Application Program.
-
Select a code branch to update the application program.
If the branch hasn't changed, it must have a new commit to trigger an update.

-
Review the changes and submit the update.
-
-
Create a new group
If the application was created from a Git repository, a new application group must also be based on the same code repository. You can select a code branch to deploy, and the remaining steps are the same as those for creating an application.
FAQ
If application build or deployment fails, see Failure when Building and Deploying Applications from a Git Code Repository.