订阅

UiPath Orchestrator

UiPath Orchestrator 指南

Elastic Robot Orchestration

概述


Elastic Robot Orchestration 允许 UiPath 在云中为您扩展和管理机器人,提供了一种自动扩展无人值守计算机的方法。我们代表您管理这些机器人,但它们仍在您的云中,您可以选择要将多少机器人编排流程委派给我们。

You can customize the auto-scaling strategy of robots through controls such as:

  • setting a maximum number of machines you want to allow us to create
  • choosing to optimize for speed, for cost, or choosing a balanced model
  • scheduling different settings for certain periods when, by exception, you need more or less speed.

Supported cloud providers

您可以使用以下一种云服务提供程序将您的虚拟机 (VM) 托管在云中,以实现弹性机器人编排:

  • Amazon Web Services (AWS)
  • Google Cloud Platform (GCP)
  • Microsoft Azure.

Machine provisioning options

您可以:

  • 创建通用虚拟机映像,我们会将其用作模板,以便在机器人需要运行作业时按需创建计算机。您可以设置计算机的创建数量和时间限制,然后交给我们完成工作。
  • 添加自定义虚拟机,以便在需要机器人运行流程时使用。

以下是两个选项之间区别的摘要:

Manually Create MachinesAutomatically Create Machines
Create and delete machinesyou create and delete the machines yourselfwe can automatically create new machines when needed for better performance and delete any machines not in use
Machine scalinglimited to the number of machines providedwe create as many machines as needed to optimally handle the workload, within parameters you set
Virtual machine setupset up multiple individual VMsset up a single VM image
Install and set up UiPath Robot on each machineautomatedautomated
Connect to Orchestratorautomatedautomated
Run jobsautomatedautomated
Start and stop VMsautomatedautomated
VM customizationcustomize the VMs you use (domain-joined, machine size, machine name, network options, and more)VM image must be configured as recommended:
For Azure | For AWS | For GCP

 

Sample configuration

对于这两个云服务提供程序,Orchestrator 中的设置过程类似。主要区别在于如何设置每个提供程序和创建虚拟机。
以下概述了使用 Microsoft Azure 作为云服务提供程序和通用虚拟机时的流程:

 

要求


要选择弹性机器人编排,您需要满足以下条件之一:

Azure requirements

您需要 Microsoft Azure 订阅才能托管云机器人。
您必须设置 Azure 并从 Azure 管理员那里获取以下详细信息以连接 Orchestrator:

  • 客户端 ID - 客户端应用注册的唯一标识符
  • 客户端密钥 - 应用注册的密码
  • 订阅 ID - 您组织的 Azure 订阅的唯一密钥
  • 目录(租户)ID - 在 Azure 订阅中使用的租户的唯一密钥。

See Setup in Azure for instructions.

AWS requirements

您需要 Amazon Web Services (AWS) 订阅和 Amazon Elastic Compute Cloud (Amazon EC2) 才能托管您的云机器人。
您必须设置 AWS 并从 AWS 管理员那里获取 AWS 访问密钥,该密钥包括:

  • 访问密钥 ID - Orchestrator 连接的唯一标识符
  • 秘密访问密钥 - 此连接的密码。

These are long-term credentials and, like a username and password, Orchestrator needs to use the access key ID and secret access key together to authenticate requests it makes to the AWS API.

See Setup in AWS for instructions.

GCP requirements

You need a Google Cloud Platform (GCP) subscription which includes Compute Engine for hosting your cloud robots.
You must set up a GCP project and get the following details from your GCP administrator to connect Orchestrator:

  • Client Id - the unique identifier for your GCP project
  • Private Key - the key for the GCP service account used for the integration.

See Setup in GCP for instructions.

 

Cloud provider setup


在 Azure 中设置

如果您的云服务提供程序是 Microsoft Azure,请按照本节中的说明进行操作,以准备将 Orchestrator 连接到 Azure。

