Mittwoch, 30. Mai 2018

Gasterweiterung unter VirtualBox Ubuntu Server 16.04 ohne Desktop

VirtualBox 5.2
VM: Ubuntu 16.04 ohne Desktop

Herausforderung: Gasterweiterung installieren

$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install gcc make

Wenn notwendig restart

$mount /dev/cdrom /media/cdrom 
$/media/cdrom/VBoxLinuxAdditions.run 
reboot 

$sudo usermod --append --groups vboxsf USERNAME

Donnerstag, 3. Mai 2018

Get started with minishift on Ubuntu 16.04

I actually go through the course Fundamentals of Containers, Kubernetes, and Red Hat OpenShift 

For this course I need a minishift environment. 
My first try was to install a RHEL 7.4 on an older laptop (this is the recommendation in the course). Unfortanetly the laptop was to weak ;-)
Second try was to install it in a VM (on Virtualbox). But this doesn't work because you have to run a VirtualBox in a VirtualBox. And actually VirtualBox doesn't support the vmx flag inside a VM, so minishift doesn't work.
Third try was to make the exersices in the OpenShift 3.7 Playground on the platform learn.openshift.com. For the first exercises it works for me. But on the point working with a Dockerfile it ends.
So I search again for a solution to install minishift somewhere. In the documentation of minishift I recogniszed, that it can be installed on every Linux Distro. So I decided to try it on my productive laptop running with Ubuntu 16.04. 


  • download minishift for Linux
  • extract the tar file to a directory of your choice
  • add the directory to the PATH variable
  • and start minishift the first time :         $minishift start


First starting problem was, that the default hypervisor for Linux is KVM. On my system I have VirtualBox installed.

So I started minishift again with: $minishift start --vm-driver=virtualbox

and here we are, minishift is running!!!!

Then I try to build a new docker image with a RHEL7.3 base image. The first run command in the dockerfile is yum update -y. After starting docker build the system told me, that I haven't got a valid subscription. Big problem, if you want to install something inside this image.

But there is a easy solution (I love dockerfiles): I added simply in the dockerfile:

subscription-manager register --username admin-example --password secret --auto-attach

(of course with my personal credentials ;-). You need a RedHat developer account)

start the docker build command again... and it works :-)

To run minishift permanently with VirtualBox as vm-driver there are following steps necessary:
If you have already started minishift:
1. Stop minishift                           $minshift stop
2. Delete minishift configuration: $minishift delete

If you haven't started minishift for the first time and also for the "deleted" minishift then

$minishift config set vm-driver virtualbox (no "=" between vm-driver and virtualbox, that doesn't work)

Another topic is the user for minishift. Before starting minishift the first time create a permanent minishift user in the ~/.bashrc:

export MINISHIFT_USERNAME=myusername

export MINISHIFT_PASSWORD=mypassword

After both configuration for user and hypervisor environment are done, start the minishift cluster the first time with

$minishift start

It takes some time :-)

After my first try to login to the minishift cluster with the oc login command, I always get the error message: "oc: command not found"
After some search I find the solution for my Ubuntu environment:

execute: $eval $(minishift oc-env)

After this command the oc command works fine 

Please also have a look to the minishift documentation