Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating an Agent

Updated on 2025-02-12 GMT+08:00

Scenario

An agent is installed on a host and registered with CodeArts. It is used for code check and build tasks as a custom executor.

Restrictions

  • Install only one agent on a host. If multiple agents are installed, some of them may go offline during task execution.
  • Each agent executes only one task at a time.
  • To ensure successful installation, do not use temporary AK/SK.

Prerequisites

  • You have the owner or administrator permission for the target agent pool.
    NOTE:

    If you create an agent in the LA-Sao Paulo1 and LA-Santiago regions as an IAM Identity Center user (a user created in the IAM Identity Center), use the AK/SK of an IAM user who has at least the administrator permission.

  • An agent pool has been created. For details, see Creating an Agent Pool.
  • A host that meets the following requirements is available:
    • Specifications: 4 vCPUs | 8 GiB or above, disk space > 80 GiB
    • Java 8 and Git are installed. If the agent pool type is LINUX_DOCKER, Docker must also be installed.
      NOTE:
      • If you use a Linux host, you can choose auto agent installation, or manually install the agent using the root account.
      • If you use a Windows or macOS host, manually install the agent on it using the system administrator account.
      • If you use a Windows host, install 64-bit Java 8.
    • The host can access the public network.

Creating an Agent

  1. Go to the CodeArts homepage.

    1. Log in to the CodeArts console, click , and select a region.
    2. Click Access Service.

  2. Click the username on the navigation bar and choose All Account Settings.
  3. Choose Agent Pool > Agent Pool.
  4. Find the target agent pool in the agent pool list and click its name to display the Agents tab.
  5. Click Create Agent.
  6. Configure parameters as required.

    1. Configure the network environment for the host.
      Table 1 Configuration 1

      Configuration Item

      Description

      Install a JDK automatically

      The host must have a Java 8 (or later) environment.

      After this function is enabled, JDK is automatically installed in the /usr/local directory of the host.

      If this function is disabled, you need to install it manually. Learn how to install Java 8.

      This configuration item is displayed only when the agent pool type is LINUX or LINUX_DOCKER.

      Install Git automatically

      The host must have a Git environment.

      After this function is enabled, Git is automatically installed on the host.

      If this function is disabled, you need to install it manually. Learn how to install Git.

      This configuration item is displayed only when the agent pool type is LINUX or LINUX_DOCKER.

      Install Docker automatically

      The host must have a Docker environment.

      After this function is enabled, Docker is automatically installed in the /usr/bin directory of the host. After the installation is complete, the service is automatically registered and the Docker service is started.

      If this function is disabled, you need to install it manually. Learn how to install Docker.

      This configuration item is displayed only when the agent pool type is LINUX or LINUX_DOCKER.

      Restart Without Re-registration

      If this feature is enabled, the agent process will be automatically registered as a Linux system service that resumes when the host restarts. You do not need to create a new agent process.

      This configuration item is displayed only when the agent pool type is LINUX or LINUX_DOCKER.

    2. Configure authentication information.
      Table 2 Configuration 2

      Configuration Item

      Description

      AK

      Access key ID.

      Obtain the value from the access key file downloaded by referring to Obtaining an AK/SK.

      SK

      Secret access key.

      Obtain the value from the access key file downloaded by referring to Obtaining an AK/SK.

      Agent Name

      Agents with the same name cannot be installed on the same host.

      Set this parameter based on the site requirements. To facilitate management, it is recommended that the name be clear and associated with the agent IP address, such as 10.10.10.10-agent-01.

      Agent Workspace

      The working directory where the agent runs on the host and the workspace where tasks are executed. Different agents of the same host cannot use the same agent workspace.

      For easy management, specify a data disk. Example:

      • Linux: /opt/cloud/agent01
      • Windows: C:/opt/cloud/agent01
      • macOS: /opt/cloud/agent01
    3. Generate a command.

      Set the parameters, agree to the statements, and click Generate Command. The command for installing the agent is automatically generated in the command box.

      Click Copy Command.

  7. Log in to the host and run the copied installation command.

    • Linux host: Log in using the root account and then run the installation command.
    • Windows host: Log in as the administrator, open Git Bash, and then run the installation command.
    • macOS host: Log in using the root account and then run the installation command.
    If the following message is displayed, the installation is complete.
    Figure 1 Successful installation

  8. Return to the Agents tab and close the dialog box.

    After 10 to 30 seconds, refresh the page and check the Status column. If the status becomes Idle, the installation is successful.

Follow-up Operations

After creating agents, you can perform the following operations on them.

Table 3 Managing agents

Operation

Description

Viewing the agent list

On the Agents tab, view the agent status, memory usage, and available disk space.

There are five states:

  • Running: The agent is running tasks.
  • Idle: The agent is connected but not running any task.
  • Disabled: The agent is connected but cannot run tasks.
  • Offline: The agent is disconnected. Log in to reconnect, or delete if no longer needed.
  • Deleting: The agent is being deleted.

Enabling/Disabling an agent

On the Agents tab, click in the Operation column of the target agent to disable it. The status changes to Disabled. To enable the agent, click . The status changes to Idle.

Deleting an agent

  • Deleting a single agent: On the Agents tab, click in the Operation column of the target agent to delete it.
  • Deleting multiple agents: On the Agents tab, select the target agents and click Batch Delete.
NOTE:
  • Agents in the Running state cannot be deleted.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback