Skip to content

fgv113/minishift

 
 

Repository files navigation

Minishift

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

Minishift uses libmachine for provisioning VMs, and OpenShift Origin for running the cluster.


Build Status Build status Build status Build Status


Installation

Prerequisites

Minishift requires a hypervisor to run the virtual machine containing OpenShift. Depending on your host OS, you have the choice of the following hypervisors:

Make sure that the hypervisor is installed and enabled on your system before you install Minishift.

Important:

If you encounter driver issues, see the Troubleshooting guide.

Installing Minishift

Manually

  1. Download the archive for your operating system from the Minishift releases page and unpack it.
  2. Copy the contents of the directory to your preferred location.
  3. Add the minishift binary to your PATH environment variable.

Note:

  • On Windows operating system, due to issue #236, you need to execute the minishift binary from the drive containing your %USERPROFILE% directory.
  • Automatic update of the Minishift binary and the virtual machine ISO is currently disabled. See also issue #204

With Homebrew

Stable

On OS X you can also use Homebrew Cask to install the stable version of Minishift:

  $ brew cask install minishift

Latest Beta

If you want to install the latest beta version of Minishift you will need the homebrew-cask versions tap. After you install homebrew-cask, run the following command:

  $ brew tap caskroom/versions

You can now install the latest beta version of minishift.

  $ brew cask install minishift-beta

Quickstart

This section contains a brief demo of Minishift and the provisioned OpenShift cluster. For details on the usage of Minishift refer to the Using Minishift guide. The interaction with OpenShift is via the command line tool oc which is copied to your host.

The following steps describe how to get started with Minishift on a GNU/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
    

Note:

  • 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 GNU/Linux operating systems, run minishift start --vm-driver=virtualbox. For more information about minishift start options, see the minishift start command reference.
  1. Add the oc binary to the PATH environment variable.

     $ export PATH=$PATH:~/.minishift/cache/oc/v1.4.1
    

Note: Depending on the operating system and the oc version, you might need to use a different command to add oc to the PATH environment variable. To verify the oc version, check the contents of the ~/.minishift/cache/oc directory.

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.

To deploy the Node.js sample application from the command-line:

  1. Create a Node.js example app:

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

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

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

     $ curl http://nodejs-ex-myproject.192.168.99.128.xip.io
    
  5. To stop Minishift, use:

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

Reusing the Docker daemon

When running OpenShift in a single VM, it is recommended to reuse the Docker daemon which Minishift uses for pure Docker use-cases as well. By using the same docker daemon as Minishift, you can speed up your local experiments.

To be able to work with the docker daemon on your Mac or GNU/Linux host use the docker-env command in your shell:

eval $(minishift docker-env)

You should now be able to use docker on the command line of your host, talking to the docker daemon inside the Minishift VM:

docker ps

Documentation

The following documentation is available:

Limitations

The following features are not supported in Minishift.

  • Features that require a Cloud Provider, such as:
    • LoadBalancers
    • PersistentVolumes
    • Ingress
  • Features that require multiple nodes, such as advanced scheduling policies
  • Alternate runtimes such as rkt

Community

Minishift is an open-source project dedicated to developing and supporting Minishift. The code base is forked from the Minikube project.

Contributions, questions, and comments are all welcomed and encouraged! Minishift developers hang out on IRC in the #openshift-dev channel on Freenode.

If you want to contribute, make sure to follow the contribution guidelines when you open issues or submit pull requests.

About

Run OpenShift locally

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.6%
  • Python 2.2%
  • Shell 1.7%
  • Makefile 1.5%