Executing Tasks on All Resources in a Pool

2 minute readAutomation

Creating resource pools (grouping resources) means you can reference many resources using one name, the pool name. When configuring a step, you can "broadcast" the step to all resources in a pool. For example, you might want to start an application or microservice deployment at the same time on all resources in a pool. This tutorial shows how to group resources into a resource "pool".

To view an example procedure for this tutorial , go to the automation platform UI > Projects > EC-Tutorials- <version> , and click the procedure name.

An explanation of what you see:

This procedure implements three steps:

  1. The first step, Setup environment, creates a pool for resources.

    Clicking on the step name takes you to the Edit Step page to see the full command text supplied to create this step—a partial section is displayed in the Action column.

    Functionality to create this step is beyond the scope of this tutorial. For more information, see the link to "Using ectool and the CloudBees CD/RO API" below.

    The following resources were created and added to a pool named EC-Tutorial-pool: EC-Tutorials-resource1 EC-Tutorials-resource2 EC-Tutorials-resource3

  2. The second step, Execute command on all resources in pool, executes an echo statement on the resource EC-Tutorial-pool and has the "broadcast" option selected, which results in the step executing on all resources in the pool simultaneously.

  3. The third step, Cleanup, deletes the resources created in the Setup environment step.

Click Run to run this sample procedure and see the resulting job status on the Job Details page.

Implementation

This tutorial is intended for viewing only and/or clicking on the available links to see more information. Any modifications you might make within this tutorial cannot be transferred to your projects and will not be saved when CloudBees CD/RO is upgraded.

Before you can create the steps illustrated in this tutorial procedure for your own purpose, you must have already defined your resources and created resource pools.

See the following list of related links for more help with creating and using resource pools.