2019-03-05: How to setup MiniShift on an Azure VM

Motivation

I need an OpenShift instance to develop my DevOps tooling, and an instance that I have full access to. And does not run on my own laptop.

Goal

  • Install MiniShift on Azure and start a single node instance of OpenShift.

Prerequisites

Create Azure VM with nested virtualization ability

  • Create a VM with "Dv3" or "Ev3", such as: "D16s_v3". More info.

Do these steps painfully accurate and in this precise order. Do not deviate.

  • Install Docker Desktop
    • Because this installer sets up all the right stuff on your VM, such as nested virtualization. And you will need local Docker installation later.
  • Install Minishift - ONLY download the Windows binary and put it on %PATH%. Do NOT run any commands yet.
    • It's not an installer, but a executable. Put it close to "c:\" with no whitespace in the filepath.
    • Put the filepath in %PATH%
  • Remove any "ssh" clients installed on the VM.
where ssh
  • Run this command to find "ssh" clients, and then delete all installed "ssh" clients on the Windows machine manually. This will force the Minishift to use its own implementation, that actually works.

Somehow the OpenShift documentation does not mention early that it requires a static IP, and that Hyper-V does not provide this out-of-the-box.

So, several hours later I found this: https://docs.okd.io/latest/minishift/using/static-ip.html

New-NetNat -Name SharedNAT -InternalIPInterfaceAddressPrefix 10.0.75.1/24

minishift delete --force --clear-cache --show-libmachine-logs -v5

minishift start  --network-ipaddress 10.0.75.128 --network-gateway 10.0.75.1 --network-nameserver 8.8.8.8 --show-libmachine-logs -v5

Run these commands one by one.

Let it run a few times. Reboot. Try again. Reboot. Delete. Try again. And then suddenly you will get here:

Browse to: https://10.0.75.128:8443/console/catalog

Yihaa! Next, to go:

  • Click on "Latest Release", download, unzip, and put "oc.exe" on %PATH%
  • Click on the "Copy to Clipboard"
  • Open a command windows and paste

Groovy.