+++
title = "Getting started"
chapter = false
weight = 1
+++



:imagesdir: /images


In this module we will discuss connecting to your lab environment. Parts of the Lab will make use of GUI web based console and others CLI. 

The following video will run through how to connect to both. The steps which follow also discuss this in a step by step process.
It is recommended you take 8 min and watch the video.


https://vimeo.com/553445770/cd7ef9932f [Watch this short video on how to connect to you lab]


Step 1:: Connecting to you AWS Cloud 9 developement environment:

AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair program and track each other's inputs in real time.

https://aws.amazon.com/cloud9/ [https://aws.amazon.com/cloud9/]

----
Connect to the workshop student landing page:
https://lab2-ignitionbucket-137e1h7z6m6h0.s3-us-west-2.amazonaws.com/workshop.html [Student landing page]
Scroll down to Class Information
Find and expand your student number click on it to expand.
You will note three sections:
The first is for SSH access, this may not be used.
The second: AIO console info will be used to log into you own OpenShift cluster.
The third: Cloud 9 environment info will be used to log into a developer environment.

Open Both the AIO UI link and cloud 9 Console link in new tabs
Use the details provided to login

Should the Cloud 9 console link take you to root account login please change over to IAM:
Click on sign into a different account
Select IAM user
Copy and paste the account number from the class info
Click next
copy past the username and password from the class info
Click Next
Click on launch IDE

----

Step 2:: Clone the lab repo 

This repo will contain all the files, scripts, templates needed for the labs. The Resources folder also contains presentation material.

----
git clone https://github.com/aws-samples/openshift-on-aws.git
----

Step 3:: Connecting to the OpenShift web console

Please note that the end points and credentials will be different from the commands below.

----
https://<WORKSHOPID>.s3-us-west-2.amazonaws.com/workshop.html
----

https://docs.openshift.com/container-platform/4.2/web-console/web-console.html

Step 4:: Connecting to OpenShift using the CLI

First we will download the oc client tools. These will then be used to connect to the OpenShift Cluster as well as perform command line functions in various labs.

----
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz

tar -zxvf openshift-client-linux.tar.gz

sudo cp oc kubectl /usr/local/sbin

oc login api.apps.demo-student1.egrsolutions.co.za:6443
provide the username and password for the 

https://<WORKSHOPID>.s3-us-west-2.amazonaws.com/workshop.html

curl -sLO https://download.svcat.sh/cli/latest/linux/amd64/svcat
chmod +x ./svcat
sudo cp ./svcat /usr/local/bin/   

----

*OpenShift cli docs*
https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_cli/getting-started-cli.html#cli-installing-cli_cli-developer-commands 
*logging in*
https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_cli/getting-started-cli.html#cli-logging-in_cli-developer-commands 


First, using the command line, view how you are authenticated with OpenShift:

----
oc whoami
----
Your username is displayed.  


View the version of both ``oc`` - the client - and also the server:

----
oc version
----
Note the version of the server. Look for the "Major" and "Minor" numbers, e.g. 4 and 1+.

The OpenShift API endpoint shown serves all of the OpenShift APIs through which all tools, especially the ``oc`` client and the Web Console, communicate. If you are familiar with ``kubectl``, this command is also available. OpenShift includes a vanilla version of the upstream Kubernetes project that has been integrated & tested with other components of OpenShift and extended to provide functionality for a full PaaS experience. 

----
kubectl version
----

View the projects (namespaces) you have access to:

----
oc projects
----



*developer cli commands*
https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_cli/developer-cli-commands.html 
*administrator cli commands*
https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_cli/administrator-cli-commands.html 


