Getting Started with OpenShift Minishift
The following section describes how to install Minishift and the required dependencies for mac os. This is not for production use, but rather just something to get you started and get familiar with Openshift setup and usage. These are the basic steps for setting up Minishift on your personal system:
1. Install virtual box
Download VirtualBox for Mac OS here and follow this video tutorial on how to install Virtualbox on Mac OS:
2. Set up your virtualization environment
Minishift uses libmachine and its driver plug-in architecture to provide a consistent way to manage the Minishift VM. Some hypervisors require manual installation of the driver plug-in.
Minishift embeds the VirtualBox driver plug-in, so no additional steps are required to configure it. However, VirtualBox will need to be identified to Minishift via the
--vm-driver virtualbox flag or persistent configuration settings. See Setting Up Minishift to Use VirtualBox for more information.
Minishift is currently tested against
docker-machine-driver-xhyve version 0.3.3. Use the following command to install the latest version of the driver with Homebrew:
$ brew install docker-machine-driver-xhyve
Once installed, enable root access for the
docker-machine-driver-xhyve binary and add it to the default wheel group:
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Set the owner User ID (SUID) for the binary as follows:
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
3. Install Minishift
On macOS, use Homebrew Cask to install the stable version of Minishift:
$ brew cask install minishift
To update the binary, run following command:
$ brew cask install --force minishift
4. Start Minishift
By default, Minishift uses the driver most relevant to the host OS. To use a different driver, set the
--vm-driver flag in
minishift start. For example, to use VirtualBox instead of KVM on Linux operating systems, run
minishift start --vm-driver=virtualbox.
So, go ahead and run the following command to start Minishit:
$ minishift start --vm-driver=virtualbox
When Minishift is starting you will see it running on your Virtualbox:
- The IP is dynamically generated for each OpenShift cluster. To check the IP, run the
- While Minishift starts it runs several checks to make sure that the Minishift VM and the OpenShift cluster are able to start correctly. If any startup checks fail, see the Troubleshooting Getting Started topic for information about possible causes and solutions.
minishift oc-envto display the command you need to type into your shell in order to add the
ocbinary to your
PATHenvironment variable. The output of
oc-envwill differ depending on OS and shell type.
$ minishift oc-env
To access the resources you just created, use the info provided at the end of the minishift start process to log into your web console or using the of
oc login -u system:admincommand:
Use this link to access your Openshift web console: https://192.168.99.100:8443/console/catalog. The password is not validated since it’s running locally, so you can use any password to log in.
You are all set!!! 🥳😎.
5. Stop Minishift
To stop Minishift, use the following command:
$ minishift stop
Now you can play with it and circle back later when we explore how to deploy a Nodejs application store on GitHub repo using Onpenshift.
If you enjoyed this story, you might also like “How to Set Up the Development Environment”