Documentation

20. Instance Groups

An Instance Group provides the ability to group instances in a clustered environment. Additionally, policies dictate how instance groups behave and how jobs are executed. The following view displays the capacity levels based on policy algorithms:

Instance Group policy example

For more information about the policy or rules associated with instance groups, see the Instance Groups section of the Ansible Tower Administration Guide.

You can set up isolated nodes in an instance group so that you can run your playbooks local to the nodes. For more detail, refer to Isolated Instance Groups.

If you want to connect your instance group to a container, refer to Container Groups for further detail.

For an in-depth discussion on these concepts, refer to the Ansible Tower Feature Spotlight: Instance Groups and Isolated Nodes blog.

20.1. Create an instance group

To create a new instance group:

  1. Click the instance group icon icon from the left navigation menu to open the Instance Groups configuration window.

  1. Click the add button and select Create Instance Group.

IG - create new IG

  1. Enter the appropriate details into the following fields:

  • Name. Names must be unique and must not be named tower.

  • Policy Instance Minimum. Enter the minimum number of instances to automatically assign to this group when new instances come online.

  • Policy Instance Percentage. Use the slider to select a minimum percentage of instances to automatically assign to this group when new instances come online.

Note

Policy Instance fields are not required to create a new instance group. If you do not specify values, then the Policy Instance Minimum and Policy Instance Percentage default to 0.

  1. Click Save.

Once the instance group is successfully created, the Details tab of the newly created instance group remains, which allows you to review and edit your instance group information. This is the same menu that is opened if the Edit (edit-button) button is clicked from the Instance Group link. You can also edit Instances and review Jobs associated with this instance group.

IG - example IG successfully created

20.1.1. Associate instances to an instance group

To associate instances to an instance group:

  1. Click the Instances tab of the Instance Group window and click the add button.

  2. Click the checkbox next to one or more available instances from the list to select the instance(s) you want to add to the instance group.

IG - select instances

  1. In the following example, the instances added to the instance group displays along with information about their capacity.

IG - instances in IG

This view also allows you to edit some key attributes associated with the instances in your instance group:

IG - instances in IG callouts

20.1.2. View jobs associated with an instance group

To view the jobs associated with the instance group, click the Jobs tab of the Instance Group window and then click Expanded to expand the view to show details about each job.

IG - instances jobs

Each job displays the job status, ID, and name; type of job, time started and completed, who started the job; and which template, inventory, project, and credential were used.

The instances are run in accordance with instance group policies. Refer to Instance Group Policies in the Ansible Tower Administration Guide.