Skip to content

Instantly share code, notes, and snippets.

@ericcalabretta
Created April 5, 2019 16:15
Show Gist options
  • Save ericcalabretta/c931273515f8253dffa08f5cf4022953 to your computer and use it in GitHub Desktop.
Save ericcalabretta/c931273515f8253dffa08f5cf4022953 to your computer and use it in GitHub Desktop.
hab windows install instructions

Habitat setup instructions for Windows

1. Download Habitat & unzip to C:\habitat (6.8MB for version 78)

note this assumes version 0.78 of HAb, you'll have to change C:\hab- to whatever version you need

$URL = "https://api.bintray.com/content/habitat/stable/windows/x86_64/hab-%24latest-x86_64-windows.zip?bt_package=hab-x86_64-windows"
Invoke-Webrequest -uri $URL -OutFile habitat.zip
Expand-Archive habitat.zip -DestinationPath C:\
Rename-Item C:\hab-0.78.0-20190313120028-x86_64-windows\ -NewName "habitat"

3. Add Habitat to the path, and set environmental variables - you'll need to open a new powershell window for changes to be reflected.

[System.Environment]::SetEnvironmentVariable("Path", $($env:PATH + ";C:\habitat;"), "Machine")
[System.Environment]::SetEnvironmentVariable("HAB_BLDR_URL", "FQDN_OF_PRIVATE_BLDR", "Machine")
[System.Environment]::SetEnvironmentVariable("http_proxy", "FQDN_of_HTTP_Proxy", "Machine")
[System.Environment]::SetEnvironmentVariable("https_proxy", "FQDN_of_HTTPs_Proxy", "Machine")

Once you opwn a new powershell window you can confirm changes were made with:

Get-Childitem env:

4.start Habitat - keep powershell window open

hab sup run

5. Start services - open a new powershell window

hab svc load origin/packagename --channel unstable --strategy at-once

6. Profit!!

Summarized from:

https://www.habitat.sh/docs/install-habitat/#hab-for-win

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment