{"action":"created","issue":{"url":"https://api.github.com/repos/habitat-sh/habitat/issues/4476","repository_url":"https://api.github.com/repos/habitat-sh/habitat","labels_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4476/labels{/name}","comments_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4476/comments","events_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4476/events","html_url":"https://github.com/habitat-sh/habitat/issues/4476","id":290659112,"number":4476,"title":"Flag to load services in local mode only","user":{"login":"wduncanfraser","id":579945,"avatar_url":"https://avatars0.githubusercontent.com/u/579945?v=4","gravatar_id":"","url":"https://api.github.com/users/wduncanfraser","html_url":"https://github.com/wduncanfraser","followers_url":"https://api.github.com/users/wduncanfraser/followers","following_url":"https://api.github.com/users/wduncanfraser/following{/other_user}","gists_url":"https://api.github.com/users/wduncanfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/wduncanfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wduncanfraser/subscriptions","organizations_url":"https://api.github.com/users/wduncanfraser/orgs","repos_url":"https://api.github.com/users/wduncanfraser/repos","events_url":"https://api.github.com/users/wduncanfraser/events{/privacy}","received_events_url":"https://api.github.com/users/wduncanfraser/received_events","type":"User","site_admin":false},"labels":[{"id":621112519,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/A-supervisor","name":"A-supervisor","color":"87B09A","default":false},{"id":621115721,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/C-feature","name":"C-feature","color":"ff9012","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/habitat-sh/habitat/milestones/2","html_url":"https://github.com/habitat-sh/habitat/milestone/2","labels_url":"https://api.github.com/repos/habitat-sh/habitat/milestones/2/labels","id":2179758,"number":2,"title":"Accepted Minor","description":null,"creator":{"login":"smurawski","id":4006985,"avatar_url":"https://avatars0.githubusercontent.com/u/4006985?v=4","gravatar_id":"","url":"https://api.github.com/users/smurawski","html_url":"https://github.com/smurawski","followers_url":"https://api.github.com/users/smurawski/followers","following_url":"https://api.github.com/users/smurawski/following{/other_user}","gists_url":"https://api.github.com/users/smurawski/gists{/gist_id}","starred_url":"https://api.github.com/users/smurawski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smurawski/subscriptions","organizations_url":"https://api.github.com/users/smurawski/orgs","repos_url":"https://api.github.com/users/smurawski/repos","events_url":"https://api.github.com/users/smurawski/events{/privacy}","received_events_url":"https://api.github.com/users/smurawski/received_events","type":"User","site_admin":false},"open_issues":101,"closed_issues":152,"state":"open","created_at":"2016-12-06T20:34:26Z","updated_at":"2018-02-13T18:58:56Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-01-22T23:50:24Z","updated_at":"2018-02-13T19:12:05Z","closed_at":null,"author_association":"NONE","body":"# Issue\r\n\r\nThis is related to existing issues around starting services from locally installed pkgs: #4019 and #4065.\r\nCurrently, the only way to load a service from a locally installed packages is to specify the hart file directly, regardless if it has already been installed locally, such as:\r\n\r\n```shell\r\nsudo hab svc load results/mtasolutions-mymta-frontend-site-3.0.1.0-20180122230236-x86_64-linux.hart\r\n```\r\n\r\nThis complicates management, especially via CM such as Chef.\r\n\r\nIf you were to try and install the pkg and then start it via origin/name or even by the fully qualified named, hab tries to check bldr for the package and doesn't respect the locally installed version.\r\n\r\n```\r\n[vagrant@ac-software-dev src]$ sudo hab pkg install results/mtasolutions-mymta-frontend-site-3.0.1.0-20180122230236-x86_64-linux.hart \r\n☛ Verifying mtasolutions/mymta-frontend-site/3.0.1.0/20180122230236\r\n→ Using core/bzip2/1.0.6/20170513212938\r\n→ Using core/cacerts/2017.09.20/20171014212239\r\n→ Using core/curl/7.54.1/20171014214153\r\n→ Using core/gcc-libs/5.2.0/20170513212920\r\n→ Using core/glibc/2.22/20170513201042\r\n→ Using core/libedit/3.1.20150325/20170514030323\r\n→ Using core/linux-headers/4.3/20170513200956\r\n→ Using core/ncurses/6.0/20170513213009\r\n→ Using core/nghttp2/1.24.0/20170830163632\r\n→ Using core/nginx/1.11.10/20171014214153\r\n→ Using core/openssl/1.0.2l/20171014213633\r\n→ Using core/pcre/8.38/20170513213423\r\n→ Using core/zlib/1.2.8/20170513201911\r\n✓ Installed mtasolutions/mymta-frontend-site/3.0.1.0/20180122230236\r\n★ Install of mtasolutions/mymta-frontend-site/3.0.1.0/20180122230236 complete with 1 new packages installed.\r\n[vagrant@ac-software-dev src]$ sudo hab svc load mtasolutions/mymta-frontend-site\r\n» Installing mtasolutions/mymta-frontend-site from channel 'stable'\r\nhab-sup(ER)[src/error.rs:452:8]: Package not found\r\n```\r\n\r\nAfter some discussion in slack, I tried loading with NO_INSTALL_DEPS and a fully qualified package name, but this results in error:\r\n\r\n```\r\n[vagrant@ac-software-dev src]$ export NO_INSTALL_DEPS=1\r\n[vagrant@ac-software-dev src]$ sudo hab svc load mtasolutions/mymta-frontend-site/3.0.1.0/20180122230236\r\n» Installing mtasolutions/mymta-frontend-site/3.0.1.0/20180122230236 from channel 'stable'\r\nhab-sup(ER)[src/error.rs:452:8]: Channel not found\r\n```\r\n\r\n# Request\r\n\r\nIt would be awesome if we could flag specific services when loaded to operate in a local context, never checking bldr and handling strategy when pkgs are installed locally.\r\n\r\nThis would not be specifically for air gapped environments such as #4039. This would be meant for environments where you may be running OSS packages from depot and internally built proprietary packages in parallel.\r\n\r\nExample usage:\r\n\r\n```hab svc load <origin>/<name>```\r\n\r\nWould behave like today, where it checks against depot for the most recent packages. Where\r\n\r\n```hab svc load <origin>/<name> --local``` \r\n\r\nwould completely ignore bldr and check the local pkg cache. If the package is not found, throw an error (similar to not being found in bldr). If a new version of the package was installed, it would update the service according to the strategy.\r\n\r\nMore on our use case: We have common tooling and open source packages that we use from bldr but all our internal/proprietary software projects are built locally in CI and published to our local Artifactory server, and then deployed to machines via Chef. Certain packages such as postgresql are run directly using bldr integration, however our internal packages are 100% downloaded and installed locally via Chef.\r\n"},"comment":{"url":"https://api.github.com/repos/habitat-sh/habitat/issues/comments/365371900","html_url":"https://github.com/habitat-sh/habitat/issues/4476#issuecomment-365371900","issue_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4476","id":365371900,"user":{"login":"christophermaier","id":207178,"avatar_url":"https://avatars2.githubusercontent.com/u/207178?v=4","gravatar_id":"","url":"https://api.github.com/users/christophermaier","html_url":"https://github.com/christophermaier","followers_url":"https://api.github.com/users/christophermaier/followers","following_url":"https://api.github.com/users/christophermaier/following{/other_user}","gists_url":"https://api.github.com/users/christophermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/christophermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophermaier/subscriptions","organizations_url":"https://api.github.com/users/christophermaier/orgs","repos_url":"https://api.github.com/users/christophermaier/repos","events_url":"https://api.github.com/users/christophermaier/events{/privacy}","received_events_url":"https://api.github.com/users/christophermaier/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T19:12:05Z","updated_at":"2018-02-13T19:12:05Z","author_association":"CONTRIBUTOR","body":"@wduncanfraser Can you confirm that #4607 fixes this for you?"}}
{"actor":{"display_login":"christophermaier"}}