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 nowsys.ip
-
port
is nowcfg.<pkg_export>
, which is no longer automatically populated. You must define apkg_export
and its availability within thecfg
namespace -
address
is nowsys.gossip_ip
-
hostname
is nowsys.hostname
-
package_ident
is nowpkg
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
intoManagerConfig
&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