GithubHelp home page GithubHelp logo

repository-1's Introduction

Repository

Build a repository, using Chef.

Supported

Currently only providing apt based repositories

Usage (easy)

Setup the incoming repository by adding repository::incoming to the run list. This will create a directory (by default at /srv/repository_incoming). Drop packages there and run Chef. Chef will automatically add them into the repository. Yay!

Incoming related attributes

default[:repository][:incoming][:codename] = node.lsb.codename
default[:repository][:incoming][:name] = 'incoming'
default[:repository][:incoming][:architecture] = 'amd64'
default[:repository][:incoming][:label] = 'Incoming Repository'
default[:repository][:incoming][:description] = 'Incoming repository for dropped off packages'
default[:repository][:incoming][:directory] = '/srv/repository_incoming'
default[:repository][:incoming][:multi_version] = true
default[:repository][:incoming][:enable_locally] = true

Usage (involved)

Adding repository

You can add your own repository components using the repos array attribute. For example:

node.set[:repository][:repos] = [
  :name => 'my_packages',
  :codename => 'precise',
  :architecture => %w(amd64),
  :multi_version => true
]

or via the LWRP:

repository 'my_packages' do
  codename 'precise'
  architecture %w(amd64)
  multi_version => true
end

Adding Packages

Add packages to the repository by using the repository_package LWRP:

repository_package '/path/to/my/cool/package.deb' do
  repository 'my_packages'
end

Keys

Keys are required to sign packages and repository files. They can be provided via data bag, encrypted data bag, or automatically generated on the node. By default the keys will be auto generated using the gpg cookbook.

Data bag

  • To enable data bag based keys: node.set[:repository][:pgp_data_bag] = true
  • To enable encrypted data bag based keys: node.set[:repository][:pgp_data_bag] = 'encrypted'

Encrypted data bags will use the default secret for decryption.

Data bag structure

{
  "id": "pgp",
  "email": "[email protected]",
  "private": "PRIVATE KEY CONTENTS",
  "public": "PUBLIC KEY CONTENTS"
}

Infos

repository-1's People

Contributors

chrisroberts avatar tas50 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.