Managing applications created from Code

Key Features

  • Input the code repository URL to trigger the S2I process, which converts the source code into a image and publishes it as an application.
  • When the source code is updated, initiate the Rebuild action via the visual interface to update the application version with a single click.

Advantages

  • Simplifies the process of creating and upgrading applications from code.
  • Lowers the barrier for developers, eliminating the need to understand the details of containerization.
  • Provides a visual construction process and operational management, facilitating problem localization, analysis, and troubleshooting.

Prerequisites

Procedure

  1. Container Platform, navigate to Application > Application.

  2. Click Create.

  3. Select the Create from Code.

  4. Refer to the parameter descriptions below to complete the configuration.

    RegionParameterDescription
    Code RepositoryType
    • Platform Integrated: Choose a code repository that is integrated with the platform and already allocated for the current project; the platform supports GitLab, GitHub, and Bitbucket.
    • Input: Use a code repository URL that is not integrated with the platform.
    Integrated Project NameThe name of the integration tool project assigned or associated with the current project by the Administrator.
    Repository AddressSelect or input the address of the code repository that stores the source code.
    Version IdentifierSupports creating applications based on branches, tags, or commits in the code repository. Among them:
    • When the version identifier is a branch, only the latest commit under the selected branch is supported for creating applications.
    • When the version identifier is a tag or commit, the latest tag or commit in the code repository is selected by default. However, you can also choose other versions as needed.
    Context dirOptional directory for the source code, used as a context directory for build.
    SecretWhen using an input code repository, you can add an authentication secret as needed.
    Builder Image
    • An image that includes specific programming language runtime environments, dependency libraries, and S2I scripts. Its main purpose is to convert source code into runnable application images.
    • The supported builder images, include: Golang, Java, Node.js, and Python.
    VersionSelect the runtime environment version that is compatible with your source code to ensure smooth application execution.
    BuildBuild TypeCurrently, only the Build method is supported for constructing application images. This method simplifies and automates the complex image building process, allowing developers to focus solely on code development. The general process is as follows:
    1. After installed Alauda Container Platform Builds and creating the Shipyard instance, the system automatically generates cluster-level resources, such as ClusterBuildStrategy, and defines a standardized build process. This process includes detailed build steps and necessary build parameters, thereby enabling Source-to-Image (S2I) builds. For detailed information, refer to: Installing Alauda Container Platform Builds
    2. Create Build type resources based on the above strategies and the information provided in the form. These resources specify build strategies, build parameters, source code repositories, output image repositories, and other relevant information.
    3. Create BuildRun type resources to initiate specific build instances, which coordinate the entire build process.
    4. After completing the BuildRun creation, the system will automatically generate the corresponding TaskRun resource instance. This TaskRun instance triggers the Tekton pipeline build and creates a Pod to execute the build process. The Pod is responsible for the actual build work, which includes: Pulling the source code from the code repository.
      Calling the specified builder image.
      Executing the build process.
    Image URLAfter the build is complete, specify the target image repository address for the application.
    Application-Fill in the application configuration as needed. For specific details, refer to the parameter descriptions in the Creating applications from Image documentation.
    Network-
    • Target Port: The actual port that the application inside the container listens on. When external access is enabled, all matching traffic will be forwarded to this port to provide external services.
    • Other Parameters: Please refer to the parameter descriptions in the Creating Ingress documentation.
    Label Annotations-Fill in the relevant labels and annotations as needed.
  5. After filling in the parameters, click on Create.

  6. You can view the corresponding deployment on the Details page.

Build

After the application has been created, the corresponding information can be viewed on the details page.

ParameterDescription
BuildClick the link to view the specific build (Build) and build task (BuildRun) resource information and YAML.
Start BuildWhen the build fails or the source code changes, you can click this button to re-execute the build task.