If you are not the Azure administrator, skip this section and instead reach out to your IT team to perform these steps and ask them to provide the details listed under Azure Requirements.

  1. 使用管理员帐户登录到 Azure。
  2. 导航到“应用注册”并为您的 Orchestrator 实例创建应用注册
  3. 复制应用程序(客户端)ID目录(租户)ID 并保存以备后用。
640640
  1. 导航到“证书和密码”,然后创建一个客户端密码
  2. 复制客户端密码的并将其保存以备后用。
860860
  1. 导航到“资源组”,然后为 Orchestrator 创建一个资源组
  2. 复制订阅 ID 并保存以供以后使用。
    If you already have a resource group that you want to use, open the overview for that resource group to get the Subscription ID.
575575
  1. 导航到“访问控制 (IAM)”,搜索您为 Orchestrator 应用程序注册提供的名称,然后为其分配参与者角色

Preparing a virtual machine image


📘

备注:

如果您打算使用自定义虚拟机而不是模板虚拟机,请跳过本部分,创建要用于弹性机器人编排的虚拟机。

机器人需要在计算机上运行。作为弹性机器人编排的一部分,我们可以使用您的云托管虚拟机 (VM) 按需创建计算机,以便在需要时运行机器人。

在 Azure 中创建虚拟机时,Microsoft 提供了一组映像来构建您的虚拟机。它们是不同操作系统(例如 Windows Server 或 Windows 10 Pro)的映像,允许您安装运行自动化作业所需的软件。

要捕获虚拟机映像:

  1. 在您的 Azure 帐户中创建一个虚拟机并与其连接:
    a. Navigate to Virtual machines and create a virtual machine for the resource group you created earlier.
    You must use a Windows 10 or a Windows Server image which is v1 generation to provision the machine.
    b. Connect to your virtual machine.

  2. 创建本地用户并安装所需的自动化软件:
    Do not join the virtual machine to a domain.
    a. 更新 Windows 并在必要时重新启动。
    b. 为无人值守机器人创建本地用户(例如 uirobot)。将 Administrator 角色分配给本地用户,清除“用户必须在下次登录时更改密码”,然后选择“密码永不过期”
    c. 向本地用户授予虚拟机上的远程访问权限。
    d. 从管理员帐户注销,然后以本地用户身份登录。
    e. 安装自动化所需的所有支持软件,例如 Microsoft Excel 或 Google Chrome。您不需要安装 UiPath 软件,我们会为您安装。
    f. 从机器人帐户注销,然后以管理员身份登录。

    如果已安装机器人(可选),请确保将其连接到 Orchestrator,否则将无法使用虚拟机映像。

  3. Create a generalized Virtual Machine image:
    a. Use the Sysprep tool to generalize the virtual machine.
    sysprep.exe disconnects your session halfway through.

10811081
  1. After the status of the virtual machine changes to Stopped, create a managed image of your virtual machine.
    Select the same resource group as for the virtual machine. Also, select No, capture only a managed image.

现在,您已经具有完全配置的映像,可以以此创建用于自动化的新虚拟机。

在 AWS 中设置

如果您的云服务提供程序是 Amazon Web Services (AWS),请按照本节中的说明为弹性机器人编排配置 Amazon Elastic Compute Cloud (Amazon EC2)。

If you are not the AWS administrator, skip this section and instead reach out to your IT team to perform these steps and ask them to provide the details listed under AWS Requirements.

AWS best practices

Choosing the right AWS region: Ensure Amazon Virtual Private Cloud (Amazon VPC) is located in an appropriate region. We recommend you always pick the AWS region that is closest to the region where your Orchestrator instance is hosted when creating an elastic robot pool. Consider both latency and data transfer costs between Orchestrator, Robots, and the customer application when determining the location of the VPC. Contact the UiPath support team for details on how to allocate all your assets close to each other. Learn more about regions and instances in the Getting Started guide.

Capacity and cost optimization: Ensure Amazon Elastic Compute Cloud (Amazon EC2) resources are sized appropriately according to the deployment, customer requirements, and UiPath best practices. Amazon EC2 passes on to you the financial benefits of Amazon’s scale. See Amazon EC2 Instance Purchasing Options for a more detailed description of Amazon EC2 pricing. UiPath allows you to use your existing machines to take advantage of your optimized EC2 size configuration. We recommend downsizing or terminating idle or underutilized Amazon EC2 instances to optimize costs.

