# Access IBM Skills Network

## 1. Access IBM Skills Network

1. If you have registered your account, you can access the lab environment at <https://labs.cognitiveclass.ai/> and go directly to step 6.
2. Navigate to <https://labs.cognitiveclass.ai/register>,

   ![Cognitive Class button](/files/-MCsjkQfByPGk9JNgnK4)
3. Create a new account with a Social login (LinkedIn, Google, Github or Facebook), or click the `Cognitive Class` button,

   ![Cognitive Class button](/files/-MCsjkQhF62JIbpXvSic)
4. Click `Create an Account`,
5. Fill in your Email, Full Name, Public Username and password, click on the check boxes next to the `Privacy Notice` and `Terms of Service` to accept them. Then click on `Create Account`.
6. You will then be taken to a page with a list of sandbox environments. Click on the option for **Theia - Cloud IDE (With OpenShift)**

   ![sandbox list](/files/-MCsjkQivuRI6LojrwkH)
7. Wait a few minutes while your environment is created.

   ![waiting](/files/-MCsjkQjjR93UGUBKtJZ)
8. You will be taken to a blank editor page once your environment is ready.
9. What we really need is access to the terminal. Click on the `Terminal` tab near the top of the page and select **New Terminal**

   ![New Terminal](/files/-MCsjkQkKXFTngv3rCxH)
10. You can then click and drag the top of the terminal section upwards to make the terminal section bigger.

    ![bigger terminal](/files/-MCsjkQnJcaWPVg55Zcp)

## 2. Connect to OpenShift Cluster

1. In a new browser tab, go to <https://cloud.ibm.com/kubernetes/clusters?platformType=openshift>.
2. Select your cluster instance and open it.
3. Click `OpenShift web console` button on the top.
4. Click on your username in the upper right and select `Copy Login Command` option.

   ![Terminal Button](/files/-MCs36IHGkApoPcfoG5k)
5. Click the `Display Token` link.
6. Copy the contents of the field `Log in with this token` to the clipboard. It provides a login command with a valid token for your username.
7. Go to the `Cloud Shell` tab.
8. Paste the `oc login command` in the IBM Cloud Shell terminal and run it.
9. After login to your cluster, set an environment variable for your cluster.

   ```
   export CLUSTER_NAME=<your_cluster_name>
   ```
10. Verify you connect to the right cluster.

    ```
    kubectl get pod
    ```

## 3. Install s2i CLI tool

To install s2i CLI tool,

1. Download tar file.

   ```
    curl -s https://api.github.com/repos/openshift/source-to-image/releases/latest \
      | grep browser_download_url \
      | grep linux-amd64 \
      | cut -d '"' -f 4 \
      | wget -qi -
   ```
2. Unzip tar file

   ```
    tar xvf source-to-image*.gz
   ```
3. Make s2i CLI accessiblee.

   ```
    sudo mv s2i /usr/local/bin
   ```
4. verify

   ```
    s2i version
   ```

With that done, you can start the lab.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ibm-developer.gitbook.io/cloudpakforapplications-appmod/workshop-07-28-2020/setup/skillsnetwork.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
