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:
- Click the Settings () button to navigate to the Settings menu.
- Click Credentials to access the Credentials page.
- Click the button located in the upper right corner of the Credentials screen.
- Enter the name of the credential to be used in the Name field.
- In the Type drop down menu list, select Source Control.
- 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.
- 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:
- Click the Inventory main link to access the Inventories page.
- Click the button, which launches the New Inventory window.
- Enter the name and organization to be used in their respective fields.
- Click Save to proceed to the Groups and Hosts Management screen.
- In the Hosts (right side) of the Inventory display screen, click the button to open the Create Host dialog.
- 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:
- Click the Projects main link to access the Projects page.
- Click the button, which launches the New Project window.
- 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 button to look up and select the name.
- Click to select the update option for this project, and provide any additional values, if applicable. For information about each option, click the Help button next to the options.
- 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 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:
- Click the Templates main link to access the Templates page.
- Click the button and select Job Template from the drop-down menu list, which launches the New Job Template window.
- 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 button or refer to Job Templates for details.
- 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.
- To launch the job template, click the Launch () button (under Actions).
Once complete, the job results display in the Job Details page.