The following details a way of spinning up a local Linux development VM under Windows that contains a standard set of tools to help with PilotCtl work (as well as potentially being useful for other tasks!)
It is based on:
- Ubuntu 20.04 LTS (minimal install)
- Oracle VirtualBox or VMWare Workstation
- Vagrant
- Windows PC with an OS supported by Vagrant (It is presumed you will be using Windows 10)
- Working install of Oracle VirtualBox or VMWare Workstation
- Virtualbox
- Download and run the install from the Virtualbox site
- If you are using in a commercial environment, do not also add on the VirtualBox Extension Pack, unless you have a valid commercial license from Oracle
- VMWare
- Download and run the install from the VMWare site
- Virtualbox
- Working install of Vagrant
- Download and run the install from the Vagrant site
- For VMWare only:
- Download and run the VMWare service install from the Vagrant site
- Install the VMWare plugin by running
vagrant plugin install vagrant-vmware-desktop
- Download the relevant Vagrantfile from this repo (either the Virtualbox or VMWare version) into an empty local directory on your Windows PC and rename it to
Vagrantfile - In the same directory run
vagrant up- the process may take a few minutes to complete depending on the speed of your PC and internet connection - When completed
- run
vagrant sshto connect to the VM - run
vagrant haltto shutdown the VM without destroying it - run
vagrant upif you wish to start up the VM again (NB. this will simply start up the VM and will not have to deploy out again) - run
vagrant destroyif you wish to completely destroy the VM (NB. this will destroy the VM completely, including any files you may have in the VM filesystem) - run
vagrantfor more help if needed
- run
- Git
- Docker
- Docker Compose CLI
- Kubectl CLI
- Tekton CLI
- OpenShift CLI
- Kustomize
- Helm CLI
- Ports 80 and 443 are forwarded to the host by default (to 8080 and 8081 respectively). Additional ports can be forwarded by adding additional lines to the Vagrantfile if needed and the VM re-provisioned or re-created.
- As this is meant for a local development VM, the user specified is automatically added to the SUDOers group with the NOPASSWD option
If you have issues with your location not being able to pull the Vagrant box down correctly then please download manually and add to Vagrant with the following steps:
- Browse to the web site hosting the Ubuntu 20.04 box (I.E. https://app.vagrantup.com/generic/boxes/ubuntu2004)
- Download the appropriate version of the box to your local hard drive (note that the default filename is a GUID - this is fine)
- At a command prompt in the directory where your downloaded box is, type "vagrant box add generic/ubuntu2004
GUID" (whereGUIDis the name of the file downloaded)