Chapter 2. Configuring your Satellite infrastructure to communicate with Insights

Before you can remediate issues in your Satellite infrastructure, you must connect your hosts to Insights and configure Cloud Connector on Satellite Server.

2.1. Uploading your host inventory from Satellite to Insights

Use this procedure to upload your host inventory from Red Hat Satellite to Red Hat Insights.

Prerequisites

  • Register your hosts to Satellite using an activation key to attach Red Hat subscriptions.

Procedure

  1. On Satellite Server, enter the following satellite-installer command to enable the Inventory plug-in:

    # satellite-installer \
    --enable-foreman-plugin-inventory-upload \
    --foreman-proxy-plugin-remote-execution-ssh-install-key true

    The --foreman-proxy-plugin-remote-execution-ssh-install-key true option installs an SSH key for the root user on Satellite Server, so that Satellite can use remote execution on itself. Note that this allows all Satellite users with the create_job_invocation permission to run commands over SSH as root on Satellite Server. If required, you can generate and install this key manually instead of using this option.

  2. In the Satellite web UI, navigate to Configure > Inventory Upload and select your organization.
  3. Click Restart to upload your host inventory to Red Hat Insights.

    Repeat this step for each organization from which you want to upload a host inventory.

  4. Optional: Toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day. Toggle the Obfuscate host names switch to the ON position to hide host names that Satellite reports to Red Hat Cloud.

    Auto upload and Obfuscate host names are global settings. They affect hosts that belong to all organizations.

To verify that the upload was successful, log into https://cloud.redhat.com/insights/inventory/ and search for your hosts.

2.2. Installing the Insights client on hosts managed by Satellite

Use this procedure to install the Insights client on each of your hosts.

Prerequisites

  • Register your hosts to Satellite using an activation key to attach Red Hat subscriptions.

Procedure

  1. Install the Insights client:

    # yum install insights-client
  2. Register the host to Insights:

    # insights-client --register

Repeat these steps on each host.

Alternatively, you can use the RedHatInsights.insights-client Ansible role to install the Insights client and register the hosts. For more information, see Using Red Hat Insights with Hosts in Satellite in the Red Hat Satellite Managing Hosts guide.

2.3. Configuring Cloud Connector on Satellite Server

Before you can run remediation playbooks on your Satellite infrastructure, you must install Cloud Connector on Satellite Server. Cloud Connector manages the communication between Satellite and the Red Hat Insights service at cloud.redhat.com. Satellite provides an Ansible playbook to automate the configuration of Cloud Connector.

Use this procedure to install and configure Cloud Connector. Create a service user that Cloud Connector will use to trigger remediation jobs on Satellite, then run the Cloud Connector installation playbook. You must repeat this procedure for each Red Hat account managed by Satellite.

Procedure

  1. In the Satellite web UI, navigate to Administer > Users and click Create User.
  2. Enter a Username for the service user.
  3. From the Authorised by list, select INTERNAL.
  4. Enter and verify a password for the service user.
  5. Click the Organizations tab and select all the organizations that are part of the same Red Hat account.
  6. Ensure that the Default on login field is blank.
  7. Click the Roles tab and select the Administrator check box.
  8. Click Submit.
  9. Navigate to Hosts > All Hosts and click the name of the Satellite Server host.
  10. Click Schedule Remote Job.
  11. From the Job Category list, select Ansible Playbook.
  12. From the Job Template list, select Configure Cloud Connector.
  13. In the satellite_user field, enter the name of the service user.
  14. In the satellite_password field, enter the password of the service user.
  15. Click Submit.
  16. Until BZ#1828257 is resolved, you must manually add the following lines to the /etc/systemd/system/receptor@.service file so that the service can still run after a restart:

    [Install]
    WantedBy=multi-user.target

To verify that the playbook was successful, log into https://cloud.redhat.com/settings/sources/ and search for your Satellite Server.

If you add an organization for a new Red Hat account to Satellite, repeat these steps to configure a Cloud Connector instance for the new account.

If you add an organization to an existing Red Hat account on Satellite, edit that account’s service user to include the new organization.

If you remove an organization, and there are no more organizations under the same Red Hat account, you can remove the Cloud Connector instance for that account by running the following commands:

# systemctl disable --now receptor@rh_<accountID>
# rm -rf /etc/receptor/rh_<accountID>

2.4. Configuring Red Hat Insights Synchronization on Satellite

You can use Red Hat Insights synchronization to provide Red Hat Insights recommendations for Satellite-managed hosts.

Use this procedure to configure Insights synchronization on Red Hat Satellite.

Procedure

  1. Generate an RHSM API token at https://access.redhat.com/management/api.
  2. Copy the token to Red Hat Cloud token setting in the Satellite web UI. To do so, navigate to Administer > Settings and click the RH Cloud tab. Then, in the Red Hat Cloud token setting value, paste the token and click save.
  3. Navigate to Configure > Insights to synchronize Red Hat Insights recommendations manually by clicking the Sync now button. Optionally, toggle the Synchronize Automatically switch to the ON position to enable Red Hat Satellite to download Insights recommendations available on cloud.redhat.com automatically once a day.

You have now configured Red Hat Insights Synchronization on Satellite.

In the Satellite web UI, navigate to Hosts > All Hosts to see Red Hat Insights recommendations for each Satellite-managed host. For a host, click on the number in the recommendations column to open the Advisor > Systems page at cloud.redhat.com, which displays available recommendations along with a description and additional information. Select the recommendations from the list and click Remediate to remediate with Ansible playbook.

For more information about remediating issues on RHEL systems managed by Satellite, see Chapter 3, Remediating issues on RHEL systems managed by Satellite.