Habitat 0.17.0 Released

We are delighted to announce the release of Habitat 0.17.0. As usual, 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/get-habitat/
Thanks again for using Habitat!

New: (Breaking Buildtime Change): pkg_exposes rename/refactor

In order to allow habitat to support more service configuration options for service bindings, the former `pkg_expose` is now `pkg_exposes`. Going forward, a numeric literal is no longer a valid `pkg_expose`, and the default value of `pkg_export` must be a valid port number or package generation will stop. This change will not cause a breaking runtime change, but will require you to change the way you manage `pkg_exposes` in your build process to move forward. [#1712](https://github.com/habitat-sh/habitat/pull/1712)

New: Package Plan variables to build and runtime systems

Introducing a new concept for Habitat packages to make a subset of service configuration data available to consumers through the `--bind` runtime flag of a service.

A package which declares one or more exports is known as a “producer” and the service using a --bind runtime flag to connect to a service group running the producing package is known as the “consumer”.

A package declares an export with the newly created pkg_exports plan variable, which creates a contract between the producer and consumer to mitigate changes in configuration structure between updates. #1667 #1720

Additionally, we have added pkg_binds and pkg_binds_optional plan variables, which allow you to define what is required to be provided by the --bind flag for the service to start. This is an initial definition of the “consumer”'s portion of habitat’s inter-service contract. In the future, this will allow a service to determine whether it is appropriate to start up or not, and prevent a service from binding to another service that does not export the desired configuration. #1760

Added Templating Language Helpers

The templating language now has more useful helpers for writing configuration and hook files, including `strReplace`, `pkgPathFor`, `toUpperCase`, `toLowerCase`, `toJson`, and `toToml`. [#1663](https://github.com/habitat-sh/habitat/pull/1663) [#1665](https://github.com/habitat-sh/habitat/pull/1665) [#1669](https://github.com/habitat-sh/habitat/pull/1669)

Several other templating language updates were also made, so please note #1716 #1761:

  • ip is now sys.ip
  • port is now cfg.<pkg_export>, which is no longer automatically populated. You must define a pkg_export and its availability within the cfg namespace
  • address is now sys.gossip_ip
  • hostname is now sys.hostname
  • package_ident is now pkg

Improvements

  • Windows studio: Add a studio environment for Windows. #1640
  • Bump crate dependencies #1657
  • Migrate from rustc-serialize to serde in preparation for Rust 1.15 #1661
  • Bump to Rust 1.14 in appveyor tests #1662
  • [hab,studio] Add noninteractive & no coloring modes via environment variables. #1682
  • Reduce allocations when working with ServiceGroup #1685
  • Add the path to the error message when find_command_in_pkg cant find the path #1687
  • [sup] Remove comments about -w (watch) which no longer exists #1688
  • Subcmd cleanup #1689
  • Commit current Cargo.lock file after building entire project. #1692
  • Upgrade codebase to use rustfmt 0.7.1 #1693
  • Update BUILDING.md Mac instructions to use rustup. #1694
  • Use consistent features in handlebars crate to avoid compile churn. #1695
  • [hab] Install same version of helper packages as hab if not present. #1700
  • Depot validates hab client target (platform/architecture) before returning packages #1707
  • Update Building.md for Windows to match our current process #1709
  • revert change to build.ps1 #1715
  • Begin Supervisor CLI parsing refactor #1722
  • Package activity should be properly rooted in a windows studio #1724
  • Add Smoke Test hook #1725
  • [sup] Refactor most global Config into ManagerConfig & ServiceSpec #1732
  • Refactor Supervisor main loop to tick over each Service on each tick #1734
  • update Appveyor’s rust to 1.15.1 stable #1758
  • Use appropriate build script for builder-protocol crate #1764
  • Build devshell in docker-compose [#1746] (https://github.com/habitat-sh/habitat/pull/1746)
  • Run hooks after leader is elected and in correct order #1763

Bug Fixes

* Fix path and dependency bugs in plan-build-ps1 [#1660](https://github.com/habitat-sh/habitat/pull/1660) * [http-client] Restore CA discovery logic when configuring SSL client. [#1670](https://github.com/habitat-sh/habitat/pull/1670) * [sup] Check for initial pkg ident in rolling update strategy. [#1673](https://github.com/habitat-sh/habitat/pull/1673) * [depot-client] Fetching packages now write to randomly named tmpfile. [#1697](https://github.com/habitat-sh/habitat/pull/1697) * Fix configuration and hook compilation errors [#1755](https://github.com/habitat-sh/habitat/pull/1755) * [sup,hab] Add back `hap-sup config` subcommand. [#1765](https://github.com/habitat-sh/habitat/pull/1765)