Advanced Multi-Row Queue Sequence

In the most recent release of BatchPatch we added a cool new feature that we’re really excited about. It’s called the Advanced Multi-Row Queue Sequence. This new automation feature really ties together some of the other functionality in the application, so that you can now create much more advanced, automated sequences. Essentially it allows you to expand the functionality of a normal job queue across multiple rows. Instead of just having a single host be able to execute a sequence of actions on that host, independently of tasks that might be running on other hosts, the advanced multi-row queue sequence allows you to tie together or link the actions of different hosts into one larger, more complex sequence.

You can use the advanced multi-row queue sequence to execute an action or a set of actions on one or more target computers. When those target computers complete the specified actions, another target computer or set of computers could be triggered to execute an action or set of actions. When the second set of computers is finished, a third set of computers could be triggered, and so on. In a single sequence you can integrate scripts, deployments, updates, reboots, and pretty much anything else that BatchPatch has to offer.

Admittedly, it’s a bit challenging to explain the advanced multi-row queue, so after I do my best to give you some examples of how it might be used, I’ll include a step-by-step tutorial so that you can see exactly what I mean. Below are a few ways that one can use this new feature:

  • In a virtual machine environment an administrator could use an advanced multi-row queue sequence to update and reboot all the VM guests as well as their VM host, all in a single automated sequence. The sequence could be configured so that when it begins all VM guests are updated, and then when all VM guests are finished updating, the VM host is automatically triggered to update and reboot.
  • In an environment that utilizes a script to put the entire environment into ‘maintenance mode,’ an advanced multi-row queue sequence could be used to launch the script and wait for it to complete, and then upon completion start the update process on hosts, and then when the update process on hosts is completed, another script could be triggered to disable ‘maintenance mode’ for the environment.
  • Some environments require that machines are only taken offline or rebooted in a very specific order. The advanced multi-row queue sequence allows you to easily string together actions such that any number of hosts could be updated and rebooted in any order desired by the administrator. Target hosts could be setup to update sequentially or simultaneously, or you could configure a combination of sequential and simultaneous actions.

Tutorial: Using the Advanced Multi-Row Queue Sequence

    In this example we’re going to configure and execute a sequence that will download and install updates on two target hosts, then reboot the two hosts and wait for them to go offline and come back online, and then when both of the target hosts are back online, two other hosts will be triggered to download and install updates plus reboot. This should give you a very good idea of the types of things that can be done with the advanced multi-row queue sequence.

  1. The first thing we have to do is configure the regular job queue for each row. Since all 4 hosts in our sequence are going to be performing the same actions, we can apply the same queue to all of them. However, if you are going to have different hosts complete different actions, then adjust accordingly so that each host’s job queue is set to complete only the tasks that need to be completed on that host. Highlight the hosts and select ‘Actions > Job Queue > Create/modify job queue.’ In the ‘Job Queue’ window choose the desired actions, and then click ‘Apply queue to row(s) without executing.’ In the screenshot below you can see that I’ve selected two actions:
    Download and install updates + reboot always
    Wait for host to go offline and come back online

    2015-03-04 16_41_45-Job Queue
  2. Once the desired job queue is applied to each row, we have to choose a name for our sequence, and we have to set the order of execution. In this example our sequence is going to execute the job queue on host1 and host2 simultaneously. Only after both rows’ actions are complete and the hosts have come back online after being rebooted will the job queues for host 3 and host 4 be executed simultaneously. Select ‘Actions > Job Queue > Create/modify advanced multi-row queue sequence.’
    2015-03-04 16_48_26-new 1 - BatchPatch X4
  3. Every sequence in a grid has to have a unique name. All rows with the same sequence name will be considered part of the same sequence. If two rows are given different sequence names, those two rows will not be able to participate in the same sequence. As you can see in the screenshot, using the ‘Apply values to selected row(s)’ button, I’ve set the sequence name ‘Tutorial,’ and I’ve set the sequence position numbers for all hosts so that host1 and host2 are in position number 1, and host3 and host4 are in position number 2.
    2015-03-04 16_52_44-new 1 - BatchPatch X4
  4. We’re almost done, but before we can actually execute the sequence, we need to create a specially designated ‘ExecutionRow.’ Since a sequence might be comprised of numerous rows, we use this specially designated ‘ExecutionRow’ for launching the sequence. In this case, the host name used in the execution row doesn’t matter and can be anything. I’ve chosen ‘TutorialExecutionRow’ but you could use anything you want. I then highlighted the row and chose the “Create Sequence Execution Row” option, and then I clicked ‘Apply values to selected row(s).’ In the screenshot below in the ‘Advanced Multi-Row Queue’ column we can see what this looks like. All 5 rows are assigned the same sequence name ‘Tutorial.’ The 4 hosts that will be included in the sequence also have position numbers, while the execution row is assigned as such.
    2015-03-04 17_04_38-new 1 - BatchPatch X5
  5. We’re now ready to execute the sequence! Highlight *only* the execution row, and then select ‘Actions > Job Queue > Execute advanced multi-row queue sequence.’ That’s all there is to it. You can even set the execution row to be launched by the Task Scheduler if you desire. However, as always we urge you to use caution when running a complex sequence without a human monitoring the process.

    You’ll notice that when you launch the sequence the first thing that happens is both host1 and host2 start performing the actions in their respective job queues since they are both assigned sequence position number 1. Once both hosts have completed their respective queues, only then will host3 and host4 begin their job queues because host3 and host4 are both assigned sequence position number 2.

    If you’re confused about this feature, another tutorial that demonstrates how you might use the advanced multi-row job queue sequence is posted here: Virtual Machine Guest Host Update And Reboot Sequence Automation
This entry was posted in Blog, General, Tutorials and tagged , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.