All Products
Search
Document Center

Compute Nest:Buat layanan dari repositori Git

Last Updated:Apr 26, 2026

Compute Nest memungkinkan Anda membuat layanan dengan mengimpor repositori dari GitHub, Gitee, GitLab publik, atau Alibaba Cloud DevOps CodeUp. Fitur ini menyederhanakan pembuatan layanan bagi pengembang dan penyedia layanan, membantu Anda membangun, menguji, memperbarui, dan menerbitkan layanan ke Alibaba Cloud Marketplace lebih cepat. Topik ini menjelaskan cara membuat layanan dari repositori Git.

Prasyarat

Sebelum membuat layanan dari repositori Git, pastikan Anda telah menyiapkan repositori. Untuk informasi selengkapnya, lihat Buat repositori Git yang memenuhi spesifikasi Compute Nest.

Ikhtisar

Anda dapat mengonversi repositori Git Anda menjadi layanan Compute Nest. Untuk memulai, otorisasi Compute Nest untuk mengakses repositori Anda, impor repositori tersebut, lalu konfigurasikan pengaturan dasarnya. Fitur ini mendukung berbagai skenario dan opsi konfigurasi:

  • Compute Nest mendukung pengimporan repositori dari GitHub, Gitee, GitLab publik, dan Alibaba Cloud DevOps CodeUp setelah Anda memberikan otorisasi akses.

  • Beberapa skenario penerapan didukung.

    • Anda dapat memilih antara private service dan fully managed service.

      Service type

      Definition

      Description

      private service

      A service that deploys resources and software into a customer account.

      Use case: Suitable for PaaS and SaaS applications deployed within a VPC in the customer account.

      fully managed service

      A service that deploys resources and software in the service provider's account.

      Use case: Suitable for PaaS and SaaS services deployed within a VPC in the service provider's account. The service provider fully manages the customer's cloud resources and applications. Compute Nest supports scenarios with customer-dedicated resources, including two modes: managed single-tenant (fully dedicated resources) and managed ACK multi-tenant (resources dedicated per ACK pod).

    • Beberapa application runtimes dan deployment types didukung.

      Application runtime

      Deployment type

      Parameter

      Description

      container

      Docker Compose

      Docker Compose YAML path

      Specifies the path to the Docker Compose file in the repository.

      Docker Compose .env path

      Specifies the path to the Docker Compose .env file in the repository. If no .env file exists in the repository, the default value (.env) is used.

      User deployment parameters

      Sets custom environment variables that users can provide during deployment. For example, your .env file contains Password=test.

      You must configure fields such as Parameter Name, Environment Variable Name, Type, and Default Value. You can also configure advanced settings like Match Expression. To treat the parameter as a password, enable the Is Password Component toggle. Click the + Add button to add more parameters.

      This allows users to enter a custom password during deployment, which replaces the variable's value in the .env file.

      Dockerfile

      Dockerfile path

      Specifies the path to the Dockerfile in the repository.

      User deployment parameters

      Specifies the key for a Docker runtime environment variable. For example, in docker run -e key=value, value is the actual parameter value provided by the user during deployment.

      Advanced options: Docker image build parameters

      Specifies Docker image build arguments. This is useful when your Dockerfile uses the multi-stage builds feature and requires environment variables to be set before the image is built.

      Buildpacks

      User deployment parameters

      Specifies the key for a Docker runtime environment variable. For example, in docker run -e key=value, value is the actual parameter value provided by the user during deployment.

      Service port

      Specifies the port for the service. After deployment, the service is exposed at ip:port.

      Security group inbound port

      The inbound port of the security group, which acts as a firewall. Specify the ports to open based on your software's configuration.

      Kubernetes cluster

      Helm chart

      Chart directory

      Specifies the directory where the Helm chart is located. You can select a chart directory from the repository to configure the service.

      Chart values

      Defines variable parameters for chart deployment, often to override default values.

      Output type

      You can specify the output type, including the default instructions from the Helm chart or a custom output command.

      Linux Shell

      Source code

      root directory

      Specifies the root directory of the source code or application. Subsequent commands are executed in this directory.

      User deployment parameters

      Defines parameters to pass to the application's runtime command or script. Users will provide the actual values during deployment. For example, you can configure a parameter named MyPassword. The user-provided value is set as the PASSWORD environment variable. This variable can be referenced in runtime commands and is automatically substituted during execution.

      For example, you can configure echo "$PASSWORD" in the run command field to reference the parameter.

      Commands

      Specifies the commands to run when the application starts.

      base image

      Specifies the base image. You can choose images like CentOS 7.9, Node.js 20, or Docker 26.

      Service port

      The port exposed by the application.

      Security group inbound port

      Specifies the inbound ports to open on the firewall.

      Timeout period

      Sets the timeout for the runtime command to prevent resource waste if the startup process runs too long.

  • Mendukung pembuatan citra ECS terkelola: Untuk mengatasi potensi masalah jaringan dan kegagalan saat menarik (pull) citra Docker di Tiongkok daratan, Compute Nest dapat menggunakan akselerasi jaringan Alibaba Cloud untuk menarik citra Docker dari repositori Anda ke instans ECS. Compute Nest kemudian membangunnya menjadi citra ECS, yang membantu mencegah kegagalan pull. Citra ini dikelola oleh Compute Nest dan dibagikan ke Akun Alibaba Cloud Anda.

  • Mendukung pembaruan layanan dari repositori kode. Saat Anda melakukan push commit baru ke repositori, Anda dapat langsung memperbarui layanan tersebut. Compute Nest secara otomatis menarik versi repositori terbaru untuk membangun ulang layanan.

