Habitat 0.53.0 Released!


#1

Habitat Release Notes

We are happy to announce the release of Habitat 0.53.0. We have a number of new features as well as bug fixes, so please read on for all the details. If you just want the binaries, head on over to our downloads page: https://www.habitat.sh/docs/using-habitat/#install-habitat. Thanks again for using Habitat!

Release Notes Highlights:

  • Run Habitat as non-root
  • Potentially breaking change, depending on how you’ve automated your build pipeline New Tar Exporter: slightly different command, includes the Habitat Launcher package by default
  • Habitat and Windows: read all about it!
  • Powershell 6.0 released: Update Windows Launcher and Supervisor
  • hab plan init --windows released!
  • Habitat Launcher: new version released, please update
  • Github Project re-organization
  • New Docs: Getting Started: Node.js & Habitat
  • Windows Developers/Release Engineers: Windows documentation for Habitat is now at parity in all our tutorials! Get started here.

Please note: these release notes and deeper dives into the features over the next few days are all available on the Habitat project’s blog, at https://www.habitat.sh/blog/.

Run Habitat as non-root

Historically, the Habitat Supervisor on Linux has always required root privileges to run. When running workloads on scheduler platforms like Kubernetes and OpenShift, however, it is not always desirable, or perhaps even possible, to run containers as root. This has made it impossible to run Habitat-built containers in a vanilla OpenShift installation, for example. With this release of the Habitat Supervisor, however, the need to run as root has been removed. The
Supervisor will continue to operate as it always has if it is run as root, but it can now modify its behavior when run as a user with lower privileges. This unlocks Habitat usage for a wider variety of users and use-cases.

  • Supervisor should not require root #4525

*Potentially breaking change* New Tar Exporter: slightly different command, includes hab launcher by default

Need to export your Habitat package as a tar archive? We’ve just released a new tar exporter! The tar archives contain everything needed to run the package - including Habitat itself and all dependencies. Although Habitat had an existing tar exporter, it was written in bash (which made it difficult if not impossible to use on Windows) and did not include the Habitat Launcher package, which is required to launch the Supervisor and dependent services. This release includes a rewrite of the tar exporter in Rust - which makes it much more usable across platforms - and adds in a launcher to every tar export. To export a hart package as a tar archive, run

$ hab pkg export tar origin/package_name

Then, upload it to wherever you wish to run it. Unpackage it to your root filesystem with

$ sudo tar xf your_tar.tar.gz -C /

Then add in the hab group and user

$ sudo adduser --group hab
$ sudo useradd -g hab hab

Then, to run your package as a service, just run

$ sudo /hab/bin/hab start origin/package_name

Your service and all dependencies will be running!

  • Tar Exporter - The Next Generation #4468

Powershell 6.0 released: Update Windows Launcher and Supervisor

Powershell Core 6.0 has been officially released and the latest Windows Supervisor updates its dependency to use it. Powershell Core 6.0 changed the binary name of Powershell to pwsh.exe. In order to ensure that run hooks launched by the Windows Supervisor version 0.53.0 and later use the pwsh.exe binary, you will want to update your Habitat Launcher process. This is as simple as running “hab pkg install core/hab-launcher” on the same machine that is running the Supervisor. This Launcher is compatible with older Supervisors so it is advisable to update the launcher prior to updating the Supervisor.

`hab plan init --windows` released!

Habitat’s “plan init” command can now generate Powershell based plans. Use the --windows flag to generate a plan.ps1 file instead of a plan.sh file with hab plan init --windows <your_pkg_name>.

  • Implement hab plan init for Powershell plans #4527
  • adding a --windows option for hab plan init to generate powershell plan #4528

Habitat Launcher: new version released, please update

This release of Habitat includes a new release of the Launcher, a small binary that the Supervisor uses to help manage its supervised processes. Whereas the Supervisor is able to automatically update itself, the Launcher is currently released a bit differently, by design; it should be rare that the Launcher ever needs to change. To update your Launchers, you will need to run hab pkg install core/hab-launcher on each machine that has a Supervisor, and then restart your Supervisor. This will, by necessity, require a restart of supervised services, so factor that into your planning.

While we always recommend using the latest code, this Launcher is of particular interest for the following two use cases:

If you wish to run the Supervisor on Linux as a non-root user that is anonymous (i.e., has no named entry in /etc/passwd), you will need the new Launcher. (Note that container exports will automatically include the latest version of the Launcher with no additional actions on your part.)

On the other hand, if you are on Windows, you will also need the new Launcher, since the 0.53.0 Supervisor uses Powershell 6.0.0 and older Launchers will not invoke the newly-renamed pwsh.exe binary and therefore call the system installed version of Powershell instead of the Habitat packaged Powershell.

If neither scenario applies to you, updating the Launcher is not strictly required at this time, but please plan to update at your earliest convenience.

Github Project Re-organization

Our Changelog is less useful than normal this release because we’ve reached the stage of project where it’s time to split components into their own repos - so there are a bunch of issues that have been closed in the habitat-sh/habitat repo, and recreated in a more specific repo (e.g. habitat-sh/builder). You can see all the current repos here - https://github.com/habitat-sh/ - and don’t hesitate to ask questions via Github Issues, the Habitat Slack channel (http://slack.habitat.sh/), or Twitter (https://twitter.com/habitatsh).

Habitat CHANGELOG

0.53.0 (02-05-2018)

Full Changelog

Features & Enhancements

  • Implement hab plan init for Powershell plans #4527
  • Add UI support for personal access tokens #4526
  • Document running travis workflow locally #4472
  • Fix builder dev studio #4442
  • Mirror Live environment to acceptance #4240
  • Getting started guides: Node #4185
  • Local Habitat environment #4117
  • Builder Services Development Environment docs need updating #4070
  • Instruct users to reload after installing the app in the plan connect view #3631
  • List origin projects and provide a way to navigate to them #3579
  • [builder-worker] Clean up job.root\(\)/dockerd directory on teardown. #3484
  • Provide a way to find where files exist in packages found in the Depot #3465
  • Fill in Dockerhub description fields #3456
  • Reverse dependency lists and private packages #3409
  • fix hab plan build for kubernetes exporter #4532 (mwrock)
  • Plan docs #4518 (mwrock)
  • expand zip file by default in Invoke-Unpack #4511 (mwrock)
  • rename powershell binary to new pwsh.exe #4495 (mwrock)

Bug fixes

  • Worker builds hang when running with debug error logging #4483
  • setting pkg_svc_run in powershell plans does not trigger run #4479
  • [builder-worker] Ensure that parent directory for networking namespace is created initially. #4471
  • [builder-web] XML Parsing error in Firefox #4440
  • Docker image export not working? #4418
  • Builder webhook - fix case where plan file is in a “habitat” folder #4323
  • Builds from web UI and CLI behave differently #4317
  • Docker tags not honored during publish #4274
  • Users should not be able to enter an email address into integration field for docker hub #4206
  • [STABILITY] [Supervisor] build worker crash in live - missing hab file uploaded file. #4012
  • Navigating to a package which doesn’t exist should ideally show the 404 page. #3966
  • BLDR Service reports build failure when building sample-rails-app #3850
  • Un-sharded services (eg, job server) should be able to route properly #3787
  • Want long search results #3728
  • lingering origin invite #3727
  • Reverse dependency lists and private packages #3409
  • Add builder-base-plan back #4524 (christophermaier)
  • [builder-worker] Ensure parent network NS directory is created. #4473 (fnichol)

Merged pull requests: