This part of the workshop is divided in 5 sections:
- Accessing Openshift Cluster for the workshop
- Getting started on Openshift Platform on IBM Cloud
- Overview of Openshift on IBM Cloud
- Overview of the Openshift console
- Setting up command line tools to access your cluster
- Working with projects in Openshift
- Create a project on console and delete from CLI
- Create a project from CLI and delete from console
- Deploy an application to Openshift
- Deploying to Openshift via 'oc' CLI
- Deployment of code in Github repos
- Source to image (S2I) deployment
- Trigerring an auto build using GitHub webhooks
For the purpose of this workshop organizers pre-provisioned for attendees free Red Hat OpenShift Clusters. Thanks to that you can try and learn on how to use them.
The specification of these Red Hat OpenShift clusters is the following:
3 Worker Nodes Each Worker Node has 4 CPU cores with 16GB Ram The abbreviated description: 3 x 4 x 16
Use this URL to claim the clusters: https://os201ws.mybluemix.net/
Enter the Lab Key given by your instructor, as well as the email address associated with your IBM Cloud account.
After you hit submit, you will be given a cluster for the duration of the workshop.
You should be given the result page showing the successful assignment.
When you sign up / log in to IBM Cloud, from the Dashboard you need to navigate to IBM Org, you can see the option above 'Create Resources tab' beside Docs and Support.
Next, go to the resource list, from the hamburger menu top left to verify your cluster.
Congratulations! You obtained a Red Hat OpenShift 4.3 cluster. Now you are ready for Lab 2.
https://cloud.ibm.com/docs/openshift?topic=openshift-deploy_app#app_cli
Check your access from the cli
ibmcloud oc cluster ls
- To view a list of projects, run:
$ oc get projects
- You can change from the current project to a different project for CLI operations. The specified project is then used in all subsequent operations that manipulate project-scoped content:
oc project <project_name>
oc new-project <project_name> \ --description="<description>" --display-name="<display_name>"
For example:
$ oc new-project hello-openshift \ --description="This is an example project" \ --display-name="Hello OpenShift"
-
Navigate to Home → Projects.
-
Select a project to view.
On this page, click the Workloads button to see workloads in the project.
-
Navigate to Home → Projects.
-
Locate the project that you want to delete from the list of projects.
-
On the far right side of the project listing, select Delete Project from the Options menu.
-
When the Delete Project pane opens, enter the name of the project that you want to delete in the field.
-
Click Delete.
Run oc delete project <project_name>
Deployment successful
Fork/Clone this example Python repo so that you can edit on the next step https://github.com/sclorg/django-ex
More on Webhooks : https://docs.openshift.com/container-platform/4.1/builds/triggering-builds-build-hooks.html
OpenShift Container Platform 4.3 Documentation