订阅

UiPath 机器人

UiPath 机器人指南

Linux 机器人

About

Using robots in Linux environments allows you to run cross-platform unattended automations in Docker containers.

先决条件

开发跨平台自动化

Linux robots are only able to run unattended automations that do not require a user interface. For this, when creating an automation in Studio, make sure to select Cross-platform.
This way, only cross-platform activities are shown, while unsupported ones are hidden.

跨平台项目的默认活动包为:

  • UiPath.System.Activities
  • UiPath.WebAPI.Activities

部署

要在 Linux 环境中部署无人值守机器人,请按照以下步骤操作:

  1. Create an unattended robot in Orchestrator, as shown in this document, then save the machine key for later use.

  2. Open a command line terminal on the machine and get the Docker image:

docker pull registry.uipath.com/robot/runtime
  1. Start the downloaded image and connect the robot to Orchestrator:
docker run -e LICENSE_AGREEMENT=accept -e ORCHESTRATOR_URL="https://cloud.uipath.com/organization/tentant/orchestrator_" -e MACHINE_KEY="$KEY" -tid registry.uipath.com/robot/runtime

❗️

重要

  • In order to successfully start the robot, you must accept the license agreement by adding the -e LICENSE_AGREEMENT=accept parameter to the command.
  • Every time you run the command presented in step 3, a new robot is spawned in Orchestrator.

Useful Commands

Check the status of your robots on the machine:

docker ps -a

Disconnect a robot:

docker stop {container_id}

❗️

重要

Using docker kill {container_id} stops the robot but does not disconnect it from Orchestrator.

Start or reconnect a specific robot:

docker start {container_id}

Logging

如果您需要在容器实例的生命周期之外保留日志文件,请使用以下命令:

docker run -e LICENSE_AGREEMENT=accept -e MACHINE_KEY="{machine_key}" -e ORCHESTRATOR_URL="https://cloud.uipath.com/organization/tentant/orchestrator_" -v C:\Users\user.name\Desktop\logs:/root/.local/share/UiPath/Logs/ -ti registry.uipath.com/robot/runtime

📘

备注:

Robot Linux 映像基于 mcr.microsoft.com/dotnet/runtime 的 Alpine Linux 版本。应用程序所需的所有文件都放置在 /root/application directory 中。

在 Linux 机器人上运行作业

Running an unattended job on Linux robots is identical to the one for Windows.

远程调试

要测试您的流程,您可以使用以下命令启用调试模式:

docker run -e LICENSE_AGREEMENT=accept -e DEBUG_SESSION=true -ti -p 8573:8573 registry.uipath.com/robot/runtime

The command starts a new robot container with the Debug feature enabled on port 8573. After the container is started, you can connect to the docker image using host machine ip and the port 8573, making use of the Studio Remote Debugging feature.

If you want to debug an already started Robot container, you can use the unattended robot connection feature with a robot container connected to Orchestrator.

Updated 12 days ago


Linux 机器人


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。