Prosedur

  1. Masuk ke Konsol Compute Nest.

  2. Pada panel navigasi kiri, pilih My Services. Di halaman My Services, klik tab Created Services, lalu klik Create Service.

  3. Di halaman Create Service, konfigurasikan informasi layanan.

    1. Pilih metode pembuatan dan atur informasi repositori.

      Parameter

      Description

      Select service creation method

      Select Create Service from Repository.

      Repository user/organization

      If your repository belongs to an organization, you can select your personal repository or the organization name.

      Repository name

      Select the repository from which you want to create the service.

      Repository branch

      Select a branch from the repository.

      After you select a branch, Compute Nest automatically scans it for a resource description file. If no file is detected, you cannot proceed to the next step.

    2. Setelah Anda memilih repositori, halaman konfigurasi layanan akan muncul secara otomatis. Konfigurasikan pengaturan sesuai kebutuhan Anda.

      Sebagai contoh, untuk menerapkan LobeChat yang mendukung self-hosting melalui Docker Compose, Anda dapat memilih opsi konfigurasi yang sesuai. Bagian User deployment parameters memungkinkan Anda memparametrisasi variabel lingkungan dari file .env Docker Compose, sehingga pengguna dapat memasukkan nilai kustom selama penerapan instans. Setelah menyelesaikan konfigurasi, klik Next Step: Basic Information Configuration.

      Halaman ini terbagi menjadi bagian Deployment Configuration dan Environment Configuration. Di bagian Deployment Configuration, pilih Service type (misalnya private service) dan service build region. Di bagian Environment Configuration, pilih application runtime (misalnya container) dan deployment type (misalnya Docker Compose), lalu konfigurasikan jalur file yang sesuai.

    3. Konfigurasikan informasi dasar untuk layanan.

      Parameter

      Description

      Service icon

      Upload an icon for the service. JPG and PNG formats are supported. For best results, use an image with a resolution of 192x192 pixels.

      Service name

      Enter a name for the service. The name must be 3 to 200 characters long and can contain Chinese characters, letters, digits, and underscores (_). A Chinese character counts as two characters.

      The system automatically generates a name based on your repository information. You can use the default name or specify a new one.

      Service description

      Enter a description for the service. The description must be 10 to 500 characters long. A Chinese character counts as two characters.

      Version description

      Enter a description for the service version. The description must be 1 to 200 characters long. We recommend including the specific software version. Version descriptions must be unique within a service.

      Service agreement documentation

      Enter the name and URL of the custom service agreement document provided by the service provider.

  4. Klik Create Service, lalu klik OK pada kotak dialog konfirmasi. Setelah permintaan pembuatan layanan dikirim, klik View Service pada notifikasi.

  5. Kembali ke halaman My Services. Status layanan adalah Creating. Anda dapat mengklik View Logs untuk memantau proses pembuatan. Jika pembuatan gagal, log kesalahan akan dihasilkan. Anda dapat menggunakan log tersebut untuk pemecahan masalah dan menyesuaikan pengaturan repositori serta parameter Anda. Pembuatan layanan berhasil jika pesan BuildService Success muncul dalam log.

  6. Segarkan halaman layanan. Status layanan berubah menjadi Pending Pre-release.

Langkah selanjutnya

  1. Perbarui layanan.

    Untuk memperbarui layanan di kemudian hari, klik tombol Modify Version dan pilih salah satu opsi: Update in Console atau Update by Synchronized Repository. Jika Anda memilih pembaruan dari repositori, Compute Nest akan menarik file terbaru dan membangun ulang layanan.

    Opsi Update in Console menyediakan antarmuka visual untuk pembaruan. Perubahan yang dilakukan di konsol tidak disinkronkan kembali ke repositori Anda.

  2. Uji layanan.

    Setelah menyimpan layanan, Anda dapat mengujinya sendiri atau melakukan pra-rilis kepada pelanggan tertentu untuk pengujian. Untuk informasi selengkapnya, lihat Test a service.

  3. Terbitkan layanan.

    Setelah layanan lolos pengujian, kirimkan untuk ditinjau. Setelah disetujui, Anda dapat menerbitkannya. Untuk informasi selengkapnya, lihat Publish a service.