If you're like me and deploy openshift on remote machine (Centos7) you
may want to keep these instructions to get the console working on your
local machine (OSX). I'm running on centos7 and am using the KVM driver.
After running
minishift start --vm-driver=kvm
1. The VM has 2 networks eth1 (private network for docker-machine) and
eth0 which is the 'public' IP.
For more detail see:
https://github.com/dhiltgen/docker-machine-kvm/blob/master/README.md
Now to expose the VMs eth0 on KVM you will need to create a 'Public Bridge':
Edit /etc/sysconfig/network-scripts/ifcfg-eth0
comment out BOOTPROTO
Add BRIDGE=br0
Create /etc/sysconfig/network-scripts/ifcfg-br0
The content should be:
DEVICE=br0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Bridge
Restart networking
http://www.linux-kvm.org/page/Networking
Now the br0 network should have an IP that is part of your own subnet
(for me it changed from 192.168.42.126 to 192.168.1.2. You can also
verify this using minishift ssh "ip -one -4 addr show dev eth0|cut -f7
-d ' ' "
2. Next you need to go into minishift ssh, and modify the
/var/lib/minishift/openshift.local.config/master/master-config.yml and
update
masterPublicURL:
https://192.168.1.2:8443
publicURL:
https://192.168.1.2:8443/console/
add to cors:
corsAllowedOrigins:
- .*
- 127.0.0.1
-
192.168.42.126:8443
- 192.168.1.2
masterPublicURL:
https://192.168.1.2:8443
assetPublicURL:
https://192.168.1.2:8443/console/
3. minishift stop and start
Now you can open the console at
https://192.168.1.2:8443 on your laptop
and it will redirect to login you in, and all is happy.
Cheers,
--Kurt