Getting Setup for Success

⏱️ Estimated Time: 5 Minutes

There are two key resources you will be using in this workshop:

  • An OpenShift cluster with the OpenShift GitOps operator pre-installed.

  • Your own copy of the workshop Git repository.

The next two sections will walk you through getting access to these resources.

Copying the Workshop Repository on GitHub

You’ll need a GitHub account to complete this step. If you don’t have one, go ahead and sign-up at github.com, then complete these steps:

  1. Login to github.com.

  2. Visit the workshop repository at: github.com/redhat-scholars/summit-2023-gitops-cluster-mgmt

  3. Click the Use this template button in the upper-right corner of the Git repository. A list of options will be displayed.

  4. Select the Create a new repository option.

    ex1.use template
  5. Use the following value for the the Repository name field:

    rht-summit-2023-gitops-cluster-mgmt
  6. Click the Create repository from template button.

You’ll be asked to use this repository throughout the workshop. Make sure to always use your copy, and not the original one owned by redhat-scholars on GitHub!

Ensure your copy of the repository is linked to in subsequent sections of this guide:

  1. Enter your GitHub username or the name of the organisation you copied the template repository to in the top-right corner of this guide.

    ex1.set gh username
  2. Press the enter key once you’ve entered the username or organisation name. The field UI will reload and show your username.

    ex1.gh user set

You should now have a copy of the repository at a unique URL of your own at https://github.com/%USERID%/rht-summit-2023-gitops-cluster-mgmt.

Access your OpenShift Cluster

You’ll be using your own OpenShift cluster throughout this workshop. Your cluster will be configured with the OpenShift Web Terminal and Red Hat OpenShift GitOps Operators. You can think of Operators as addons to an OpenShift or Kubernetes cluster that provide it with extended features/capabilities:

  • The Web Terminal makes it easy to use pre-authenticated command-line tools (CLIs) to interact with the OpenShift APIs directly from the OpenShift Web Console in your web browser.

  • The Red Hat OpenShift GitOps operator provides a managed an Argo CD instance on OpenShift.

  • OpenShift (Provided by a Workshop Host)

  • Custom OpenShift

If you’re attending this workshop as part of a hosted session, then continue reading this section. If you need to self-host an environment for this workshop then switch to the Custom OpenShift tab.

You likely already accessed these instructions via a unique demo.redhat.com URL, e.g https://demo.redhat.com/workshop/$WORKSHOP_ID. If so, return to that URL and:

  1. Enter your email address, and the password provided by the workshop administrator(s).

    Use your actual email address. This is so you can use the same email and password again to access your cluster information if you lose access, or forget the cluster details.

    ex1.demo redhat login

  2. Click the Access this workshop button.

  3. Your unique environment details will be displayed.

The console URL and user marked a Admin are the two pieces of information from the OpenShift Console Access section that you need to access your cluster.

ex1 demo redhat cluster deets

To access your OpenShift cluster’s Web Console:

  1. Visit the cluster URL in a web browser, and select the htpasswd_provider login option when prompted.

    ex1.openshift login screen

  2. Login to your OpenShift cluster using the Admin username and password provided by the demo.redhat.com page.

The Overview page of the OpenShift Web Console is displayed after a successful login. From here you can perform both administrative and developer-focused tasks.

Use the instructions in the Using your own Environment section of this repository to prepare your OpenShift environment for this workshop.

Move onto the next section once the OpenShift environment has been configured.

Access the OpenShift Web Terminal

From the OpenShift Web Console you just accessed:

  1. Verify that a terminal icon >_ is shown in the top-right corner of the OpenShift Web Console.

  2. Click the terminal icon. A new UI element will appear, and prepare a terminal session.

  3. Once the terminal session is ready type the help command, and press enter. This will display the pre-installed CLIs that are available in this wokshop environment.

    ex1.web terminal

  4. Run the oc whoami command in the Web Terminal and verify that the output is the same as the username you used to login to the OpenShift Web Console.

  5. Run the oc project openshift-gitops and oc get pods (or kubectl get pods) commands to change context to the pre-configured openshift-gitops namespace, and confirm the OpenShift GitOps components all display a status of Running.

Summary

Nice work, you’ve successfully:

  1. Created a repository that will hold your cluster and application manifests.

  2. Signed into your OpenShift cluster.

  3. Learned how to access and use the OpenShift Web Terminal.

  4. Used the oc and kubectl CLIs to interact with resources on your cluster.