Skip to content

Instantly share code, notes, and snippets.

@preinking
Last active June 4, 2019 09:43
Show Gist options
  • Save preinking/e41dfb40605d5c43e6253baf750fd95f to your computer and use it in GitHub Desktop.
Save preinking/e41dfb40605d5c43e6253baf750fd95f to your computer and use it in GitHub Desktop.

Prerequisites

The following section describes how to install Minishift and the required dependencies.

These are the basic steps for setting up Minishift on your personal system:

  1. Set up your virtualization environment
  2. Download Minishift software for your operating system from the Minishift Releases page
  3. Install Minishift
  4. Start Minishift
  5. Configure Minishift so you can use it efficiently

The setup procedure should be run as a regular user with permission to launch virtual machines. In the procedure, you will see how to assign that permission, along with ways to configure your hypervisor and command shell to start and effectively interact with Minishift.

Prerequisites

Minishift requires a hypervisor to start the virtual machine on which the OpenShift cluster is provisioned. Verify that the hypervisor of your choice is installed and enabled on your system before you set up Minishift. Once the hypervisor is up and running, additional setup is required for Minishift to work with that hypervisor.

Since the release of OS X Hypervisor v0.4.0, is no longer possible to install the Minishift following the docs.
$ minishift start
-- Starting profile 'minishift'
...
-- Starting Minishift VM .... FAIL E0519 18:30:25.411015   28125 start.go:494] Error starting the VM: Error creating new host: json: cannot unmarshal bool into Go struct field Driver.Virtio9p of type []string. Retrying.
Error starting the VM: Error creating new host: json: cannot unmarshal bool into Go struct field Driver.Virtio9p of type []string
As a work-around you can completely uninstal minishift with all drivers and config files
  1. minishift delete
  2. brew uninstall docker-machine-driver-xhyve
  3. sudo rm -rf /usr/local/bin/docker-machine-driver-xhyve)
  4. sudo rm -rf ~/.docker ~/.kube ~/.minishift ~/.minikube

To manually install the xhyve driver, you need to download and install the docker-machine-driver-xhyve binary and place it in a directory which is on your PATH environment variable. The directory /usr/local/bin is recommended, as it is the default installation directory for Docker Machine binaries.

The following steps explain the installation of the docker-machine-driver-xhyve binary to the /usr/local/bin/ directory:

$ sudo curl -L  https://github.com/zchee/docker-machine-driver-xhyve/releases/download/v0.3.3/docker-machine-driver-xhyve -o /usr/local/bin/docker-machine-driver-xhyve
$ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
$ sudo chmod u+s,+x /usr/local/bin/docker-machine-driver-xhyve

With Homebrew

On macOS, you can also 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

Minishift Quickstart

This section contains a brief demo of Minishift and of the provisioned OpenShift cluster. For details on the usage of Minishift, see the Basic Usage section.

The interaction with OpenShift is with the command line tool oc which is copied to your host. For more information on how Minishift can assist you in interacting with and configuring your local OpenShift instance, see the OpenShift Client Binary section.

For more information about the OpenShift cluster architecture, see Architecture Overview in the OpenShift documentation.

The following steps describe how to get started with Minishift on a Linux operating system with the KVM hypervisor driver.

Starting Minishift

  1. Run the minishift start command:
$ minishift start
-- Starting local OpenShift cluster using 'kvm' hypervisor...
...
   OpenShift server started.
   The server is accessible via web console at:
       https://192.168.99.128:8443

   You are logged in as:
       User:     developer
       Password: developer

   To login as administrator:
       oc login -u system:admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment