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

dhcp-wrapper (5) Versions 1.2.0

Wrapper around dhcp cookbook

Policyfile
Berkshelf
Knife
cookbook 'dhcp-wrapper', '= 1.2.0', :supermarket
cookbook 'dhcp-wrapper', '= 1.2.0'
knife supermarket install dhcp-wrapper
knife supermarket download dhcp-wrapper
README
Dependencies
Changelog
Quality 100%

DHCP Wrapper

Description

Install and configure ISC DHCP by
wrapping cookbook dhcp.

Can also configure network interfaces by the use of cookbook
network_interfaces_v2, for instance to
set a static address at the server and dhcp for the clients.

Usage

Easy Setup

Add recipe[dhcp-wrapper::server] in your run-list to install and configure
DHCPD. Configuration will be fetched from attributes node['dhcp']. See
cookbook dhcp documentation
for more information.

Add recipe[dhcp-wrapper::client] to install a dhcp client.

Add recipe[dhcp-wrapper::network-interface] to configure your network
interfaces. Configuration is fetched from attributes
node['dhcp-wrapper']['network-interface'] which should match those of
provider network_interface.

To see an example, look at [.kitchen.yml](.kitchen.yml).

Test

This cookbook is fully tested through the installation of a server and a node
in docker hosts. This uses kitchen, docker and some monkey-patching.

If you run kitchen list, you will see 2 suites, Each corresponds to a different
server:

  • server-centos-7: DHCPD server listening on eth1
  • node-centos-7: generic node with eth1 configured in dhcp

For more information, see [.kitchen.yml](.kitchen.yml) and [test](test)
directory.

Note: This configuration need a second interface which is provided by
pipework. Because pipework need
administrative priviledges, sudo access is required to create the dockers
with kitchen create.

Changelog

Available in [CHANGELOG](CHANGELOG).

Requirements

Cookbooks

Declared in [metadata.rb](metadata.rb).

Gems

Declared in [Gemfile](Gemfile).

Platforms

  • RHEL Family 7, tested on Centos

Note: it should work fine on Debian 8 but the official docker image does not
allow systemd to work easily, so it could not be tested.

Attributes

Configuration is done by overriding default attributes. All configuration keys
have a default defined in [attributes/default.rb](attributes/default.rb).
Please read it to have a comprehensive view of what and how you can configure
this cookbook behavior.

Recipes

default

Do nothing.

client

Install dhclient package.

server

Proxy for dhcp::server recipe. Please look at [.kitchen.yml](.kitchen.yml)
and dhcp documentation for more information.

network-interface

Call network_interface_rhel provider based on
attributes node['dhcp-wrapper']['network-interface'].
See [.kitchen.yml](.kitchen.yml) and cookbook
network_interface_v2 for more information.

Create static routes based on node['dhcp-wrapper']['routes'] attribute.

Resources/Providers

None.

Contributing

Please read carefully [CONTRIBUTING.md](CONTRIBUTING.md) before making a merge
request.

License and Author

Copyright:: 2015, Sam4Mobile

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

dhcp >= 0.0.0
network_interfaces_v2 >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog ========= 1.2.0 ----- - Fix idempotency by removing the block hack in network-interface recipe - Reorganize README: + Move changelog from README to CHANGELOG + Move contribution guide to CONTRIBUTING.md + Reorder README, fix Gemfile missing - Add Apache 2 license file 1.1.0 ----- - Add support for static routes 1.0.0 ----- - Initial version with Centos 7 support

Foodcritic Metric
            

1.2.0 passed this metric