Running (Installation & Troubleshooting) Kubeflow (via MiniKF) in OSX (Catalina)
The Kubeflow installation guide suggests us to install the following first to have Kubeflow (via MiniKF) in the OSX:
Now please run the following command to download the VirtualBox VM which has MiniKF in it.
$ vagrant init arrikto/minikf
The above command will create a Vagrantfile at your home (~) folder which you can read to learn more about it. If you open the VirtualBox application dashboard you will also see a VM listed as below:
Changing the VM to a name which we can follow it properly:
Here I am changing VM name from avkashchauhan_default_1593533607518_97090 to minikf_ubuntu1604 so I can follow it properly in the logs for a particular activity
Starting the vagrant (Which may result in ERROR):
$ vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: Checking if box ‘arrikto/minikf’ version ‘20200305.1.0’ is up to date…
==> default: Clearing any previously set network interfaces…
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.Command: [“hostonlyif”, “create”]
Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 95 of file VBoxManageHostonly.cpp
On Catalina, you have a higher chance to hit the problem. To fix the above problem please try the following:
- Make sure the VM is turned off in the Virtual Box console as below:
2. We will run the following command to start the VirtualBox:
$ sudo “/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh” restart
Password:
Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext
Now we will halt the vagrant:
$ vagrant halt
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Detaching persistent storage **
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Detaching persistent storage **
Now we will start the miniKf VM as below:
$ vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: Checking if box ‘arrikto/minikf’ version ‘20200305.1.0’ is up to date…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports…
default: 32123 (guest) => 32123 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: Running ‘pre-boot’ VM customizations…
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Creating persistent storage **
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Attaching persistent storage **
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest…
default: Removing insecure key from the guest if it’s present…
default: Key inserted! Disconnecting and reconnecting using new SSH key…
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 6.0.14_Ubuntu r132055
default: VirtualBox Version: 6.1
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Managing persistent storage **
==> default: Setting hostname…
==> default: Configuring and enabling network interfaces…
==> default: Mounting shared folders…
default: /vagrant => /Users/avkashchauhan
==> default: Machine already provisioned. Run `vagrant provision` or use the ` — provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.==> default: Machine ‘default’ has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
==> default: Welcome to MiniKF!
==> default: Visit http://10.10.10.10/ to get started.
==> default:
Few things to remember:
- Make sure there are no errors in the above message window
- Please check that the network interface for “host-only” network is set with proper port forwarding.
- If you have an error with the network then you will not be able to connect to the MiniKf from your host machine OSX).
To make sure we are going on a correct path is to make sure that after a successful “vagrant up” action the “Host-only Network” set as “vboxnet0” as shown in the image below:
Now we can launch the MiniKF cluster configuration at http://10.10.10.10 as below:
Please follow the on-screen commands and after 15 to 30 minutes you will see that Rok (first) and then Kubeflow will be up in the cluster as below:
Now you can click on “Connect to Kubeflow” and use the screen available username and password to log into the Kubeflow Dashboard. Same with Rok Dashboard.
At this point, you are good to go.
Using kubectl to connect your Kubeflow setup:
At the same URL as http://10.10.10.10/ you can find the following info:
What you need is to following above steps as:
- Download the minikf-kubeconfig locally and set it into the .bashrc or .zshrc file. I have done as below:
export KUBECONFIG=~/tutorials/miniKF/minikf-kubeconfig
- Now if you have kubectl install on you OSX you can run the command as below to access the Kubeflow in the Virtual Box VM:
$ kubectl -n kubeflow get pods
NAME READY STATUS RESTARTS AGE
admission-webhook-deployment-79b7c7744d-p249w 1/1 Running 1 81m
application-controller-stateful-set-0 1/1 Running 1 81m
argo-ui-778676df64-ljz5m 1/1 Running 1 81m
centraldashboard-6f7dc48894-rvh2k 1/1 Running 1 81m
jupyter-web-app-deployment-9584df4f9-k55sm 1/1 Running 1 81m
katib-controller-6b789b6cb5-n5ffc 1/1 Running 2 80m
katib-db-manager-64f548b47c-jq4dn 1/1 Running 3 80m
katib-mysql-57884cb488–7tk6b 1/1 Running 1 80m
katib-ui-5c5cc6bd77-xkv9m 1/1 Running 1 80m
kfserving-controller-manager-0 2/2 Running 3 80m
kubeflow-reception-5974d59596-knj9z 1/1 Running 1 81m
metadata-db-76c9f78f77-nv4g6 1/1 Running 1 81m
metadata-deployment-674fdd976b-kvp67 1/1 Running 1 81m
metadata-envoy-deployment-5688989bd6-gcqfp 1/1 Running 1 81m
metadata-grpc-deployment-5579bdc87b-xlkhm 1/1 Running 1 81m
metadata-ui-9b8cd699d-gwh69 1/1 Running 1 81m
minio-755ff748b-4wxzn 1/1 Running 1 79m
ml-pipeline-79b4f85cbc-fvwkt 1/1 Running 3 80m
ml-pipeline-ml-pipeline-visualizationserver-5fdffdc5bf-llj5b 1/1 Running 1 79m
ml-pipeline-persistenceagent-645cb66874-nr5zx 1/1 Running 1 79m
ml-pipeline-scheduledworkflow-6c978b6b85-lttwz 1/1 Running 1 79m
ml-pipeline-ui-74d7fc4d6–5gjlg 1/1 Running 1 79m
ml-pipeline-viewer-controller-deployment-8554dc7b9f-zr588 1/1 Running 1 79m
mysql-598bc897dc-ttfrh 1/1 Running 1 79m
notebook-controller-deployment-64549ff58b-wtjvk 1/1 Running 1 80m
parameterized-tfx-oss-fdtqd-4035372475 0/2 Error 0 72m
profiles-deployment-785868bcd7-nrh68 2/2 Running 2 79m
pvcviewer-controller-controller-manager-dfdd686d4–8hxsj 2/2 Running 2 79m
pytorch-operator-5fd5f94bdd-hdcs7 1/1 Running 1 80m
seldon-controller-manager-679fc777cd-z75zk 1/1 Running 1 79m
spark-operatorcrd-cleanup-jvhpm 0/2 Completed 0 81m
spark-operatorsparkoperator-c7b64b87f-2d46s 1/1 Running 1 81m
spartakus-volunteer-6b767c8d6-s7m9x 1/1 Running 1 80m
tensorboard-6544748d94-b7xg5 1/1 Running 1 80m
tf-job-operator-7d7c8fb8bb-tcdsb 1/1 Running 1 80m
volumes-web-app-df9cf6fb7-jbn6j 1/1 Running 1 79m
workflow-controller-945c84565-vq9wt 1/1 Running 1 81m
Check the VM status
$ vagrant status
Current machine states:
default running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
Things to keep in mind:
- To stop (Suspend) or halt (Power Off) the VM please use the commands below:
$ vagrant suspend
==> default: Attempting graceful shutdown of VM…
==> default: Using /Users/avkashchauhan/minikf-user-data.vdi for persistent storage.
==> default: ** Detaching persistent storage **
$ vagrant halt
- Always use “$ vagrant up” command to startup the process instead of starting the VM from Virtual Box Dashboard. After the initial run, the same command finished within 2–5 minutes.
That’s all.
@avkashchauhan