In this lab you will learn how to create a new project on OpenShift and how to create an application from an existing docker image using Web UI.
Important
|
Please replace Username with your username |
-
login to web UI via {{CONSOLE_ADDRESS}}
-
Use the same username and password that assigned to you
-
Click
Developer
underAdministrator
to switch to Developer persona -
Click onto
Project
on the top -
Click
Create Project
-
Enter web-terminal-Username as name of the project. The display name and description is optional.
-
Click
+Add
on the left menu -
Click onto
Container Image
to deploy an image
-
Enter
quay.io/openshiftlabs/workshop-terminal:2.4.0
in theImage Name
box, noting that there’s nohttp://
, enter exactly as shown here, without the quotes -
Select the magnifying glass icon to the right of the box
-
Use the default
Name
for the deployment
-
Click onto
Deployment Configuration
link at the bottom of the page -
Add
OC_VERSION
and4.2
asEnvironment Variable
in theDeployment Configuration
section
-
Click
Create
-
You will be on the Topology view
-
click onto the middle of the icon, the details page shows on the right
-
Click
DC workshop-terminal
-
Click
Events
tab
Events in OpenShift Container Platform are modeled based on events that happen to API objects in an OpenShift Container Platform cluster. Events allow OpenShift Container Platform to record information about real-world events in a resource- agnostic manner. For more information, please see https://docs.openshift.com/container-platform/4.2/nodes/clusters/nodes-containers-events.html
Next we need to learn how to get to the route of the image, so we can access this application from the outside of OpenShift (i.e. from the internet).
-
Navigate to
Topology
on the left -
Click on the icon where is shown with the bubble
-
the terminal will be opened on a separated browser tab
-
Execute the following in the terminal from the route link:
$ wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{{VERSION}}/openshift-client-linux-{{VERSION}}.tar.gz $ tar zvxf openshift-client-linux-{{VERSION}}.tar.gz $ mv oc /opt/app-root/bin/ $ oc version
Note
|
If normal cut/paste does not work, you can try to use browser’s edit menu for cut/paste. |
$ oc login {{API_URL}}
Note
|
Username and password will be provided by your instructor. |
Congratulations!! You now know how to create a project, an application using an external docker image and navigate around. You also install OC CLI on the web terminal to access the cluster via CLI.