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:
       You are logged in as:
           User:     developer
           Password: developer
       To login as administrator:
           oc login -u system:admin
    • The IP is dynamically generated for each OpenShift cluster. To check the IP, run the minishift ip command.

    • 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.

    • 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.

    For more information about minishift start options, see the minishift start command.

  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 environment variable. The output of oc-env will differ depending on OS and shell type.

    $ minishift oc-env
    export PATH="/home/john/.minishift/cache/oc/v1.5.0:$PATH"
    # Run this command to configure your shell:
    # eval $(minishift oc-env)

For more information about interacting with OpenShift with the command line interface and the Web console, see the OpenShift Client Binary section.

Deploying a Sample Application

OpenShift provides various sample applications, such as templates, builder applications, and quickstarts. The following steps describe how to deploy a sample Node.js application from the command line.

  1. Create a Node.js example app:

    $ oc new-app -l name=myapp
  2. Track the build log until the app is built and deployed:

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

    $ oc expose svc/nodejs-ex
  4. Access the application:

    $ minishift openshift service nodejs-ex --in-browser
  5. To stop Minishift, use the following command:

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

For more information about creating applications in OpenShift, see Creating New Applications in the OpenShift documentation.