This box is an Ubuntu 15.04 VM with the following setup by default:
-
Docker daemon with port forwarded to the Fusion/Workstation host at localhost:12375
-
Go toolchain
-
Additional tools (lsof, strace, etc)
-
Vagrant (https://www.vagrantup.com/downloads.html)
-
VMware Fusion or Workstation
-
Vagrant Fusion or Workstation license (https://www.vagrantup.com/vmware)
All files matching provision*.sh in this directory will be applied by the Vagrantfile, you can symlink custom scripts if needed. The scripts are not Vagrant specific and can be applied to a VM running on ESX for example.
The following commands can be used from your Fusion or Workstation host.
By default your GOPATH is shared with the same path as the host. This is useful if your editor runs on the host, then errors on the guest with filename:line info have the same path. For example, when running the following command within the top-level project directory:
vagrant ssh -- make -C $PWD allvagrant upvagrant sshDOCKER_HOST=localhost:12375 docker psvagrant haltvagrant reloadAfter you've done a vagrant up, the provisioning can be applied without reloading via:
vagrant provisionvagrant destroyTo open a bash term in the VM, use vagrant ssh.
The following commands can be used from devbox VM guest.
cd $GOPATH/src/github.com/vmware/vicdrone exec -trusted -cacheThe devbox can be deployed to ESX, the same provisioning scripts are applied:
./deploy-esx.shssh-add ~/.vagrant.d/insecure_private_key
vmip=$(govc vm.ip $USER-ubuntu1504-docker)
ssh vagrant@$vmipYou can share your folder by first exporting via NFS:
echo "$HOME/vic $(govc vm.ip $USER-ubuntu1504-docker) -alldirs -mapall=$(id -u):$(id -g)" | sudo tee -a /etc/exports
sudo nfsd restart
Then mount within the ubuntu VM:
ssh vagrant@$vmip sudo mkdir -p $HOME/vic
ssh vagrant@$vmip sudo mount $(ipconfig getifaddr en1):$HOME/vic $HOME/vicYou can also mount your folder within ESX:
govc datastore.create -type nfs -name nfsDatastore -remote-host $(ipconfig getifaddr en1) -remote-path $HOME/vic
esxip=$(govc host.info -json | jq -r '.HostSystems[].Config.Network.Vnic[] | select(.Device == "vmk0") | .Spec.Ip.IpAddress')
ssh root@$esxip mkdir -p $HOME
ssh root@$esxip /vmfs/volumes/nfsDatastore $HOME/vicAdd $esxip to /etc/exports and restart nfsd again.