Calculate the costs: You can use the AWS pricing calculator to get an estimate of Total Cost of Ownership (TCO) for UiPath infrastructure deployed on AWS, by using the AWS label UiPath:Managed: true. The cost displayed in the calculator is for the infrastructure only. To get a more accurate TCO value, also consider the cost of UiPath licenses.

Generate an AWS access key

  1. 以具有以下权限的用户身份登录到 Amazon EC2 控制台:
Permission CategoryRead / ListUpdateCreateDelete
ec2:*AllAllAllAll
cloudformation:*AllAllAllAll
ssm:*AllAllAllAll
iam.*iam:GetInstanceProfile
iam:ListInstanceProfiles
iam:GetRole
iam:ListRoles
iam:PutRole
iam:PutRolePolicy
iam:PassRole
iam:AddRoleToInstanceProfile
iam:CreateInstanceProfile
iam:CreateRole
iam:RemoveRoleFromInstanceProfile
iam:DeleteInstanceProfile
iam:DeleteRole
iam:DeleteRolePolicy
  1. 请按照 Amazon 文档创建访问密钥
  2. 保存访问密钥 ID密码访问密钥以供以后使用。

创建一个 AWS EC2 映像

📘

备注:

如果您打算使用自定义虚拟机而不是模板虚拟机,请跳过本部分,创建要用于弹性机器人编排的虚拟机。

  1. 登录到 Amazon EC2 控制台。

  2. Follow the Amazon documentation to create an AWS EC2 instance and perform the following as part of the process:
    a. 对于 AMI,选择 Windows 10 或 Windows Server 映像。如果不存在,则必须创建映像。
    b. 通过 RDP 连接时,安装所有 Windows 更新并在必要时重新启动。
    c.重新启动后,安装任何自动化所需的支持应用程序,例如 Microsoft Excel 或 Google Chrome。您不需要安装 UiPath 软件,我们会为您安装。
    d. 删除文件夹 C:\Windows\Panther
    e. 为机器人创建 Windows 本地用户,例如 robot,并为其授予远程桌面权限。
    f. 按 Ctrl + Alt + Delete 并更改机器人用户的密码。
    g. 打开“Ec2 启动设置”,然后单击底部的“使用 Sysprep 关机”
    Sysprep is a Microsoft tool and you use it to create a generalized machine image for EC2.

  3. Sysprep 完成后,在 Amazon EC2 控制台中,等待实例关闭,然后右键单击并转到“映像和模型”>“创建映像”

945945

您可以在 Amazon EC2 控制台的“映像”>“AMI”下的左侧看到新映像。现在,您已经具有完全配置的映像,可以以此创建用于自动化的新虚拟机。

Setup in GCP

If your cloud service provider is Google Cloud Platform (GCP), follow the instructions in this section to prepare to connect Orchestrator to GCP.
If you are not the GCP administrator, skip this section and instead reach out to your IT team to perform these steps and ask them to provide the details listed under GCP Requirements.

  1. Create a new project in GCP.
  2. Get the Project ID and save it for later use.
  3. Create a service account in your GCP project.
  4. Create a service account key in JSON and save the Private Key value for later use.

Creating virtual machines

If you want to use elastic robot orchestration and have us create machines for you on demand, you must create custom machine images in your GCP project.

The following instructions are a sample configuration for creating an image from a persistent disk, which is created from an existing Windows VM you have under your project.

  1. Log in to the Google Cloud Console.
  2. Click Compute Engine, and then under Virtual machines click VM instances.
  3. Click Create Instance at the top of the page.
  4. Fill in the details as follows:
    • For Name, Region, and Zone, you can specify whatever you want.
    • For Machine configuration, you can leave the default values.
    • Under Boot disk, click Change and then click Public Images.
    • For Operating system, select Windows.
    • Under Version select any of the Windows Server 2019 options.
    • You can accept the defaults for Boot disk type and Size (GB), or you can modify them according to your needs.
  5. 单击“创建”。
  6. After boot disk is ready, you can click Create and GCP creates the virtual machine (VM) for you.
  7. To be able to use a custom image created from the VM, stop the VM you just created.
  8. At the side of the page, go to Storage and click Images.
  9. At the top of the page, click Create Image.
  10. Continue with these instructions to create a Windows image.

 

