Breadcrumb

  1. Red Hat Interactive Learning Portal
  2. Ansible Automation learning
  3. Integrate Red Hat Developer Hub with Red Hat Ansible Automation Platform
  4. Deploy Ansible Automation Platform, the Red Hat build of Keycloak, and Red Hat Developer Hub operators

Integrate Red Hat Developer Hub with Red Hat Ansible Automation Platform

Integrate Red Hat Developer Hub with Red Hat Ansible Automation Platform under a single sign-on system using the Red Hat build of Keycloak. We cover the setup process, from deploying the necessary components to configuring single sign-on.

In this lesson, you will build and deploy the infrastructure needed to integrate Red Hat Developer Hub (Developer Hub) with Red Hat Ansible Automation Platform under a single sign-on system (SSO). We will use Ansible Automation Platform for orchestration, the Red Hat build of Keycloak for centralized authentication, and Developer Hub for its interface and ease of access to developer resources. 

Prerequisites:

In this lesson, you will:

  • Install Ansible Automation Platform, the Red Hat build of Keycloak, and Developer Hub operators.
  • Create the SSO instance with the Red Hat build of Keycloak.
  • Deploy Ansible Automation Platform. 

Deploy the infrastructure

Let’s start by deploying all of our necessary components. We’ll use the standalone tool Kustomize to manage our configurations, making it easy to replicate across environments.

Note

All of the code referenced in this guide is available at https://github.com/openlab-red/rhdh-with-ansible. Clone the repository to follow along!

Install the operators

First, install the required operators:

oc apply -k clusters/demo/operators/aap-operator
oc apply -k clusters/demo/operators/rhsso-operator
oc apply -k clusters/demo/operators/rhdh-operator

Ensure the operators are ready before proceeding to deployment. 

oc wait --for=jsonpath='{.status.phase}'=Succeeded csv -l operators.coreos.com/ansible-automation-platform-operator.aap="" -n aap --timeout=300s
oc wait --for=jsonpath='{.status.phase}'=Succeeded csv -l operators.coreos.com/rhsso-operator.rhsso-operator="" -n rhsso-operator --timeout=300s
oc wait --for=jsonpath='{.status.phase}'=Succeeded csv -l operators.coreos.com/rhdh.rhdh-operator="" -n rhdh-operator --timeout=300s

Deploy the Red Hat build of Keycloak 

Now, we will create the SSO instance that will handle our authentication. 

  1. Begin by creating a namespace and deploying the Red Hat build of Keycloak:

    oc new-project rhsso
    oc apply -k clusters/demo/instances/rhsso
  2. Once ready, the build will look like this: 

    oc wait --for=condition=Ready pod -l app=keycloak -n rhsso --timeout=300s
  3. Verify that the build is accessible: 

    oc get route keycloak -n rhsso

Deploy Ansible Automation Platform

Finally, we will deploy the Ansible Automation Platform. 

  1. Begin by creating a namespace:

    oc new-project aap
    oc apply -k clusters/demo/instances/aap
  2. Wait for Ansible Automation Platform to be ready (this can take 10-15 minutes). Confirm the instance is deployed: 

    oc get ansibleautomationplatform -n aap
  3. Wait for Ansible Automation Platform pods to be ready:

    oc wait --for=condition=Ready pod -l app.kubernetes.io/name=aap-controller-web -n aap --timeout=900s
  4. Verify Ansible Automation Platform is accessible:

    oc get route aap -n aap

Success! We’ve deployed our infrastructure.

Previous resource
Overview: Integrate Red Hat Developer Hub with Red Hat Ansible Automation Platform
Next resource
Configure single sign-on with the Red Hat build of Keycloak