Skip to content

Latest commit

 

History

History

devbox

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

devbox

Overview

This box is an Ubuntu 16.04 VM meant for running development binaries that require a VMX. For example, the toolbox, VIC and Kubernetes vSphere Cloud Provider include code that must run on an ESXi VM. This script makes it simple to run your laptop/desktop local binaries on such a VM.

This script is a fork of the VIC devbox, without a Vagrant file or provisioning beyond the bento box itself.

Deployment

Example deployment to ESX:

% export GOVC_URL=Administrator@vsphere.local:password@vcenter-hostname
% ./create.sh
Deploying to VMware vCenter Server 6.7.0 build-8170161 @ vcenter-hostname...
Converting vagrant box for use with ESXi...
Creating disk 'ubuntu-16.04.vmdk'
  Convert: 100% done.
Virtual disk conversion successful.
Importing vmdk to datastore datastore1...
[08-05-18 13:43:33] Uploading ubuntu-16.04.vmdk... OK
Creating VM dougm-ubuntu-16.04...
Powering on VirtualMachine:7... OK
# For SSH access:
% ssh-add ~/.vagrant.d/insecure_private_key
% ssh vagrant@10.118.66.252
# To NFS export $GOPATH on this host:
% echo "$GOPATH 10.118.66.252(rw,no_subtree_check,sync,all_squash,anonuid=$UID,anongid=$UID)" | sudo tee -a /etc/exports
% sudo service nfs-kernel-server restart
# To NFS mount $GOPATH in the VM:
% ssh vagrant@10.118.66.252 sudo mkdir -p $GOPATH
% ssh vagrant@10.118.66.252 sudo mount 10.118.67.103:$GOPATH $GOPATH

Use Case Examples

Some example use cases for devbox...

govmomi/toolbox

As an alternative to the CoreOS based toolbox-test.sh, the toolbox can be run on devbox like so:

% go install github.com/vmware/govmomi/toolbox/toolbox
% ip=$(govc vm.ip -esxcli "$USER-ubuntu-16.04")
% ssh vagrant@$ip sudo service open-vm-tools stop
% ssh vagrant@$ip $GOPATH/bin/toolbox -toolbox.trace

vSphere Integrated Containers

As an alternative to the VIC devbox.

Kubernetes vSphere Cloud Provider

This script builds kubectl and hyperkube locally, generates a Kubernetes cloud provider config for vSphere and runs kubernetes/hack/local-up-cluster.sh from inside the devbox VM:

% ./vcp-local-up-cluster.sh