在 Orchestrator 中设置


现在,您的云服务提供程序已完成设置,您可以继续将 Orchestrator 与之连接并设置弹性机器人。

Configuring the cloud provider connection

在 Orchestrator 中:

  1. Go to Tenant > Settings.
  2. On the tenant's Settings page, select the Cloud Connections tab.
  3. 单击“添加云提供程序订阅”,然后选择您的提供程序:
900900
  1. 键入左侧连接的名称。
  2. Add the cloud connection details applicable for the selected cloud provider:
12711271
  1. 单击“保存”

您的提供程序验证信息,然后连接您的 Orchestrator。

Creating an elastic robot pool

To connect elastic robots to Orchestrator in the cloud, you need to provision a machine template of the type Elastic robot pool. This machine template is used when UiPath manages the robots and they run in your cloud.

When creating the elastic robot pool, you have two options:

  • You can allow us to automatically create machines when they're needed based on your generalized cloud VM. This automates the provisioning process for both machines and robots. Whenever a process needs to run, the required number of machines are created. In addition, when the elastic robot pool is first used, we install the required UiPath software to run the robot on the new machines.
  • (AWS or Azure only) You can add specific VMs that you want us to use for elastic robot orchestration. This is a limited version of elastic robot orchestration where we can start and stop the VM as needed to run processes and install the required UiPath software to run the robot, but we only use the specified machines. We cannot create new machines for you, nor can we remove machines that you created.

To create the elastic robot pool:

  1. 选择左上方的“租户”,然后转到“计算机”
  2. Click Add machine in the top right of the page and select Elastic Robot Pool:
867867

The Add Elastic Robot Pool page opens on the General Details tab:

981981
  1. On the left, enter a name and optionally add a description for the elastic robot pool.
  2. In the Production (Unattended), NonProduction, and Testing fields enter the number of runtimes (robot licenses) needed for each machine that is created based on this template.
    We recommend selecting 1 for unattended and 0 for non-production and test. If you're running Test Sets, set 1 license for test execution slots.
  3. On the right, under Profile Scheduling, select the default profile, which controls how you want us to prioritize machine allocation:
    • Cost Efficient: minimize the CSP costs of running VMs at the expense of increased wait time for pending jobs needing to be scheduled
    • Balanced: balance between CSP costs with running VMs and speeding up job scheduling
    • 快速:以虚拟机的运行成本提高为代价,将待定作业的计划等待时间减至最短。
      For each of the options above, we determine when it's time to allocate or deallocate a machine by considering several details, including the number of VMs that are running, the amount of time to wait for a machine to become available, the number of job items queued for a machine, and the cooldown time.
    • Advanced: manually set parameters to control how quickly new machines are allocated when needed:
472472

