Parallel step processing

You can design your Automation Plan so that steps are executed concurrently. This is known as parallel processing. Rather than the plan running in a simple straight sequence where each step is executed one at a time, one after another, with parallel processing you can run steps that do not have a dependency on each other concurrently. To create a parallel type plan, you must select the parallel plan type and manually set the dependencies between the various steps in the plan. Parallel processing is generally more suitable for advanced automation scenarios.

Parallel processing allows you to speed up the execution of your plan by running steps that are not dependent on each at the same time. For example, suppose the first step in your plan deploys an operating system to two computers. You then want to configure each of these computers separately by installing software on them. You want to install DB2 on one as step 2, and you want to install WAS on the other computer as step 3. Rather than step 3 wait for step 2 to complete, you can execute these steps concurrently because they do not depend on each other. They do, however, both depend on step 1 to complete.

The following graphic shows an example of a plan with two steps running in parallel. After step 1 runs, steps 2 and 3 can start concurrently on the different endpoints. When step 2 has completed, step 4 will begin and after step 3 has completed, step 5 will begin. These parallel paths are distinct configurations and are processed separately by the Automation Plan Engine.



Running steps in parallel and setting dependencies between steps

A step is dependent on another step if it cannot start until that step has completed. In a simple sequence plan, where steps run one by one, one after the other, each step is dependent on the previous step. For steps to run in parallel, there cannot be a dependency between the steps that are running in parallel. They must be independent of each other, even if they each have a dependency on the same prior step. When designing your plan to run steps in parallel and set dependencies between steps, use the Flow tab for a visual display of the relationship between the various steps and sequence of the plan. The Flow tab gives you a visual read-only representation of the processing flow of the plan. This graphical view is essential for reviewing the dependencies that you have set between steps in the plan, and ultimately, the processing flow.

About this task

When setting dependencies between steps in your parallel plan, do not set circular dependencies. A circular dependency is a processing flow where a step depends on another step, which in turn has a dependency on a step that is itself dependent on the original step. For example, do not make step 6 dependent on step 4 if step 4 is dependent on 5, when step 5 is dependent on step 6. Review the Flow tab to see any circular dependencies. The following table lists some examples of circular dependencies.
Table 1. Circular dependencies

Illegal dependency type Example
A step depends on itself. This is not possible to create in the application but illustrates the concept of a circular dependency. Step 1 depends on step 1
Direct circular dependency. Step 2 depends on Step 1 and Step 1 depends on Step 2
Indirect circular dependency.
  • Step 2 depends on Step 1
  • and Step 3 depends on Step 2
  • and Step 1 depends on Step 3
Note: After you change dependencies in a plan, review the Flow tab to verify the changes before you save and run the plan.
Some additional points about dependencies:
  • At least one step in a plan must have no dependency set. Otherwise the system has no starting point to begin processing the plan.
  • A step in a plan is only available for execution when all of its dependencies have been completed.
  • A step is not considered to be complete if a failure step must be run for that step, for example, if a failure step is running (or has yet to be run) for step 1, then step 1 is not considered complete until that failure step completes.
Warning: If you remove a step on which other steps were dependent, the system maintains dependencies where possible. When it is not possible to maintain the dependencies, you are notified with a message in the user interface that identifies which steps were dependent on the step that you deleted. After you delete any step in a parallel plan, review the Flow tab to see how the dependencies have changed and make any adjustments as required by settings dependencies.
Complete the following steps to set dependencies.

Procedure

  1. Add steps to your Automation Plan.
  2. For the Plan type, select the Parallel radio button. When you select a parallel plan type, the dependencies setting becomes available. You expand the twisty beside each step to access the Summary, Depends on, and Failure Behaviour settings.
  3. For a step that you want to make dependent on another step, expand Depends on for that step. For example, if you want step 5 to be dependent on step 2, expand Depends on beside step 5.
  4. Enable the check box for the step that you want this step to be dependent on. If you want step 5 to be dependent on step 2, enable the check box beside step 2.
  5. Repeat this process for each step in the plan for which you want to set dependencies, referring to the Flow tab to verify that you have designed the plan correctly.

Example

In this example we have a scenario of an Automation Plan that contains parallel steps.
  • Step 1 in the plan is Deploy operating system to one or more computers (133), and you will use this step to deploy a Windows operating system on two computers, Computer1 and Computer2.
  • The next two steps will depend on Step 1 but will run in parallel because they will be processed on the two separate computers, as follows:
    • Step 2: Install IBM DB2 UDB Enterprise Server Edition 9.x on Windows (29) on Computer1.
    • Step 3: Install IBM DB2 Data Server Client 9.x on Windows (52) on Computer2.
  • Steps 4 and 5 will continue along a parallel path, step 4 dependent on step 2 for further configuration on Computer1, and step 5 dependent on step 3 for Computer2:
    • Step 4: Create Database for IBM DB2 UDB Enterprise Server Edition 9.x on Windows, RHEL, SLES, and IBM AIX (82) to create the database for the DB2 installation in step 2.
    • Step 5: Install IBM WebSphere Application Server Base (Distributed operating systems) 7.x on Windows (36) to install WebSphere® Application Server on Computer2.
  • Step 6 will be common to both steps 4 and steps 5 and will run a baseline to patch the operating system on both Computer1 and Computer2.
The following table lists the dependencies for this plan.
Table 2. Plan dependencies in this example

Step Depends on Targets
1 Nothing. Computer1, Computer2
2 1 Computer1
3 1 Computer2
4 2 Computer1
5 3 Computer2
6 4 and 5 Computer1, Computer2

Converting a parallel plan to a sequential plan

You cannot convert a parallel plan type to a sequential plan type by selecting the Sequential radio button on the Steps tab. You can only convert a parallel plan type to a sequential plan type by manually changing the step dependencies so that the execution order of the plan is sequential. After manually changing the dependencies so that there are no steps running in parallel, you can then change the plan type to sequential and save the plan.

Procedure

  1. Open the parallel plan that you want to convert to a sequential plan and click Edit.
  2. Change the dependencies so that the processing flow of the plan is sequential.
  3. Review the Flow tab and ensure that there are no steps running in parallel.
  4. Click the Sequential radio button.
  5. Click Save.
    Note: Saving reloads the plan so that the display order of the plan in the sequential view matches the actual processing flow. To enable you to successfully edit the plan and move steps in the sequential plan, the steps order on the Steps tab must match the actual processing flow as displayed on the Flow tab.
  6. Edit the sequential plan as required.