Skip to content

Instantly share code, notes, and snippets.

@thomaslorentsen
Last active October 20, 2017 13:18
Show Gist options
  • Save thomaslorentsen/c28285ad923c368c4d0479c4be82011a to your computer and use it in GitHub Desktop.
Save thomaslorentsen/c28285ad923c368c4d0479c4be82011a to your computer and use it in GitHub Desktop.
MiniShift

Install MiniShift

brew cask install minishift

The upgrade MiniShift with:

minishift update

Starting MiniShift

Start miniShift with VirtualBox:

minishift start --vm-driver=virtualbox

Usage

Login to the machine

minishift ssh

Once logged in we can run docker commands:

docker ps

You can execute commands inside the containers:

docker exec ti <hash> bash

MiniShift Commands

You can check the status of MiniShift:

minishift status

Update MiniShift

minishift update

View the MiniShift environment vars

minishift oc-env

Docker Commands

Enter docker environment

eval $(minishift docker-env)

You can now run docker commands on MiniShift:

docker ps

OpenShift Client

If the client is not installed you may need to run

brew install openshift-cli

Enter the MiniShift environment

eval $(minishift oc-env)

Run the OpenShift Client with MiniShift

oc

You can login and set developer priveleges

oc login -u system:admin
oc adm policy add-cluster-role-to-user cluster-admin developer

Login as a developer

oc login -u developer -p developer

OpenShift Project

oc project default
oc get all

MiniShift Console

Open the console

minishift console

Issues

To overcome the github rate limit issue:

  1. goto https://github.com/settings/tokens
  2. generate api key
export MINISHIFT_GITHUB_API_TOKEN=API_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment