Skip to content

Chef Package Registry

Publish Chef cookbooks for your user or organization.

To work with the Chef package registry, the tool knife can be used.

The Chef package registry does not use authentication via username and password but signed requests with a pair of private and public keys. Visit the package owner settings page to create the necessary key pair. Only the public key is stored inside HoyoShip. If you lose access to the private key you must re-generate the key pair. Configure knife to use the downloaded private key with your HoyoShip username as client_name.

To configure knife to use the HoyoShip package registry, add this URL to the ~/.chef/config.rb file:

knife[:supermarket_site] = 'https://hoyoship.example.com/api/packages/{owner}/chef'
ParameterDescription
ownerThe owner of the package.

To publish a Chef package execute the following command:

Terminal window
knife supermarket share {package_name}
ParameterDescription
package_nameThe package name.

You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.

To install a package from the package registry, execute the following command:

Terminal window
knife supermarket install {package_name}

Optionally, you can specify the package version:

Terminal window
knife supermarket install {package_name} {package_version}
ParameterDescription
package_nameThe package name.
package_versionThe package version.

If you want to remove a package from the registry, execute the following command:

Terminal window
knife supermarket unshare {package_name}

Optionally, you can specify the package version:

Terminal window
knife supermarket unshare {package_name}/versions/{package_version}
ParameterDescription
package_nameThe package name.
package_versionThe package version.