{"id":22353251,"url":"https://github.com/bdangit/chef-depot","last_synced_at":"2025-07-30T08:33:56.638Z","repository":{"id":71090693,"uuid":"69427700","full_name":"bdangit/chef-depot","owner":"bdangit","description":"Cook up a Habitat Depot","archived":false,"fork":false,"pushed_at":"2018-03-28T23:30:45.000Z","size":30,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T04:41:15.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdangit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-28T05:09:06.000Z","updated_at":"2018-03-28T02:12:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"1044d103-a27a-447d-bace-6bc2a3ce907c","html_url":"https://github.com/bdangit/chef-depot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bdangit/chef-depot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdangit%2Fchef-depot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdangit%2Fchef-depot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdangit%2Fchef-depot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdangit%2Fchef-depot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdangit","download_url":"https://codeload.github.com/bdangit/chef-depot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdangit%2Fchef-depot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267835999,"owners_count":24151900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T12:35:30.270Z","updated_at":"2025-07-30T08:33:56.622Z","avatar_url":"https://github.com/bdangit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Habitat Depot\n=============\n\nThis cookbook will set up a private [Habitat](http://habitat.sh) Depot, running all the required services on one machine.\n\nWhile this is tested and may work for other users, private depots are *not yet supported* by Chef Software, Inc. nor the Habitat project. Use at your own risk, and be aware that there is no planned migration strategy.\n\n## Requirements\n\n- Chef 12.11 or higher (for [habitat cookbook](https://supermarket.chef.io/cookbooks/habitat))\n\n## Platform Support\n\n- Ubuntu 16.04\n\n## Setup\n\nPlace a dependency on the depot cookbook in your cookbook's metadata.rb.\n\n```ruby\ndepends 'depot', '~\u003e 0.4.0'\n```\n\nThen, in a recipe:\n\n```ruby\ninclude_recipe 'depot'\n```\n\nA service will be created as `hab-depot`.\n\n## Attributes\n\nThere are several attributes used to render the configuration files used for the api and sessionsrv services. They live under `node['depot']['oauth']` and `node['depot']['user_toml']`.\n\n|*name*|*default*|*description*|\n|------|---------|-------------|\n|`node['depot']['oauth']['client_id']`|`nil`| Github Client ID for OAuth |\n|`node['depot']['oauth']['client_secret']`|`nil`| Github Client Secret for OAuth |\n|`node['depot']['user_toml']`|See `./attributes/default.rb`| Specify each key in the hash rendered in the TOML file with its value |\n|`node['depot']['user_toml']['app_url']`|`'http://FQDN/v1'`| FQDN defaults to `node['fqdn']`, falling back to `node.name` |\n\nIf the `client_id` and `client_secret` are not set, users will not be able to sign in, create origins, or upload packages to the Depot. Create an OAuth application on Github first, and then use the values for these attributes.\n\n## Local Test\n\nRun a local Depot for testing with test kitchen.\n\n    $ kitchen converge\n\nA VM will start up on 192.168.96.31, and will be accessible at http://192.168.96.31 from the host machine.\n\nOnce this is provisioned, it can be used for local testing. In order to upload packages, a Github OAuth application and personal access token must be created and the kitchen VM re-configured.\n\n1. Create a new OAuth application [on Github](https://github.com/settings/applications/new). Name it `kitchen-habitat-depot` or similar. The homepage URL should be `http://192.168.96.31`. The Authorization Callback URL must be `http://192.168.96.31/#/sign-in`. Save the client ID and client secret to a shell script file that looks like this:\n```\nexport GITHUB_CLIENT_ID=1edd05b4912af4eed6e16b9a\nexport GITHUB_CLIENT_SECRET=4fdedc08a0a0d9c035a321edd05b4912af4eed6e16b9a\n```\nSource this file in the shell and rerun `kitchen converge`.\n```\n$ . ~/.github/kitchen-habitat-depot-oauth\n$ kitchen converge\n```\n2. Create a personal access token [on Github](https://github.com/settings/tokens/new). Name it `kitchen-habitat-depot` or similar. Give it permission to `user` and `user:email`. Save the token to a file, for example `~/.github/kitchen-habitat-depot`\n3. Open the local Depot at [http://192.168.96.31](http://192.168.96.31).\n4. Sign-in using Github on the [sign-in page](http://192.168.96.31/#/sign-in).\n5. Create a new origin in the UI.\n6. Create a new origin key on the local system and upload it to the Depot.\n```\n$ hab origin key generate kitchen-tester\n$ hab origin key upload --url http://192.168.96.31/v1/depot kitchen-tester -z $(cat ~/.github/kitchen-habitat-depot)\n```\n7. Create packages using that origin, and then upload them to the depot!\n```\n$ hab pkg upload --url http://192.168.96.31/v1/depot somepackage.hart -z $(cat ~/.github/kitchen-habitat-depot)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdangit%2Fchef-depot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdangit%2Fchef-depot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdangit%2Fchef-depot/lists"}