I think I must be missing something very obvious and fundamental here, but I haven’t been able to find anything that would work reading the docs or tutorials. And I surely can’t be the only one who tries to work with private packages and a supervisor. My main issue is that I have been unable to set up a supervisor to automatically deploy new packages from a private origin.
I am able to install a private package either by setting the habitat token as an env variable
export HAB_AUTH_TOKEN=_mytoken or by specifying the auth option
hab pkg install --auth _mytoken. This also works for commands like
hab pkg search. Whenever a package has been installed, I am able to load that into the supervisor. However in that case the supervisor does not pick up any new packages that were promoted to the channel as described in the tutorials.
It seems like the commands related to the supervisor or services (
hab sup and
hab svc) do not pick up the environment variable and they do not provide a way to specify a token and therefore are unable to poll or request the private packages.
This is what I observed:
hab studio enter hab --version hab 0.57.0/20180614230004 export HAB_AUTH_TOKEN=_mytoken hab pkg search private_origin/my_package #successfully lists private packages (from stable and unstable channel) hab svc load private_origin/my_package » Installing private_origin/my_package ☁ Determining latest version of private_origin/my_package in the 'stable' channel ✗✗✗ ✗✗✗ [Err: 0] hab-sup(ER)[components/sup/src/error.rs:455:9]: Package not found. If you are attempting to install from a local depot with an upstream configured, try again in a few seconds. ✗✗✗ hab pkg install private_origin/my_package #installs latest stable package hab svc load private_origin/my_package --strategy at-once --channel stable # now the package is loaded, however new packages in the stable channel are not picked up without a explicit prior hab pkg install
So, what do I need to configure to be able to make the supervisor or
hab svc pick up privately listed packages?