Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

packagecloud (33) Versions 1.0.1

Installs/Configures packagecloud.io repositories.

Policyfile
Berkshelf
Knife
cookbook 'packagecloud', '= 1.0.1', :supermarket
cookbook 'packagecloud', '= 1.0.1'
knife supermarket install packagecloud
knife supermarket download packagecloud
README
Dependencies
Changelog
Quality 33%

packagecloud cookbook

This cookbook provides a resource for installing https://packagecloud.io repositories.

NOTE: Please see the Changelog below for important changes if upgrading from 0.0.19 to 0.1.0.

Usage

Be sure to depend on packagecloud in metadata.rb so that the packagecloud resource will be loaded.

For public repos:

packagecloud_repo "computology/packagecloud-cookbook-test-public" do
  type "deb"
end

For private repos, you need to supply a master_token:

packagecloud_repo "computology/packagecloud-cookbook-test-private" do
  type "deb"
  master_token "762748f7ae0bfdb086dd539575bdc8cffdca78c6a9af0db9"
end

For packagecloud:enterprise users, add base_url to your resource:

packagecloud_repo "computology/packagecloud-cookbook-test-private" do
  base_url "https://packages.example.com"
  type "deb"
  master_token "762748f7ae0bfdb086dd539575bdc8cffdca78c6a9af0db9"
end

For forcing the os and dist for repository install:

packagecloud_repo 'computology/packagecloud-cookbook-test-public' do
  type 'rpm'
  force_os 'rhel'
  force_dist '6.5'
end

Valid options for type include deb, rpm, and gem.

This cookbook performs checks to determine if a package exists before attempting to install it. To enable proxy support for these checks (not to be confused with proxy support for your package manager of choice), add the following attributes to your cookbook:

default['packagecloud']['proxy_host'] = 'myproxy.organization.com'
default['packagecloud']['proxy_port'] = '80'

Interactions with other cookbooks

On CentOS 5, the official chef yum cookbook overwrites the file /etc/yum.conf setting some default values. When it does this, the cachedir value is changed from the CentOS5 default to the default value in the cookbook. The result of this change is that any packagecloud repository installed before a repository installed with the yum cookbook will appear as though it's gpg keys were not imported.

There are a few potential workarounds for this:

  • Pass the "-y" flag to package resource using the options attribute. This should cause yum to import the GPG key automatically if it was not imported already.
  • Move your packagecloud repos so that they are installed last, after any/all repos installed via the yum cookbook.
  • Set the cachedir option in the chef yum cookbook to the system default value of /var/cache/yum using the yum_globalconfig resource.

CentOS 6 and 7 are not affected as the default cachedir value provided by the yum chef cookbook is set to the system default, unless you use the yum_globalconfig resource to set a custom cachedir. If you do set a custom cachedir, you should make sure to setup packagecloud repos after that resource is set so that the GPG keys end up in the right place.

Changelog

See CHANGELOG.md for more recent changes.

Credits

Computology, LLC.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

appcanary Applicable Versions
chef-server-ingredient Applicable Versions
consul Applicable Versions
dokku Applicable Versions
gitlab_omnibus Applicable Versions
goiardi Applicable Versions
graphite-api Applicable Versions
kafka-manager Applicable Versions
mysql-mha Applicable Versions
openstack-mistral Applicable Versions
openvpn_duo Applicable Versions
openvpn_okta Applicable Versions
riak Applicable Versions
riak-cs Applicable Versions
runit Applicable Versions
sensu-go Applicable Versions
snap Applicable Versions
snoopy Applicable Versions
stackstorm Applicable Versions
supermarket Applicable Versions
swisnap Applicable Versions
twindb-repo Applicable Versions
tyk Applicable Versions

packagecloud

This is the Changelog for the packagecloud cookbook

v1.0.1 (2018-10-25)

Fix issues with newer versions of Chef (11+) by conditionally defining source_url and issues_url in metadata.rb

v1.0.0 (2018-03-12)

Lots of internal refactoring and fixes. Bumping the major number just incase,
but the changes should not break anyone using this cookbook.

v0.3.0 (2017-03-08)

Fix force_os and force_dist for Ubuntu/Debian. Drop support for Ubuntu Lucid. Add support for Ubuntu Xenial. Ensure lsb_release is installed on Ubuntu/Debian.

v0.2.5 (2016-08-11)

Check for empty node hostname. Display error when a node's fully qualified hostname is not set; as returned by hostname -f

v0.2.4 (2016-07-05)

Add proxy_host and proxy_port attributes so that the cookbook can contact the packagecloud server.

v0.2.3 (2016-06-01)

Try to fix metadata_expire type (set as String)

v0.2.2 (2016-06-01)

Try to fix metadata_expire type (set as Integer)

v0.2.1 (2016-05-31)

Set metadata_expire option to default of 300 (5 minutes) to match the generated configs produced by the bash and manual install instructions.

v0.2.0 (2016-02-17)

Rework GPG paths to support new GPG endpoints for repos with repo-specific GPG keys. Old endpoints/URLs still work, too.

v0.1.0 (2015-09-08)

packagecloud cookbook versions 0.0.19 used an attribute called default['packagecloud']['hostname'] for caching the local machine's hostname to avoid regenerating read tokens.

This attribute has been removed as it is confusing and in some edge cases, buggy.

Beginning in 0.1.0, you can use default['packagecloud']['hostname_override'] to specify a hostname if ohai is unable to determine the hostname of the node on its own.

v0.0.1 (2014-06-05)

Initial release.

v0.0.1 (2014-06-05)

Initial release!

Collaborator Number Metric
            

1.0.1 passed this metric

Contributing File Metric
            

1.0.1 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

Cookstyle Metric
            

1.0.1 failed this metric

Chef/Correctness/MetadataMissingVersion: metadata.rb should define a version for the cookbook. (https://docs.chef.io/workstation/cookstyle/chef_correctness_metadatamissingversion): packagecloud/test/fixtures/cookbooks/packagecloud_test/metadata.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): packagecloud/resources/repo.rb: 1
Chef/Modernize/ClassEvalActionClass: In Chef Infra Client 12.9 and later it is no longer necessary to call the class_eval method on the action class block. (https://docs.chef.io/workstation/cookstyle/chef_modernize_classevalactionclass): packagecloud/resources/repo.rb: 23
Chef/Modernize/DefinesChefSpecMatchers: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook (https://docs.chef.io/workstation/cookstyle/chef_modernize_defineschefspecmatchers): packagecloud/libraries/matchers.rb: 1
Chef/Modernize/FoodcriticComments: Remove legacy code comments that disable Foodcritic rules (https://docs.chef.io/workstation/cookstyle/chef_modernize_foodcriticcomments): packagecloud/resources/repo.rb: 72
Chef/Modernize/RespondToInMetadata: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later (https://docs.chef.io/workstation/cookstyle/chef_modernize_respondtoinmetadata): packagecloud/metadata.rb: 8
Chef/Modernize/RespondToInMetadata: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later (https://docs.chef.io/workstation/cookstyle/chef_modernize_respondtoinmetadata): packagecloud/metadata.rb: 9
Chef/Modernize/RespondToInMetadata: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later (https://docs.chef.io/workstation/cookstyle/chef_modernize_respondtoinmetadata): packagecloud/metadata.rb: 10
Chef/RedundantCode/LongDescriptionMetadata: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata): packagecloud/metadata.rb: 6

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

1.0.1 passed this metric

Testing File Metric
            

1.0.1 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
            

1.0.1 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