Using the Advanced profile can incur additional CSP costs since it can keep machines running longer, depending on the settings you use.

  1. Optionally, under Profile Scheduling, you can set a different profile than the one configured above to use only for a specified duration. For more information and instructions, see Configuring Profile Scheduling.
  2. Click Next in the bottom-right to move to the next step.
    The VM & Runtime Details page opens.
  3. 从“云连接”列表中,选择您先前在 Orchestrator 中创建的云服务提供程序连接。
  4. For Azure, select the Resource Group used for the connection.
    For AWS, select the Region.
    For GCP, select the Zone.
  5. 如果您希望我们使用虚拟机模板按需自动配置计算机和机器人,请保持“自动创建计算机”开关处于打开状态。
    如果您有自定义虚拟机,并希望我们使用这些虚拟机,请关闭开关。
    If you cloud provider is GCP, this option is not available.
  6. 从“计算机映像”或“计算机”列表中,分别选择虚拟机模板或为弹性机器人编排创建的自定义虚拟机。
    • If you have switched off Automatically Create Machines, we only use the selected machines for elastic robot orchestration. When choosing this option, make sure that the machines you select are not used in any other elastic robot pool. In addition, for VMs hosted in AWS, the AWS EC2 Instance must have the AmazonSSMManagedInstanceCore instance profile attached. For instructions, see the AWS documentation.
    • If Automatically Create Machines is switched on, we use the selected template to create the required number of machines when needed.
  7. If you have switched off Automatically Create Machines, click Finish in the bottom-right and skip the remaining steps.
  8. f. 从“计算机最大数量”中选择以下选项之一:
    • Use the max available: when you want to allow the pool to scale up to the maximum available licenses for the tenant; Your cloud provider subscription plan may limit the maximum value.
    • 指定上限:如果要限制最大计算机数量,请选择此选项并键入我们可以创建的最大计算机数量。
  9. 单击“高级设置”以显示其他选项。
734734
  1. e. 从“计算机大小”列表中选择一个可用选项:
    • 小型:双核处理器,8 GB RAM;
    • 中型:四核处理器,16 GB RAM;
    • 大型:八核处理器,32 GB RAM。

计算机的大小取决于您的云订阅。小型机器通常足以满足日常自动化需求。

  1. 从“虚拟网络”列表中,您可以选择“自动”,以允许您的计算机模型配置自己的虚拟网络,或者选择供云提供程序使用的虚拟网络,以使用该虚拟网络和子网(如果已定义)。

  2. 单击“完成”

Your elastic robot pool is now set up and ready to be used in a modern folder to run jobs.

Configuring profile scheduling

You can use profile scheduling to set an elastic robot pool to use a different allocation profile than the one that is set, but only during a specified period of time.
For example, if you are typically experiencing a busier period only at the end of the month and your pool uses the Balanced profile, use Profile Scheduling to set the Fast profile during the final days of each month to allow for better performance when you need it.

To set profile scheduling for an elastic robot pool:

  1. 选择左上方的“租户”,然后转到“计算机”
  2. At the right end of the row, click (More Actions) and select Edit Machine.
    The Edit Cloud Machine Pool page opens.
  3. Scroll down to the bottom of the page and, under Profile Scheduling, click Add Interval.
    A new line appears where you can set the interval and profile to use:
693693
  1. In the Start Time column, either click the calendar icon to choose a date and time, or type in the values.
    This is the moment when the pool's set allocation profile ceases to be used and the one you select starts to be used instead.
  2. In the End Time column, set the day and time when the pool should switch back to its default allocation profile.
    The default profile, which is used anytime except during the specified interval, is mentioned under the Profile Scheduling heading.
  3. In the Profile column, select which allocation profile you want to use during the specified interval, instead of the default one.
  4. Optionally click Add Interval to schedule another interval or profile.
    You can choose the same or a different profile than the one set for the previous interval, but make sure the intervals do not overlap.
  5. 单击“更新”以应用您的更改。

The allocation profile for this pool now automatically changes to the selected profiles for the intervals you have defined, and then switches back to the default profile when outside of those intervals.

Configuring the modern folder and account roles

You need to add the elastic robot pool to a modern folder and grant automation permissions for the folder to the account that uses the virtual machine.

  1. 在左侧选择一个新式文件夹,然后转到“设置”>“计算机”
  2. In the top right of the page, click Manage Machines in Folder.
  3. Select the elastic robot pool and click Update.
  4. Switch to the Manage Access page to see the available accounts.
  5. If the account you want to be running the automations, which should be the local user of the virtual machine, is not listed, add it and give it the Robot role.
    We recommend using a robot account, which is a type of account dedicated for running unattended automations.
  6. At the right of the account row, click the More Actions icon and select Edit. Make the following changes:
    a. For Robot Setup > Attended Robot, switch the toggle off. (Not applicable for robot accounts.)
    b. For Robot Setup > Unattended Robot, switch the toggle on. (Already enabled for robot accounts.)
    c. Select the Run foreground automations (Credentials required) checkbox. In the Domain\Username field, type .\username (for example, .\uirobot). In the Password field, type the account password.
    d. 对于“机器人设置”,打开“登录到控制台”开关,然后选择“否”以防止机器人超时。

