Activity: Set up Red Hat Service Interconnect on RHEL

Module 1

Similar to the OpenShift site, you will set up the site and routers on RHEL - but in this activity you will use the Red Hat Service Interconnect command line interface.

Login in to RHEL and validate the environment

  1. You need to SSH into the on-prem RHEL server using the built-in Terminal to the lower right of the page.

    lower terminal
  2. Log in to the RHEL server using the following command using the lower terminal.

    ssh -o ServerAliveInterval=60 \
        -o ServerAliveCountMax=60 lab-user@{rhel_hostname}
  3. Type yes and hit enter if prompted by the message Are you sure you want to continue connecting (yes/no/fingerprint)?

  4. Ignore the Failed to add the host to the list of known hosts (/data/.ssh/known_hosts). message

  5. Enter your password {rhel_ssh_password} when prompted and press Enter.

    You should now be logged into the RHEL server. Let’s see how we can set up a link between the database and the OpenShift cluster.

    rhel user
  6. Enter the following command to clear the RHEL terminal (lower terminal)

    clear
  7. To verify if the database is running on the RHEL server, run the following command from the RHEL terminal (lower terminal).

    podman ps
  8. You should see an output like the one below.

    CONTAINER ID   IMAGE        COMMAND   CREATED   STATUS    PORTS    NAMES
    3d12164dd54b  quay.io/kiali/demo_travels_mysqldb:v1  --default-authent...  4 hours ago  Up 4 hours  0.0.0.0:3306->3306/tcp, 3306/tcp, 33060/tcp  travels-mysqldb
    Click here if the output returns an empty list

    If the output returns an empty list, it indicates that the database is not running on the RHEL server. Run the following command in the lower terminal to restart the database.

    podman restart travels-mysqldb

    Run the following command again to validate that the database is indeed running now.

    podman ps

Create Red Hat Service Interconnect Site

  1. In the RHEL terminal (lower terminal), run the following command to create a site. Similar to the OpenShift site, this will set up the VAN routers.

    export SKUPPER_PLATFORM=podman
    skupper site create rhel
  2. You should see the following output.

    File written to /home/lab-user/.local/share/skupper/namespaces/default/input/resources/sites/rhel.yaml

Create a connector

Next, let’s learn what a connector is, and create one.

What is a connector?

A connector links a local workload to listeners in remote sites using routing keys. On Kubernetes, it typically uses a pod selector; on Docker, Podman, and Linux, it uses host and port specifications. The routing key is a string identifier that binds the connector to matching listeners in remote sites.

connector image
  1. In the RHEL terminal (lower terminal), run the following command to create a connector for the database.

    skupper connector create mysqldb 3306 --host 127.0.0.1 -r appconn
  2. You should see the following output.

    File written to /home/lab-user/.local/share/skupper/namespaces/default/input/resources/connectors/mysqldb.yaml

Visualise set up on Red Hat Service Interconnect Network Console

Before proceeding to the final step of creating the Virtual Application Network, navigate to the Service Interconnect Network Console to visualize the Virtual Application Network based on the configuration you’ve set up so far.

  1. Click on Log in with OpenShift, and log in with username admin and password {ocp_cluster_openshift_cluster_admin_password} if prompted.

  2. Click Allow selected permissions.

    allow permission
  3. You will only be able to see the OpenShift cluster (travel-db namespace) for the moment. This is because the RHEL on-prem machine is not yet part of the Virtual Application Network.

    network console ocp