Objective of this article is to help to know how to setup MiniShift and Run in development environment by using Oracle VM VirtualBox. Prior to continue with this article, there are few prerequisites which you should already done in your system.
- Download & Install Oracle VM by clicking this link
- Download latest version of MiniShift
Then keep the extracted MiniShift directory into your C drive or even any specific directory which is comfortable to you and navigate to the path of the MiniShift directory in Command Line or PowerShell. Then issue the below command to start MiniShift.
minishift start –vm-driver virtualbox
Look at the below log information while setting up the MiniShift.
C:\minishift-1.34.2-windows-amd64>minishift start –vm-driver virtualbox — Starting profile ‘minishift’ — Check if deprecated options are used … Use of HYPERV_VIRTUAL_SWITCH has been deprecated Please use: minishift config set hyperv-virtual-switch External FAIL — Checking if https://github.com is reachable … OK — Checking if requested OpenShift version ‘v3.11.0’ is valid … OK — Checking if requested OpenShift version ‘v3.11.0’ is supported … OK — Checking if requested hypervisor ‘virtualbox’ is supported on this platform … OK — Checking if VirtualBox is installed … OK — Checking the ISO URL … OK — Downloading OpenShift binary ‘oc’ version ‘v3.11.0’ 53.59 MiB / 53.59 MiB [========================================================================================================================================================================================================] 100.00% 0s– Downloading OpenShift v3.11.0 checksums … OK — Checking if provided oc flags are supported … OK — Starting the OpenShift cluster using ‘virtualbox’ hypervisor … — Minishift VM will be configured with … Memory: 4 GB vCPUs : 2 Disk size: 20 GB Downloading ISO ‘https://github.com/minishift/minishift-centos-iso/releases/download/v1.16.0/minishift-centos7.iso’ 370.00 MiB / 370.00 MiB [======================================================================================================================================================================================================] 100.00% 0s — Starting Minishift VM …………………………. OK — Checking for IP address … OK — Checking for nameservers … OK — Checking if external host is reachable from the Minishift VM … Pinging 8.8.8.8 … OK — Checking HTTP connectivity from the VM … Retrieving http://minishift.io/index.html … OK — Checking if persistent storage volume is mounted … OK — Checking available disk space … 1% used OK — Writing current configuration for static assignment of IP address … OK Importing ‘openshift/origin-control-plane:v3.11.0’ . CACHE MISS Importing ‘openshift/origin-docker-registry:v3.11.0’ . CACHE MISS Importing ‘openshift/origin-haproxy-router:v3.11.0’ . CACHE MISS — OpenShift cluster will be configured with … Version: v3.11.0 — Pulling the OpenShift Container Image ………………… OK — Copying oc binary from the OpenShift container image to VM … OK — Starting OpenShift cluster ………………………………………………………. Getting a Docker client … Checking if image openshift/origin-control-plane:v3.11.0 is available … E0215 13:06:53.869343 2668 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously Pulling image openshift/origin-cli:v3.11.0 Image pull complete E0215 13:06:57.802592 2668 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously Pulling image openshift/origin-node:v3.11.0 Pulled 5/6 layers, 86% complete Pulled 6/6 layers, 100% complete Extracting Image pull complete Checking type of volume mount … Determining server IP … Using public hostname IP 192.168.99.100 as the host IP Checking if OpenShift is already running … Checking for supported Docker version (=>1.22) … Checking if insecured registry is configured properly in Docker … Checking if required ports are available … Checking if OpenShift client is configured properly … Checking if image openshift/origin-control-plane:v3.11.0 is available … Starting OpenShift using openshift/origin-control-plane:v3.11.0 … I0215 13:07:18.692080 2668 config.go:40] Running “create-master-config” I0215 13:07:20.801879 2668 config.go:46] Running “create-node-config” I0215 13:07:21.874073 2668 flags.go:30] Running “create-kubelet-flags” I0215 13:07:22.261666 2668 run_kubelet.go:49] Running “start-kubelet” I0215 13:07:22.490333 2668 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready … I0215 13:08:15.514360 2668 interface.go:26] Installing “kube-proxy” … I0215 13:08:15.514860 2668 interface.go:26] Installing “kube-dns” … I0215 13:08:15.514866 2668 interface.go:26] Installing “openshift-service-cert-signer-operator” … I0215 13:08:15.514871 2668 interface.go:26] Installing “openshift-apiserver” … I0215 13:08:15.514908 2668 apply_template.go:81] Installing “openshift-apiserver” I0215 13:08:15.515090 2668 apply_template.go:81] Installing “kube-proxy” I0215 13:08:15.516216 2668 apply_template.go:81] Installing “kube-dns” I0215 13:08:15.516356 2668 apply_template.go:81] Installing “openshift-service-cert-signer-operator” I0215 13:08:19.721560 2668 interface.go:41] Finished installing “kube-proxy” “kube-dns” “openshift-service-cert-signer-operator” “openshift-apiserver” I0215 13:10:57.742660 2668 run_self_hosted.go:242] openshift-apiserver available I0215 13:10:57.743220 2668 interface.go:26] Installing “openshift-controller-manager” … I0215 13:10:57.743240 2668 apply_template.go:81] Installing “openshift-controller-manager” I0215 13:11:01.077314 2668 interface.go:41] Finished installing “openshift-controller-manager” Adding default OAuthClient redirect URIs … Adding sample-templates … Adding web-console … Adding centos-imagestreams … Adding registry … Adding router … Adding persistent-volumes … I0215 13:11:01.109594 2668 interface.go:26] Installing “sample-templates” … I0215 13:11:01.109610 2668 interface.go:26] Installing “openshift-web-console-operator” … I0215 13:11:01.109622 2668 interface.go:26] Installing “centos-imagestreams” … I0215 13:11:01.109650 2668 interface.go:26] Installing “openshift-image-registry” … I0215 13:11:01.109661 2668 interface.go:26] Installing “openshift-router” … I0215 13:11:01.109671 2668 interface.go:26] Installing “persistent-volumes” … I0215 13:11:01.110738 2668 interface.go:26] Installing “sample-templates/cakephp quickstart” … I0215 13:11:01.110752 2668 interface.go:26] Installing “sample-templates/django quickstart” … I0215 13:11:01.110763 2668 interface.go:26] Installing “sample-templates/nodejs quickstart” … I0215 13:11:01.110773 2668 interface.go:26] Installing “sample-templates/sample pipeline” … I0215 13:11:01.110784 2668 interface.go:26] Installing “sample-templates/mongodb” … I0215 13:11:01.110793 2668 interface.go:26] Installing “sample-templates/mariadb” … I0215 13:11:01.110803 2668 interface.go:26] Installing “sample-templates/mysql” … I0215 13:11:01.110812 2668 interface.go:26] Installing “sample-templates/jenkins pipeline ephemeral” … I0215 13:11:01.110823 2668 interface.go:26] Installing “sample-templates/postgresql” … I0215 13:11:01.110833 2668 interface.go:26] Installing “sample-templates/dancer quickstart” … I0215 13:11:01.110843 2668 interface.go:26] Installing “sample-templates/rails quickstart” … I0215 13:11:01.110890 2668 apply_list.go:67] Installing “sample-templates/rails quickstart” I0215 13:11:01.111815 2668 apply_template.go:81] Installing “openshift-web-console-operator” I0215 13:11:01.112046 2668 apply_list.go:67] Installing “centos-imagestreams” I0215 13:11:01.113980 2668 apply_list.go:67] Installing “sample-templates/cakephp quickstart” I0215 13:11:01.114199 2668 apply_list.go:67] Installing “sample-templates/django quickstart” I0215 13:11:01.114369 2668 apply_list.go:67] Installing “sample-templates/nodejs quickstart” I0215 13:11:01.114535 2668 apply_list.go:67] Installing “sample-templates/sample pipeline” I0215 13:11:01.114707 2668 apply_list.go:67] Installing “sample-templates/mongodb” I0215 13:11:01.114857 2668 apply_list.go:67] Installing “sample-templates/mariadb” I0215 13:11:01.115058 2668 apply_list.go:67] Installing “sample-templates/mysql” I0215 13:11:01.115217 2668 apply_list.go:67] Installing “sample-templates/jenkins pipeline ephemeral” I0215 13:11:01.115370 2668 apply_list.go:67] Installing “sample-templates/postgresql” I0215 13:11:01.115543 2668 apply_list.go:67] Installing “sample-templates/dancer quickstart” I0215 13:11:17.346124 2668 interface.go:41] Finished installing “sample-templates/cakephp quickstart” “sample-templates/django quickstart” “sample-templates/nodejs quickstart” “sample-templates/sample pipeline” “sample-templates/mongodb” “sample-templates/mariadb” “sample-templates/mysql” “sample-templates/jenkins pipeline ephemeral” “sample-templates/postgresql” “sample-templates/dancer quickstart” “sample-templates/rails quickstart” I0215 13:11:49.774639 2668 interface.go:41] Finished installing “sample-templates” “openshift-web-console-operator” “centos-imagestreams” “openshift-image-registry” “openshift-router” “persistent-volumes” Login to server … Creating initial project “myproject” … Server Information … OpenShift server started. The server is accessible via web console at: https://192.168.99.100:8443/console You are logged in as: User: developer Password: <any value> To login as administrator: oc login -u system:admin — Exporting of OpenShift images is occuring in background process with pid 71760. |
Note: MiniShift will automatically import image into VirtualBox and Run, we no need to import image in VirtualBox manually.
As per the above log information OpenShift setup has been done and it is running with Process Id of 71760. We can access the OpenShift console with the URL of https://192.168.99.100:8443/console and there are 2 different types of login provided like developer and administrator. Currently it is logged in as developer. Let’s access the console,

We should pass the username as developer and password as any value to login. Then the home page looks like,

Now try to login as administrator by using the credentials generated at the time of OpenShift starting. We may end up with the problem of error: not a valid port: strconv.ParseUint: parsing “admin”: invalid syntax
To solve this problem, we must set OC path which we can find it in oc-env. Execute the below command to know the properties present in oc-env.
minishift oc-env
SET PATH=C:\Users\subbaiah.nallamachu\.minishift\cache\oc\v3.11.0\windows;%PATH%
Now copy the complete line of set path and execute in the same command line and then try to login as administrator by using the same command shown in the log.
