We are happy to introduce you to Minishift, providing a better user experience than our original Atomic Developer Bundle (ADB). We have shifted our development effort from ADB to Minishift, both to improve user experience, and to address the issues caused by depending on Vagrant. We’ll explain this more in a later blog post.

Minishift is a CLI tool that helps you run OpenShift locally by running a single-node cluster inside a VM. You can try out OpenShift or develop with it, day-to-day, on your local host.

We have implemented Minishift as single binary that uses libmachine to provision a VM with a local, single node, OpenShift Origin cluster. It uses OpenShift local cluster management underneath to bring up this single node cluster.

Minishift supports multiple OSes and hypervisors, including KVM for Linux, Xhyve for Mac OS, HyperV for Windows and VirtualBox in all OS platforms. Detailed instructions on setting up prerequisites for installation can be found in the Minishift documentation.

Installing Minishift

  1. Install your preferred VM platform on your workstation.

    Note: You need to install the additional docker-machine driver for ‘kvm’ or 'xhyve’. See the Docker Machine drivers guide.

  2. Download the compressed file for your OS from the Minishift releases page and unpack it.

  3. Copy the contents of the directory to your preferred location.

  4. Add the minishift binary to your PATH environment variable.

For OS-specific tips, refer to the minishift installation guide.

Quickstart with Minishift

  1. Get started as follows:

    $ 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
    

    This will:

    • Download the latest minishift-b2d-iso (~40 MB)
    • Start a VM using libmachine
    • Download OpenShift client binary (oc)
    • Cache both oc and ISO into your $HOME/.minishift/cache folder
    • Finally provisions OpenShift single node cluster in your workstation

    Note: This step also logs you in as developer in the myproject default project.

  2. Use minishift oc-env to display the command you need to type into your shell in order to add the oc binary to your PATH. The output of oc-env will differ depending on OS and shell type.

    $ minishift oc-env
    export PATH="/Users/john/.minishift/cache/oc/v1.5.0:$PATH"
    # Run this command to configure your shell:
    # eval $(minishift oc-env)
    
  3. Run eval $(minishift oc-env) as per above instructions to setup your shell (this my differ depending on OS and shell).

    $ eval $(minishift oc-env)
    
  4. Create a Nodejs example application:

    $ oc new-app https://github.com/openshift/nodejs-ex -l name=myapp
    
  5. Track the build log until the app is built and deployed:

    $ oc logs -f bc/nodejs-ex
    
  6. Expose a route to the service:

    $ oc expose svc/nodejs-ex
    
  7. Open the application in a browser:

    $ minishift openshift service nodejs-ex -n myproject
    
  8. When done with building the application for the day, stop the cluster as follows:

     $ minishift stop
     Stopping local OpenShift cluster...
     Stopping "minishift"...
    

    If you want to access the same cluster again, use minishift start.

  9. At anytime if you want to delete the cluster, use the following command:

    $ minishift delete
    

Refer to the Minishift documentation to get more detailed description of getting started with a single node OpenShift cluster.

Feedback

Try Minishift!

We would love to get your feedback. If you hit a problem, please raise an issue in minishift issue tracker but please search through the listed issues before creating it. It’s possible that a similar issue is already open.

Community

The Minishift community hangs out on the IRC channel #minishift on Freenode (https://freenode.net). You are welcome to join, participate in the discussions, and contribute.

Resources