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

RSS

yumserver (12) Versions 1.0.0

Installs/Configures yumserver & mirrors remote repos.

Berkshelf/Librarian
Policyfile
Knife
cookbook 'yumserver', '= 1.0.0'
cookbook 'yumserver', '= 1.0.0', :supermarket
knife cookbook site install yumserver
knife cookbook site download yumserver
README
Dependencies
Changelog
Quality 0%

yumserver Cookbook

Build Status

Table of Contents

  1. Overview
  2. Requirements
  3. Attributes
  4. Usage
  5. Contributing
  6. License & Authors

Overview

This cookbook allows you to mirror remote Yum repos and serve them up via NGINX.

Requirements

Requires Chef 12.5 or later as this cookbook makes use of Custom Resources.

Attributes

yumserver::default

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['yumserver']['basepath']</tt></td> <td>String</td> <td>Where to store mirroed yum repos.</td> <td><tt>/var/lib/yum-repo</tt></td> </tr> </table>

yumserver::_nginx

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['yumserver']['nginx']['config_cookbook']</tt></td> <td>String</td> <td>Which cookbook to use for the NGINX config template.</td> <td><tt>yumserver</tt></td> </tr> <tr> <td><tt>['yumserver']['nginx']['servername']</tt></td> <td>String</td> <td>Server name to use in NGINX config.</td> <td><tt>node['fqdn']</tt></td> </tr> </table>

Usage

You always need to include the main recipe:

include_recipe 'yumserver::default'

This creates the basepath and installs the following packages:

  • yum-utils
  • createrepo

Additionally the recipe calls yumserver::_nginx which;

  • Sets-up the upstream NGINX repo.
  • Installs nginx.
  • Configures nginx to serve up the basepath.
  • Manages the nginx service.

yumserver_mirror

Each Yum repo you wish to mirror can be defined using the yumserver_mirror custom resource.

Each yumserver_mirror has the following attributes:

<table> <tr> <th>Attribute</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>name</tt></td> <td>String || Symbol</td> <td>Resource name.</td> <td><tt>N/A</tt></td> </tr> <tr> <td><tt>local_path</tt></td> <td>String</td> <td>The basepath where the repo should be stored.</td> <td><tt>/var/lib/yum-repo</tt></td> </tr> <tr> <td><tt>repo_name</tt></td> <td>String</td> <td>Name of the Yum repo.</td> <td><tt>N/A</tt></td> </tr> <tr> <td><tt>repo_description</tt></td> <td>String</td> <td>Description of the Yum repo.</td> <td><tt>N/A</tt></td> </tr> <tr> <td><tt>repo_baseurl</tt></td> <td>String</td> <td>Base URL of the Yum repo.</td> <td><tt>N/A</tt></td> </tr> </table>

To Mirror EPEL for EL7 for example:

yumserver_mirror 'epel7' do
  repo_name 'nginx'
  repo_description 'The NGINX web server & reverse proxy'
  repo_baseurl 'http://nginx.org/packages/centos/7/x86_64/'
  action :create
end

Contributing

If you would like to contribute to this cookbook please follow these steps;

  1. Fork the repository on Github.
  2. Create a named feature branch (like add_component_x).
  3. Write your change.
  4. Write tests for your change (if applicable).
  5. Run the tests, ensuring they all pass.
  6. Submit a Pull Request using Github.

License and Authors

License: BSD 2-clause

Authors: * Danny Roberts * All Contributors

Dependent cookbooks

yum >= 3.5.2

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

2015-10-11 - Release 1.0.0

Summary

Initial release. Includes basic functionality.

Features

  • Mirrors Yum repos.
  • Serves Yum repos via NGINX.

Foodcritic Metric
            

1.0.0 failed this metric

FC016: LWRP does not declare a default action: /tmp/cook/39dab09bed2d69ccb7b31ef8/yumserver/resources/mirror.rb:1