github.com/vmware/govmomi@v0.37.2/scripts/devbox/README.md (about) 1 # devbox 2 3 ## Overview 4 5 This box is an Ubuntu 16.04 VM meant for running development binaries that require a VMX. 6 For example, the [toolbox][toolbox], [VIC][vic] and [Kubernetes vSphere Cloud Provider][vcp] include code that must run on an ESXi VM. 7 This script makes it simple to run your laptop/desktop local binaries on such a VM. 8 9 This script is a fork of the [VIC devbox](https://github.com/vmware/vic/tree/master/infra/machines/devbox), 10 without a Vagrant file or provisioning beyond the bento box itself. 11 12 [toolbox]:https://github.com/vmware/govmomi/blob/main/toolbox/README.md 13 [vic]:https://github.com/vmware/vic 14 [vcp]:https://github.com/kubernetes/kubernetes/tree/master/pkg/cloudprovider/providers/vsphere 15 16 ## Deployment 17 18 Example deployment to ESX: 19 20 ``` console 21 % export GOVC_URL=Administrator@vsphere.local:password@vcenter-hostname 22 % ./create.sh 23 Deploying to VMware vCenter Server 6.7.0 build-8170161 @ vcenter-hostname... 24 Converting vagrant box for use with ESXi... 25 Creating disk 'ubuntu-16.04.vmdk' 26 Convert: 100% done. 27 Virtual disk conversion successful. 28 Importing vmdk to datastore datastore1... 29 [08-05-18 13:43:33] Uploading ubuntu-16.04.vmdk... OK 30 Creating VM dougm-ubuntu-16.04... 31 Powering on VirtualMachine:7... OK 32 # For SSH access: 33 % ssh-add ~/.vagrant.d/insecure_private_key 34 % ssh vagrant@10.118.66.252 35 # To NFS export $GOPATH on this host: 36 % echo "$GOPATH 10.118.66.252(rw,no_subtree_check,sync,all_squash,anonuid=$UID,anongid=$UID)" | sudo tee -a /etc/exports 37 % sudo service nfs-kernel-server restart 38 # To NFS mount $GOPATH in the VM: 39 % ssh vagrant@10.118.66.252 sudo mkdir -p $GOPATH 40 % ssh vagrant@10.118.66.252 sudo mount 10.118.67.103:$GOPATH $GOPATH 41 ``` 42 43 ## Use Case Examples 44 45 Some example use cases for devbox... 46 47 ### govmomi/toolbox 48 49 As an alternative to the CoreOS based [toolbox-test.sh](../../toolbox/toolbox-test.sh), the toolbox can be run on devbox like so: 50 51 ``` console 52 % go install github.com/vmware/govmomi/toolbox/toolbox 53 % ip=$(govc vm.ip -esxcli "$USER-ubuntu-16.04") 54 % ssh vagrant@$ip sudo service open-vm-tools stop 55 % ssh vagrant@$ip $GOPATH/bin/toolbox -toolbox.trace 56 ``` 57 58 ### vSphere Integrated Containers 59 60 As an alternative to the [VIC devbox](https://github.com/vmware/vic/tree/master/infra/machines/devbox). 61 62 ### Kubernetes vSphere Cloud Provider 63 64 This script builds kubectl and hyperkube locally, generates a Kubernetes cloud provider config for vSphere and runs kubernetes/hack/local-up-cluster.sh from 65 inside the devbox VM: 66 67 ``` console 68 % ./vcp-local-up-cluster.sh 69 ```