- Install Habitat
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install habitat -y
- Create working directory for building your application
mkdir packer
cd packer
- Setup habitat
hab setup
You will have to set up your origin and keys following this guide
- Initialize plan for the application build
hab plan init -w
- Launch windows based studio VM. We want a 'clean throwaway environment' to build in AND want to avoid using Docker.
kitchen list
kitchen converge
- Log into the Windows VM (vagrant/vagrant)
- Change to the mounted habitat directory
cd /tmp/package
- You can either build your app on the VM OR use the habitat studio on the VM (what's the difference?)
hab studio enter -
- Build the package
build
-
On your laptop in the
packer/habitat/results
dir you should find your habitat artifact file (.hart) -
If you still need to iterate, you can change the plan then return to the habitat studio in the VM and continue to create builds.