Documentation

18. Setting up an Insights Project

Tower supports integration with Red Hat Insights playbooks. Insights playbooks are stored in a user’s Red Hat Insights Portal that allows you to retrieve them for use in your projects. In order to create a new Insights project, you must first create the appropriate credentials and inventory in Tower to be able to run it.

18.1. Create Insights Credential

To create a new credential for use with Insights:

  1. Click the Settings (settings) button to navigate to the Settings menu.
  1. Click Credentials to access the Credentials page.
  2. Click the add button located in the upper right corner of the Credentials screen.
  3. Enter the name of the credential to be used in the Name field.
  4. In the Type drop down menu list, select Source Control.
  5. Enter valid Insights credential in the Username and Password fields. The Insights credential is the user’s Red Hat Customer Portal Account username and password.

Credentials - create with demo insights credentials

  1. Click Save when done.

18.2. Create Insights Inventory

Insights will include a hosts: line that contains the hostname that Insights itself knows about which may be different than the hostname that Tower knows about. Therefore, make sure that those hostnames match up with what Tower has in its inventory by comparing the systems in the Red Hat Insights Portal to the systems listed in the Tower Inventory.

To create a new inventory for use with Insights:

  1. Click the Inventory main link to access the Inventories page.
  2. Click the add button, which launches the New Inventory window.
  3. Enter the name and organization to be used in their respective fields.
  4. Click Save to proceed to the Groups and Hosts Management screen.
  5. In the Hosts (right side) of the Inventory display screen, click the add host button button to open the Create Host dialog.
  1. Enter the name in the Host Name field associated with the Insights host that will be used and click Save.

18.3. Create Insights Project

To create a new Insights project:

  1. Click the Projects main link to access the Projects page.
  2. Click the add button, which launches the New Project window.
  1. Enter the appropriate details into the required fields, at minimum. Note the following fields requiring specific Insights-related entries:
  • SCM Type: Select Red Hat Insights.
  • Upon selecting the SCM type, the Source Details field expands. Enter the name of the credential you created for use in this project in the text field provided, or click the search search button to look up and select the name.
  1. Click to select the update option for this project, and provide any additional values, if applicable. For information about each option, click the Help help button next to the options.

Insights - create demo insights project form

  1. Click Save when done.

All SCM/Project syncs occur automatically the first time you save a new project. However, if you want them to be updated to what is current in Insights, manually update the SCM-based project by clicking the update button under the project’s available Actions.

Syncing that will pull down any Maintenance Plan in your Insights account that has a playbook solution. It will use the default Plan resolution. Notice that the status dot beside the name of the project updates once the sync has run.

18.4. Create an Insights Job Template

Finally, create a job template to run an Insights playbook:

  1. Click the Templates main link to access the Templates page.
  2. Click the add button and select Job Template from the drop-down menu list, which launches the New Job Template window.
  3. Enter the appropriate details into the required fields, at minimum. Note the following fields requiring specific Insights-related entries:
  • In the Inventory field, enter (or choose from lookup) the name of the inventory you created with the appropriate hostnames used by Insights.
  • In the Project field, enter (or choose from lookup) the name of the Insights project to be used with this job template.
  • In the Playbook drop-down menu list, choose the playbook to be launched with this job template from the available playbooks associated with the selected Insights project.

For additional information about each field, click its corresponding Help help button or refer to Job Templates for details.

Insights - create demo insights job template form

  1. Complete the rest of the template with other attributes such as permissions, notifications, and surveys, as necessary. When done completing the job template, select Save.
  2. To launch the job template, click the Launch (launch) button (under Actions).

Once complete, the job results display in the Job Details page.