Git Product home page Git Product logo

cookbook-repos's Introduction

Description

Manages repositories for your platform. Currently only Debian-based distributions are supported.

Simple repository source can be described via node attributes. If you need more complicated setup you can use separate recipes, some are supplied with this cookbook.

Platform

  • Debian/Ubuntu

Attributes

  • node['repos'] - List of repositories to be activated by default recipe. Can be either recipe name to be included or attributes hash. The keys in each hash correspond to the attributes passed to the repository resource. Attribute 'type' defines which repository resource will be used, but only 'apt' is supported now.

Usage

If repository is defined in a separate recipe you may either add it directly to run_list, include from your wrapper-cookbook or use data-driven approach and enumerate desired repos in 'repos' attribute anywhere you want.

When you just need to add simple package source without additional actions like pinning, just add attribute hash describing repo in node["repos"] list.

Example use of run_list:

run_list("recipe[repos::percona]")

Example use of 'repos' attribute

run_list("recipe[repos]")
override_attributes( "repos" => ['jenkins-debian-glue', 'backports'] )

Example use of repo hash:

"repos" => ['jenkins-debian-glue',
  { 'type' => "apt",
    'name' => "nginx-1.2.6",
    'uri'  => "http://ci.clodo.ru/release/nginx-1.2.6",
    'distribution' => "nginx-1.2.6",
    'components' => ["main"]
  },
]

Pinnig

To pin down packages and repositories you can use pin_priority attribute of repository and preferences array like this:

"repos" =>[
    { 'type' => 'apt',
      'name' => 'wheezy-backports',
      'pre_packages' => ["debian-keyring"],
      'uri' => 'http://http.debian.net/debian',
      'distribution' => 'wheezy-backports',
      'components' => ['main'],
      'pin_priority' => '99',
      'preferences' => [{
          "packages" => ["rsyslog", "rsyslog-relp", "librelp0", 'libestr0', 'libjson-c2', 'liblogging-stdlog0'],
          "pin_priority" => "501"
      }]
    }
]

To install some packages before setting up repository (like debian-keyring) use pre_packages attribute.

TODO

  • Databags support

cookbook-repos's People

Contributors

realloc 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.