How to install (Openshift) Minishift in Ubuntu 18.04?
Steps to install Minishift in Ubuntu
I've come across to play with Openshift for work, and this is how I got Minishift running on my local system which is Ubuntu 18.04. For those who don’t know what Minishift is, it is a single-user version of OpenShift, with additional functionality needed by users developing on one system.
Please note that the following steps are carried out as the root user.
Prerequisites
Install libvirt and qemu-kvm on your system:
$ sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
Add yourself to the libvirt(d) group:
$ sudo usermod -a -G libvirt $USER
Update your current session to apply the group change:
$ newgrp libvirt
As root, install the KVM driver binary and make it executable as follows:
$ curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04 -o /usr/local/bin/docker-machine-driver-kvm$ chmod +x /usr/local/bin/docker-machine-driver-kvm
Download the latest version of minishift cdk from:
https://developers.redhat.com/products/cdk/download/
Copy the downloaded cdk-3.6.0–1-minishift-linux-amd64 file in to /usr/local/bin folder.
$ cp cdk-3.6.0–1-minishift-linux-amd64 /usr/local/bin
Create a sim-link for minishift:
$ ln -sf cdk-3.6.0–1-minishift-linux-amd64 minishift
Initialize the installation
$ minishift setup-cdk
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
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
.
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$ eval $(minishift oc-env)