- Install VirtualBox.
- Get Packer.
- If you are using packerrun.bat, it gets Packer for you and keeps it up to date.
- Make or get a folder to deploy. An example is my docker-apphost repo.
- Make a folder.
- Make a script file in that folder.
- Copy the packer-variables.json.example file to packer-variables.json. Set folder_to_upload to the path of the deployment folder. Set script_to_run to the path of the script file.
- The rest is up to your imagination.
- Run packerrun.bat or packerrun.sh depending on your OS.
- Profit.
- Packer will download the version of the Ubuntu ISO specified in packer-variables.json into its cache if it hasn't already done so.
- Packer will deploy a VirtualBox VM using the preseed.cfg file in the http_directory and the downloaded Ubuntu ISO.
- Packer will upload the deployment folder and run the bootstrap.sh file.
- You will access the VM from port 80 and 443 on localhost. If you are using these ports, change them in packer-vb-iso.json.
If Packer fails for some reason, it will stop and ask you what to do. This allows you to login and see exactly what went wrong before trying again.