The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.

From Definition Node

Last updated: 2024-09-05 16:33:40

This article introduces how to use the Definition Node.

Prerequisites

Before configuring the CODING-CI build environment, you must activate the CODING DevOps service for your Tencent Cloud account. For details, please refer to Activate Services.

Open Project

1. log in to CODING console, click Team Domain to enter the CODING page.
2. After entering the target project, select Continuous Integration from the left navigation bar

Description of the Feature

In actual development projects, the involved development environments can be diverse. When the build environment of the default node cannot meet the project's runtime requirements, such as needing to use macOS Xcode to build an iOS application, you can use the Definition Node (Physical machine/Virtual machine/Container, etc.) to run specific tasks.
When accessing the build node, you need to specify the build node pool to be accessed. Build nodes cannot exist independently without being part of a node pool. Build Node Pool can be of two types: team and project.
Note:
Using the Definition Node is equivalent to bringing your build machine under the control of CODING. To ensure the security of your machine and intranet, please keep your username and password safe, and it is recommended to enable secondary authentication for log in. If necessary, you also need to formulate security policies for the intranet of the build machine to ensure that your machine and intranet are not subject to unauthorized access and attacks.

Access Node

The process of accessing the Definition Node essentially involves running the Worker service in the node, click to learn Worker Common Commands.
Currently, macOS, Windows, and Linux environments are supported for access to the build plan node pool.

Recommended configuration

CPU: 8 cores or above.
Memory: 16 GB or above.

Environmental Dependencies

Python 3.6, Python 3.7, Python 3.8, Python 3.9
Click to visit Project Address for downloading.
Git ≥ 2.8
Click to visit Project Address for downloading.
Java 8, Java 11
Click to visit Project Address for downloading.
Jenkins



Windows: Go to the C:/ directory, create the codingci/tools directory. Download the jenkins.war and jenkins_home.zip files there, and unzip the jenkins_home.zip file in the tools/ directory.
Linux: Go to the /root/ directory, create the codingci/tools directory. Download the jenkins.war and jenkins_home.zip files there, and unzip the jenkins_home.zip file in the tools/ directory.
macOS: Go to the ~/ directory, create the codingci/tools directory. Download the jenkins.war and jenkins_home.zip files there, and unzip the jenkins_home.zip file in the tools/ directory.
Note:
Pre-installing the above environments is a prerequisite for integrating a self-definition node. To ensure the build plan runs smoothly after integration, different environments may still need to be pre-installed depending on the task or plugin requirements. You can refer to Default Node Environment to install common SDKs and TCCLI.

macOS

Command Integration

1. Go to the build node, select Integrate New Node > macOS, choose Bash as the integration method, select the corresponding node pool in the integration configuration, click Generate Access Configuration and Copy.



2. After entering the command in the terminal, wait for the service to be downloaded. After the installation is complete, you can use the following command for verification:
qci_worker version
The default installation directory for command integration is /root/codingci. If you want to specify the installation directory, please refer to Specify Installation Directory.

Manual Integration

Before using the manual integration method, please ensure that the node meets the Environment Dependencies requirements mentioned above.
1. Select Manual Integration as the integration method, follow the prompts to enter the command in the terminal to install the client, that is, to install the Worker service.



2. Select the node pool you want to integrate, click One-Click Generation and Copy to generate the initialization command.
3. Execute the automatically generated client startup command in the terminal to keep the build node online.

Windows

Command Integration

1. Select Continuous Integration > Build Nodes, click the Integrate New Node button in the upper right corner, choose Windows, and select the Powershell integration method.



2. After installation, you can use the following command for verification:
qci_worker version
The default installation directory for command integration is /root/codingci. If you want to specify the installation directory, please refer to Specify Installation Directory.

Manual Integration

Before using the manual integration method, please ensure that the node meets the Environment Dependencies requirements mentioned above.
1. Select Manual Integration as the integration method, follow the prompts to enter the command in the terminal to install the client, that is, to install the Worker service.



2. Select the node pool you want to integrate, click One-Click Generation and Copy to generate the initialization command.
3. Execute the automatically generated client startup command in the terminal to keep the build node online.

Linux

Command Integration

1. Select Continuous Integration > Build Nodes, click the Integrate New Node button in the upper right corner, choose Linux, and select the Bash integration method. After configuration, run the generated integration command in the Linux environment.



2. After installation, you can use the following command for verification:
qci_worker version
The default installation directory for command integration is /root/codingci. If you want to specify the installation directory, please refer to Specify Installation Directory.

Manual Integration

Before using the manual integration method, please ensure that the node meets the Environment Dependencies requirements mentioned above.
1. Select Manual Integration as the integration method, follow the prompts to enter the command in the terminal to install the client, that is, to install the Worker service.



2. Select the node pool you want to integrate, click One-Click Generation and Copy to generate the initialization command.
3. Execute the automatically generated client startup command in the terminal to keep the build node online.

Start the Daemon Process

After installation, you need to run the daemon process on the build node to listen for and retrieve CI tasks issued by the CODING backend. Below are the run/delete command lines:
# Run in the background
qci_worker up -d
# Run in the foreground
qci_worker up
# Temporarily stop running
qci_worker stop