Alibaba Cloud Compute Nest is a one-stop platform that simplifies software deployment in the cloud. You can configure your Git repository to conform to Compute Nest service specifications to automatically deploy your software to the cloud. Compute Nest provides official templates for different architectures and deployment types. You can copy and customize these templates from the official Compute Nest repository. Then, you can use the Compute Nest console to create and publish services, which deploys your software to the cloud. This topic describes how to create a Git repository that conforms to Compute Nest specifications.
Configure a Git repository
Software developers often maintain their own repositories on platforms such as GitHub, GitLab, or Gitee. Typically, deploying software requires you to manually set up servers and build the environment. Alibaba Cloud Compute Nest provides a one-stop platform for cloud software deployment. By configuring your repository to conform to Compute Nest service specifications, you can automatically deploy your software to the cloud as a cloud-based application. If you do not have a repository, you can copy a template from the official Compute Nest repository to your account.
Recommended official repositories
As of February 28, 2024, Compute Nest provides 8 private service templates and 5 fully managed service templates. These templates cover various architectural scenarios.
Service type | Template name | Architecture | Deployment type | GitHub address |
Private service | Spring Boot package for ECS Basic Edition | Single ECS | Package (file deployment) | https://github.com/aliyun-computenest/springboot-ecs-package-demo.git |
Spring Boot image for ECS Basic Edition | Single ECS | ECS image deployment | https://github.com/aliyun-computenest/springboot-ecs-image-demo.git | |
kodbox for Function Compute | FC service | None | ||
WordPress | Basic Edition: ECS + RDS High-availability Edition: Multiple ECS instances + RDS + SLB + EIP | Package (file deployment) | https://github.com/aliyun-computenest/wordpress-ecs-demo.git | |
Spring Boot package for ECS with Auto Scaling | ECS + SLB + EIP + ESS | Package (file deployment) | https://github.com/aliyun-computenest/springboot-scaling-ecs-demo.git | |
Spring Boot for ACK container | ACK + SLB + EIP | Container image | https://github.com/aliyun-computenest/springboot-ack-docker-demo.git | |
Spring Boot for ECS container | Single ECS | Container image | https://github.com/aliyun-computenest/springboot-ecs-docker-demo.git | |
Spring Boot for ACK Helm | ACK + SLB + EIP | Container image, Helm Chart deployment | https://github.com/aliyun-computenest/springboot-ack-helm-demo.git | |
Single-tenant fully managed service | Spring Boot single-tenant managed edition | ECS + RDS + EIP | Package (file deployment) | https://github.com/aliyun-computenest/springboot-managed-demo.git |
ECS + SLB architecture for MySQL (supports PrivateLink) | ECS + SLB | Package (file deployment) | https://github.com/aliyun-computenest/mysql-managed-demo.git | |
WordPress single-tenant managed edition for ECS | ECS + local MySQL + EIP | Package (file deployment) | https://github.com/aliyun-computenest/wordpress-managed-demo.git | |
WordPress multi-tenant managed edition for ACK | ACK + local MySQL | No deployment artifact. Pods are deployed using YAML. | https://github.com/aliyun-computenest/wordpress-managed-ack-demo.git | |
MariaDB multi-tenant managed edition for ACK | ACK + local MariaDB | No deployment artifact. Pods are deployed using YAML. | https://github.com/aliyun-computenest/mariadb-managed-ack-demo.git |
Repository directory and file description
This section uses the WordPress single-tenant managed edition for ECS repository as an example to describe the directories and files in the repository. Review the function of each file to ensure that you can correctly embed your software.
wordpress-managed-demo
├── README.md - README
├── docs - Service documentation files
│ └── index.md
├── resources - Service resource files
│ ├── icons
│ │ └── service_logo.png - Default service icon
│ └── artifact_resources - Resource files for artifacts
│ └── file - Directory for file artifacts
│ ├── epel-release-latest-7.noarch.rpm - EPEL installation package
│ ├── remi-release-7.rpm - Remi installation package
│ └── wordpress-6.2-zh_CN.tar.gz - WordPress file artifact
├── ros_templates - Service ROS templates. Multiple templates can be included.
│ └── cluster.yaml - ROS template for Cluster Edition
│ └── template.yaml - ROS template for Basic Edition
├── config.yaml - Service configuration file. The Compute Nest command-line tool (computenest-cli) uses this file to build the service.
├── preset_parameters.yaml - Preset parameters for service providers, such as VpcId and VSwitchId. The content of the ROS template is rendered as a form for the provider to fill in.Configure the config.yaml file
This is the core configuration file that computenest-cli uses to build the service. In this file, you can specify the service configuration. The computenest-cli then calls the corresponding Compute Nest OpenAPI and passes the specified parameters. During service creation, APIs are called to create the Compute Nest service, create deployment artifacts, and create an ECS image if you are using an image-based deployment.
Service:
RegionId: cn-hangzhou # The region where the service is deployed.
DeployType: ros # The deployment type. This uses Resource Orchestration Service (ROS).
TenantType: SingleTenant # The tenant type. This is a single-tenant service.
DeployMetadata: # The deployment metadata configuration.
ServiceInstanceNameRule:
Prefix: wp # The prefix for the service instance name.
SupplierDeployMetadata: # The supplier deployment metadata.
RoleName: ${RoleName} # The name of the role to use.
UserType: Aliyun # The user type. This is an Alibaba Cloud user.
SupplierTemplateConfigs: # An array of supplier template configurations.
- Name: High-availability Edition # The template name.
Url: 'templates/template.yaml' # The URL of the template file.
PredefinedParameters: [] # A list of predefined parameters.
HiddenParameterKeys: # A list of hidden parameter keys.
- VpcId
- VSwitchId
- ZoneId
ParameterMappings: # The parameter mapping configuration.
- ParameterKey: RegionId
ParameterMappingKeys: # The parameter mapping keys.
- VpcId
- ZoneId
- VSwitchId
ParameterValueMapping: # The parameter value mapping configuration. This specifies parameter values for a region.
cn-hangzhou:
Parameters:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
VSwitchId: ${VSwitchId}
FileArtifactRelation: # The file deployment artifact association configuration.
'{{ computenest::file::wordpress }}': # The identifier for the file deployment artifact association. You can use this identifier in templates/template.yaml to specify the deployment artifact.
ArtifactId: ${Artifact.Artifact_1.ArtifactId} # The ID of the file deployment artifact.
ArtifactVersion: ${Artifact.Artifact_1.ArtifactVersion} # The version of the file deployment artifact.
TemplateConfigs: # An array of template configurations.
- Name: High-availability Edition
Url: templates/parameters.yaml # The URL of the parameter template file.
AllowedRegions: # A list of allowed regions.
- cn-hangzhou
ServiceType: managed # The service type. This is a managed service.
ServiceInfo: # The service information configuration.
Locale: en-US # The localization configuration. This is for English (US).
ShortDescription: WordPress demo # A short description.
Image: 'icons/service_logo.jpg' # The service icon.
Name: WordPress Managed Edition # The service name.
ShareType: Public # The share type. This is a public service.
ApprovalType: Manual # The approval type. This requires manual approval.
Artifact: # The deployment artifact configuration. After configuration, the corresponding Compute Nest deployment artifact is built.
Artifact_1:
ArtifactType: File # The deployment artifact type. This is a file.
ArtifactName: WordPress # The name of the deployment artifact.
Description: WordPress # The description.
ArtifactProperty: # The deployment artifact property configuration.
RegionId: cn-hangzhou # The region where the deployment artifact is located.
Url: 'artifacts/wordpress-6.2-en_US.tar.gz' # The URL of the deployment artifact file.Publish the service
After you configure the repository, you can log on to the Compute Nest console and create a service directly from the repository to deploy your software to the cloud.