Your modern folder is now set up and the account is configured.

📘

Sub-folders

As opposed to regular machine templates, adding an elastic robot pool to a folder does not also add it to its sub-folders. If you want to use the machine in a sub-folder as well, you must perform the above steps for the sub-folder.

现在,Orchestrator 中的设置也已完成,您可以开始在云中运行自动化。

Test running an automation in the cloud

Test the elastic robot orchestration setup by running your first automation in the cloud.

Creating the first virtual machine can take some time - from 10 minutes to several hours (observed only in Azure). A virtual machine must be available to run a job before you can test-run an automation.

在 Orchestrator 中:

  1. 确保您已发布项目将包上传到 Orchestrator。
  2. 从您的新式文件夹转到“自动化”>“流程”
  3. 创建一个新的流程。
  4. 启动作业。

 

故障排除


监控

您可以在以下页面监控弹性机器人编排,以检查是否存在错误:

  • You can see pending jobs that are waiting for an available machine on the Jobs page. If jobs are pending longer than expected, check your cloud service provider setup to make sure everything is configured properly.
  • In Azure, AWS, or GCP, you can see the virtual machines being created. You can also see the created virtual machines in Orchestrator, on the Monitoring page of the modern folder. When one becomes available, it is already connected to Orchestrator, so it runs the next pending job. If virtual machines are not being created, check the configuration of your machine template in your cloud service provider and the elastic robot pool in Orchestrator.
  • On the Alerts page in Orchestrator, you can set the State filter to All to see details about the Cloud Robots component and see as new robots are created or any errors. To see alerts, you need to have the Alerts - View and Machines - View permissions from a role that is directly assigned to your account (not inherited from groups), and to be added to the folders where elastic robot orchestration is used.

Machine pool setup

With Automatically Create Machines switched off, if you find the machines you selected during setup are not shown when later editing the elastic robot pool, this may be caused by some machines being currently or previously allocated in your other elastic robot pools. You can use the same machine in only one elastic robot pool at a time.

要修复此问题,请执行以下操作:

  1. 转到“警示”页面,找到计算机导入的消息。
  2. 检查消息,查看是否有任何计算机被跳过。如果是,请继续此流程。否则,请检查您的云服务提供程序中虚拟机的配置。
  3. 从任何其他池中删除计算机。
  4. 等待计算机上运行的当前任务终止,通常不到 1 分钟。
  5. Add the machine in the elastic robot pool.

Machine provisioning failed (AWS only)

如果您使用 AWS,并且计算机配置失败,并显示错误“计算机配置失败”,并且详细信息中包含 status CREATE_FAILED for stack <name>,您可以跟踪堆栈事件以确定原因。
创建 CloudFormation 堆栈期间可能会发生错误,通常是由于 AWS 权限或配额所致。

要修复此问题,请执行以下操作:

  1. 登录到 CloudFormation 门户,网址为 https://console.aws.amazon.com/cloudformation/
  2. 选择“堆栈”
  3. 选择错误详细信息中指示的堆栈。它将显示 CREATE_FAILED 消息:
317317
  1. 检查“状态原因”列,以获取有关错误原因的信息。
  2. 解决问题。
  3. In Orchestrator, go to Tenant > Machines and edit the elastic robot pool to force creating a new version of the pool. For example, change the Size value, save, then edit it again to change back to the original value, and save.
    The CloudFormation stack cannot resume or retry by itself once it has failed. Making changes to the elastic robot pool triggers the process to start again.

 

常见问题


我创建的计算机映像是否会自动更新为最新的 Windows 版本和更新版本?

No. If you want to have the latest Windows version and updates, you need to rebuild your image in the cloud services provider (CSP).

Updated 25 days ago


Elastic Robot Orchestration


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

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