Openshift - vidyasekaran/current_learning GitHub Wiki
Excerpts from Openshift 4 absoulte beginer Udemy -Mumshad
Install minishift in windows
-
Install Oracle Virtualbox in c program file
-
Download minishift-1.34.3-windows-amd64.zip into C:\softwares\minishift-1.34.3-windows-amd64 https://github.com/minishift/minishift/releases
-
cd C:\softwares\minishift-1.34.3-windows-amd64 C:\softwares\minishift-1.34.3-windows-amd64>minishift.exe start --vm-driver virtualbox
-
got error used execute below command and rerun cmd in 3. now success.. minishift delete --clear-cache https://stackoverflow.com/questions/51733662/minishift-cannot-start-error-starting-the-vm-error-getting-the-state-for-ho/52025920
-
open Virtualbox and now u can find openshift in running mode.. (Point 3 pull openshift iso image and creates virual machine in virtual box
-
check the log in virutalbox for the running openshift and you will get the URL to access openshift.
https://www.youtube.com/watch?v=_1eIYWgpYZU
Projects are built on top of kubernetes concepts know as namespace used to provide grouping functionality to resources. Openshift uses this and provides grouping of resources and isolation across users for example we cannot create 2 projects of same name.
In openshift there are 3 types of users - regular, system and service accounts
regular - developers who develop and deploy (ex: developer) system - interact with infra ex :cluster mgmt example system admin - you can identify system user with their name system:admin, system:master,
service account - used to enable access across multiple applications (account used by webserver to access a database - example : system:serviceaccount:proj1:db_user
Openshift internally has OAuthServer which authenticates and allows user to access its cluster
Once you login openshift you will see all the projects listed on your right.
On your left you have Applications within it you have Deployments, Stateful Sets, Pods, Services, Routes (each display its list)
Create a new project
- click on Create Project and click on it again to view the project.
Create a user
you can use cli like oc to create user and add roles such as admin
Create a new project and deploy
Create a new project and select language python for example - provide git url and click deploy - When we add an application to a project - openshift creates a build job for the application using git url build downloads source from git - uses pre configured build config and creates a docker image and it also uploads the same to docker registry and open shift creates a deployment and deploys artifact to kubernetes cluster.
Create Build -- Download Source -- Build Image -- push to registry -- Deploy
Check OC - Build (where u can see log) Check OC - Application (where you can see your app deployed
In the OC Overview you can all the deployed application - click on it and see Routes - External Traffic
Same like kubernets openshift creates a deployement config where
apiVersion : apps.openshift.io/v1 vs apps/vi (kubernetes) kind : DeploymentConfig vs Deployment (kubernetes)
Kubernetes vs Openshift comparsion is like comparing car engine and a car, we cannot do much with just engine.
Openshift features for developers
-
Web console interface (all tasks and monitoring can be carried out from a web browser)
-
Cloud platform Agnostic (Seamless migration / same experience on AWS/IBM cloud/Azure/GCP)
-
Automated workflows (Source to Image, Pre Created Templates, CI/CD)