View on GitHub

Knative Hands-on Workshop

Why is deploying a Knative service easier than a Kubernetess deployment?

Prerequisites

1. Access the IBM Cloud

We will use pre-provisioned Red Hat OpenShift clusters on the IBM Cloud for this workshop. You need an IBM Cloud Account to assign yourself one of these clusters:

  1. You can register at https://cloud.ibm.com.

    We need your email address, a password, your name, and your country.

    During the registration, we will send a verification code to your email address that you have to enter into the registration form.

    Registration is free and without any obligations.

  2. Logon to the IBM Cloud Dashboard https://cloud.ibm.com.

2. Assign yourself a pre-provisoned cluster

In this step you will assign yourself a pre-provisioned cluster.

  1. Your lab instructor will provide a link to an application and a “lab key”. Open the application in your browser: granttool1

  2. Enter the lab key provided and your IBMid (it is the email address you used to register at the IBM Cloud), agree to the T&Cs, and click “Submit”: granttool1

    Of course your cluster will be named differently and the lab account you need to select from the pull-down in the IBM Cloud Dashboard is 1840867 - Advowork.

3. Work Environment

To see details about your assigned cluster and access the OpenShift Web Console follow these steps:

  1. Go back to the IBM Cloud Dashboard (step 1)
  2. In the title bar, open the Accounts pull-down menu (you may need to refresh your browser) and select the lab account 1840867 - Advowork: account pulldown
  3. Select OpenShift -> Clusters from the burger menu: clusters
  4. This will display your list of available clusters with one entry: cluster list
  5. Click on the entry, this displays all the details about your cluster: cluster details
  6. Access the OpenShift Web Console with the blue button: os console Keep the Web Console open!

We will work with OpenShift in the Web Console and in the command line, using different CLIs. IBM Cloud Shell is a web based shell (terminal) that has all the required tools available.

  1. Access IBM Cloud Shell using the icon in the title bar. Make sure you are in the IBM account (1840867 - Advowork)!:
    cs ico
  2. It will take a moment to set up a session. Cloud Shell offers 500 MB of temporary storage, the session will close after 1 hour of inactivity, workspace data will be removed then.
  3. Go back to the OpenShift Web Console and in the upper right corner open the pull down, select “Copy Login Command”: copy login
  4. A new browser tab opens, click on “Display Token”, and on the next screen, copy the command to “Log in with this token”: login-token
  5. Go back to your IBM Cloud Shell session, paste the command and execute it: oc in cloudshell Test access to OpenShift:
    oc projects
    

    This should display a whole list of projects/namespaces that you could access on OpenShift.

4. Get the code

In your Cloud Shell enter the following command to download the code from Github:

git clone https://github.com/Harald-U/knative-handson-workshop.git
cd knative-handson-workshop/code

Continue with the next part Installing Knative