Removing hab director, and plans for the future

The next release is going to see the removal of habitat’s director functionality, as the team gets close to having a better and more robust solution for managing multiple services within the supervisor itself.

The whole story (also on github):

It’s a large part of Habitat’s vision for it’s supervisor to run multiple services but, at launch, we were unable to deliver this functionality in time. The best version of the feature was on the chopping block because it would have required considerable refactoring to the supervisor’s codebase but it was important to the team to communicate to our new user base that this was an intended use case for Habitat’s runtime.

We decided to create the Director as a stop-gap measure which would be replaced after we were able to refactor the supervisor to a place where it could host multiple services. We are nearly ready to begin work on the final pieces of the supervisor to make it multi-tenant so we’re removing the Director from the codebase and documentation. We feel it’s important to do so before the supervisor support is ready because while the Director conveys our intentions, it doesn’t meet the minimum requirements to be a useful component in the Habitat toolchain and causes more confusion and harm than good.

We look forward to delivering multi-tenant support in the supervisor in the very near future!

I’ve returned to my Habitat project after a few months and I am really confused.

hab --version says I am using 0.18.0, yet the Director functionality I used before still seems to be working?

If the wrong way to start multiple services is with this …

[Unit]
Description=A Habitat Execution for PostgreSQL,MongoDB, Meteor (under NodeJS) and Nginx.
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Environment="LC_ALL=C"
Type=simple
PIDFile=/run/habitat_yourse1f-yourorg_mmks.pid
ExecStart=/bin/hab-director start -c /hab/svc/yourse1f-yourorg/mmks/yourse1f-yourorg_mmks.toml
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
User=root
Group=hab

[Install]
WantedBy=multi-user.target

… launching this …

# Launch services with --group mmks and --org yourse1f-yourorg
# Additionally, pass in --permanent-peer to the start command

[cfg.services.billmeyer.mongodb.mmks.yourse1f-yourorg]
start = "--permanent-peer --strategy at-once"

[cfg.services.core.postgresql.mmks.yourse1f-yourorg]
start = "--permanent-peer --strategy at-once"

# Launch 'mmks' in the same group and org. No config required
[cfg.services.yourse1f-yourorg.mmks.mmks.yourse1f-yourorg]

# Launch NGinx into the same group and org. Configuration is generated by
# Habitat, at run-time, to /hab/svc/nginx/config/nginx.conf
[cfg.services.yourse1f-yourorg.nginx.mmks.yourse1f-yourorg]

… then what is the right way?

Hey Martin -

If the director is launching the supervisor correctly and you’re happy with it, cool!

Work is currently in flight for a new multi-service supervisor (https://github.com/habitat-sh/habitat/pull/1860), so that will be landing soon.

Feel free to jump into our slack channel for a faster turn around on questions and conversation like this! http://slack.habitat.sh/