Giter Club home page Giter Club logo

packagecloud-cookbook's Introduction

packagecloud cookbook

This cookbook provides an LWRP 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.

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

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.

Credits

Computology, LLC.

packagecloud-cookbook's People

Contributors

armandocanals avatar capotej avatar cwebberops avatar guilhem avatar hartmantis avatar ice799 avatar iennae avatar jamesgolick avatar jaym avatar joemiller avatar spheromak avatar sysbot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.