cookbook 'depot', '~> 0.4.0'
depot (6) Versions 0.4.0 Follow4
Installs/Configures Habitat Depot
cookbook 'depot', '~> 0.4.0', :supermarket
knife supermarket install depot
knife supermarket download depot
Habitat Depot
This cookbook will set up a private Habitat Depot, running all the required services on one machine.
While 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.
Requirements
- Chef 12.11 or higher (for habitat cookbook)
Platform Support
- Ubuntu 16.04
Setup
Place a dependency on the depot cookbook in your cookbook's metadata.rb.
depends 'depot', '~> 0.4.0'
Then, in a recipe:
include_recipe 'depot'
A service will be created as hab-depot
.
Attributes
There 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']
.
name | default | description |
---|---|---|
node['depot']['oauth']['client_id'] |
nil |
Github Client ID for OAuth |
node['depot']['oauth']['client_secret'] |
nil |
Github Client Secret for OAuth |
node['depot']['user_toml'] |
See ./attributes/default.rb
|
Specify each key in the hash rendered in the TOML file with its value |
node['depot']['user_toml']['app_url'] |
'http://FQDN/v1' |
FQDN defaults to node['fqdn'] , falling back to node.name
|
If 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.
Local Test
Run a local Depot for testing with test kitchen.
$ kitchen converge
A VM will start up on 192.168.96.31, and will be accessible at http://192.168.96.31 from the host machine.
Once 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.
- Create a new OAuth application on Github. Name it
kitchen-habitat-depot
or similar. The homepage URL should behttp://192.168.96.31
. The Authorization Callback URL must behttp://192.168.96.31/#/sign-in
. Save the client ID and client secret to a shell script file that looks like this:export GITHUB_CLIENT_ID=1edd05b4912af4eed6e16b9a export GITHUB_CLIENT_SECRET=4fdedc08a0a0d9c035a321edd05b4912af4eed6e16b9a
Source this file in the shell and rerunkitchen converge
.$ . ~/.github/kitchen-habitat-depot-oauth $ kitchen converge
- Create a personal access token on Github. Name it
kitchen-habitat-depot
or similar. Give it permission touser
anduser:email
. Save the token to a file, for example~/.github/kitchen-habitat-depot
- Open the local Depot at http://192.168.96.31.
- Sign-in using Github on the sign-in page.
- Create a new origin in the UI.
- Create a new origin key on the local system and upload it to the Depot.
$ hab origin key generate kitchen-tester $ hab origin key upload --url http://192.168.96.31/v1/depot kitchen-tester -z $(cat ~/.github/kitchen-habitat-depot)
- Create packages using that origin, and then upload them to the depot!
$ hab pkg upload --url http://192.168.96.31/v1/depot somepackage.hart -z $(cat ~/.github/kitchen-habitat-depot)
Dependent cookbooks
habitat ~> 0.3.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.4.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.0 failed this metric
FC067: Ensure at least one platform supported in metadata: depot/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.0 failed this metric
FC067: Ensure at least one platform supported in metadata: depot/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number