Installing and running Minishift on MacOSX
Minishift is a tool that helps you run OKD locally
Minishift is a tool that helps you run OpenShift locally by running a single-node OpenShift cluster inside a VM. You can try out OpenShift or develop with it, day-to-day, on your local host.
Minishift uses libmachine for provisioning VMs, and OpenShift Origin for running the cluster. The code base is forked from the Minikube project.
Easiest way to install Minishift is with Homebrew. To install Homebrew head up to https://brew.sh/
Below are the steps to get up and running
- First install hyperkit driver for docker machine and set the appropriate permissions per the caveats
- Install Minishift
- Start Minishift
First install hyperkit driver for docker machine and set the appropriate permissions per the caveats
➜ ~ brew install docker-machine-driver-hyperkit
==> Downloading https://homebrew.bintray.com/bottles/docker-machine-driver-hyperkit-1.0.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/97/970f9a0f226f1dde7d60e0878a05cef43b503e79f669e2f69fa6e2fd48cfb7f5?__gda__=exp=1586361232~hmac=097cd863b3
######################################################################## 100.0%
==> Pouring docker-machine-driver-hyperkit-1.0.0.catalina.bottle.tar.gz
==> Caveats
This driver requires superuser privileges to access the hypervisor. To
enable, execute:
sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
==> Summary
🍺 /usr/local/Cellar/docker-machine-driver-hyperkit/1.0.0: 5 files, 13.7MB
➜ ~ sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
➜ ~ sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
Install Minishift
➜ ~ brew cask install minishift
==> Downloading https://github.com/minishift/minishift/releases/download/v1.34.2/minishift-1.34.2-darwin-amd64.tgz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/62728051/9b877d00-1d92-11ea-8878-fa241b2b8975?X-Amz-Algorithm=AWS4-HM
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'minishift'.
==> Installing Cask minishift
==> Linking Binary 'minishift' to '/usr/local/bin/minishift'.
🍺 minishift was successfully installed!
Start Minishift
MacOSX may block Minishift binary from loading as it is not signed application. To enable the application to start you will need to approve this via the Security and Privacy in System preferences.
➜ ~ minishift start
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- 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 'hyperkit' is supported on this platform ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'hyperkit' hypervisor ...
-- Minishift VM will be configured with ...
Memory: 4 GB
vCPUs : 2
Disk size: 20 GB
-- 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 ...
Pulling image openshift/origin-cli:v3.11.0
E0408 15:43:35.174833 2362 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
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E0408 15:43:36.597810 2362 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
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.64.4 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 ...
I0408 15:43:51.207721 2362 config.go:40] Running "create-master-config"
I0408 15:43:53.539223 2362 config.go:46] Running "create-node-config"
I0408 15:43:54.729654 2362 flags.go:30] Running "create-kubelet-flags"
I0408 15:43:55.191282 2362 run_kubelet.go:49] Running "start-kubelet"
I0408 15:43:55.398161 2362 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0408 15:44:34.424002 2362 interface.go:26] Installing "kube-proxy" ...
I0408 15:44:34.424737 2362 interface.go:26] Installing "kube-dns" ...
I0408 15:44:34.424746 2362 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0408 15:44:34.424750 2362 interface.go:26] Installing "openshift-apiserver" ...
I0408 15:44:34.424882 2362 apply_template.go:81] Installing "openshift-apiserver"
I0408 15:44:34.425224 2362 apply_template.go:81] Installing "kube-proxy"
I0408 15:44:34.425751 2362 apply_template.go:81] Installing "kube-dns"
I0408 15:44:34.426989 2362 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0408 15:44:39.925754 2362 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0408 15:45:54.963435 2362 run_self_hosted.go:242] openshift-apiserver available
I0408 15:45:54.964142 2362 interface.go:26] Installing "openshift-controller-manager" ...
I0408 15:45:54.964167 2362 apply_template.go:81] Installing "openshift-controller-manager"
I0408 15:45:58.138238 2362 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding centos-imagestreams ...
Adding sample-templates ...
Adding web-console ...
Adding registry ...
Adding router ...
Adding persistent-volumes ...
I0408 15:45:58.159906 2362 interface.go:26] Installing "centos-imagestreams" ...
I0408 15:45:58.159915 2362 interface.go:26] Installing "sample-templates" ...
I0408 15:45:58.159922 2362 interface.go:26] Installing "openshift-web-console-operator" ...
I0408 15:45:58.159926 2362 interface.go:26] Installing "openshift-image-registry" ...
I0408 15:45:58.159930 2362 interface.go:26] Installing "openshift-router" ...
I0408 15:45:58.159934 2362 interface.go:26] Installing "persistent-volumes" ...
I0408 15:45:58.160343 2362 apply_list.go:67] Installing "centos-imagestreams"
I0408 15:45:58.160451 2362 interface.go:26] Installing "sample-templates/mariadb" ...
I0408 15:45:58.160458 2362 interface.go:26] Installing "sample-templates/postgresql" ...
I0408 15:45:58.160464 2362 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0408 15:45:58.160469 2362 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0408 15:45:58.160474 2362 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0408 15:45:58.160478 2362 interface.go:26] Installing "sample-templates/mongodb" ...
I0408 15:45:58.160482 2362 interface.go:26] Installing "sample-templates/mysql" ...
I0408 15:45:58.160486 2362 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0408 15:45:58.160490 2362 interface.go:26] Installing "sample-templates/django quickstart" ...
I0408 15:45:58.160494 2362 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0408 15:45:58.160498 2362 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0408 15:45:58.160545 2362 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0408 15:45:58.160908 2362 apply_template.go:81] Installing "openshift-web-console-operator"
I0408 15:45:58.161605 2362 apply_list.go:67] Installing "sample-templates/mariadb"
I0408 15:45:58.161721 2362 apply_list.go:67] Installing "sample-templates/postgresql"
I0408 15:45:58.161813 2362 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0408 15:45:58.161906 2362 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0408 15:45:58.161999 2362 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0408 15:45:58.162073 2362 apply_list.go:67] Installing "sample-templates/mongodb"
I0408 15:45:58.162155 2362 apply_list.go:67] Installing "sample-templates/mysql"
I0408 15:45:58.162232 2362 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0408 15:45:58.162321 2362 apply_list.go:67] Installing "sample-templates/django quickstart"
I0408 15:45:58.162431 2362 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0408 15:46:13.601632 2362 interface.go:41] Finished installing "sample-templates/mariadb" "sample-templates/postgresql" "sample-templates/cakephp quickstart" "sample-templates/nodejs quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/mongodb" "sample-templates/mysql" "sample-templates/dancer quickstart" "sample-templates/django quickstart" "sample-templates/rails quickstart" "sample-templates/sample pipeline"
I0408 15:46:47.067556 2362 interface.go:41] Finished installing "centos-imagestreams" "sample-templates" "openshift-web-console-operator" "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.64.4:8443/console
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
Login to the Minishift web console
The credentials for the web console is admin/admin or system:admin
Once successfully logged in you will be presented with the web console where you can manage your projects