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

yumrepo_server (10) Versions 0.1.4

Installs/Configures Yum repository server

Policyfile
Berkshelf
Knife
cookbook 'yumrepo_server', '= 0.1.4', :supermarket
cookbook 'yumrepo_server', '= 0.1.4'
knife supermarket install yumrepo_server
knife supermarket download yumrepo_server
README
Dependencies
Changelog
Quality -%

yumrepo_server Cookbook

This cookbook configures a Yum repository to be served from your system. It will automatically install and configure the Apache web server (as it's the only server that's available without requiring the EPEL yum repo). It also install the createrepo package for the utilities needed to setup a directory as a yum source.

Requirements

Ruby 1.9 or later

cookbooks

  • apache2
  • logrotate

packages

  • httpd - needed to serve the packages in the repository
  • createrepo - needed to setup the repository
  • logrotate - needed by the httpd package to configure log file management

platforms

Any system that uses Yum and has the required pakcages

Attributes

yumrepo_server::default

  • ['yum']['server']['repo_base_dir']

    Type: String

    Description: The base directory where the repositories will be configured. Will be used as Apache's DocumentRoot

    Default: /var/lib/yum-repo

  • ['yum']['server']['http_aliases']

    Type: Array

    Description: An array of server name aliases to plug in to the httpd config

    Default: [] (empty array)

  • ['yum']['server']['http_port']

    Type: Integer

    Description: The server port to plug in to the httpd config

    Default: 80

  • ['apache']['include_logrotate']

    Type: Boolean

    Description: Flag to determine if logrotate will be configured for Apache logs

    Default: true

Usage

Recipes

yumrepo_server::default

Just include yumrepo_server in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[yumrepo_server]"
  ]
}

LWRPs

yumrepo_server

:create action

Create a yum repository inside of the relative path given (will be rooted at node['yum']['server']['repo_base_dir'])

With implied directory

yumrepo_server 'relative/yum/repo/path' do
  action :create
  options "-v --quiet"  # An optional string of options to pass to the createrepo command
  remote_source "http://upstream.com/path" # An optional URL string used as a base to retrieve packages from
  packages %w(pkg1.rpm pkg2.rpm pkg3.rpm)  # An optional array of package names to be configured in the repo (default is all packages). Required with the :remote_source attribute to specify which packages to retrieve.
end

With explicit directory

yumrepo_server 'creates my yum repo' do
  action :create
  dir 'relative/yum/repo/path' # Required relative path to create repo at (this value will be appended to the value of node['yum']['server']['repo_base_dir'])
  options "-v --quiet"  # An optional string of options to pass to the createrepo command
  remote_source "http://upstream.com/path" # An optional URL string used as a base to retrieve packages from
  packages %w(pkg1.rpm pkg2.rpm pkg3.rpm)  # An optional array of package names to be configured in the repo (default is all packages). Required with the :remote_source attribute to specify which packages to retrieve.
end
:update action

Update the the yum repository at the path given

yumrepo_server 'relative/yum/repo/path' do
  action :update
  options "-v --quiet"  # An optional string of options to pass to the createrepo command
end
:delete action

Deletes the repository at the given path (basically delete the directory)

yumrepo_server 'relative/yum/repo/path' do
  action :delete
end

License and Authors

Authors: Michael Morris

License: 3-clause BSD

Dependent cookbooks

apache2 >= 0.0.0
logrotate >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

yumrepo_server CHANGELOG

0.1.0

  • [mmmorris1975] - Initial release of yumrepo_server

0.1.1

  • [mmmorris1975] - Added node['ipaddress'] to the array of server_alias values in the web_app lwrp
  • [mmmorris1975] - Added test kitchen, removed Fedora from supported platforms.

0.1.2

  • [mmmorris1975] - Added attribute to pass in custom httpd ServerAlias values
  • [mmmorris1975] - Updated file headers to include correct copyright/license info

0.1.3

  • [mmmorris1975] - Changed bundle process from tar to 'knife cookbook site share'

0.1.4

  • [gimler] - Added option to specify http port

No quality metric results found