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

Wrapper around dhcp cookbook

Policyfile
Berkshelf
Knife
cookbook 'dhcp-wrapper', '= 1.0.0', :supermarket
cookbook 'dhcp-wrapper', '= 1.0.0'
knife supermarket install dhcp-wrapper
knife supermarket download dhcp-wrapper
README
Dependencies
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.

Changes

1.0.0:

  • Initial version with Centos 7 support

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.

Resources/Providers

None.

Contributing

You are more than welcome to submit issues and merge requests to this project.

Commits

Your commits must pass git log --check and messages should be formated
like this (based on this excellent
post):

Summarize change in 50 characters or less

Provide more detail after the first line. Leave one blank line below the
summary and wrap all lines at 72 characters or less.

If the change fixes an issue, leave another blank line after the final
paragraph and indicate which issue is fixed in the specific format
below.

Fix #42

Also do your best to factor commits appropriately, ie not too large with
unrelated things in the same commit, and not too small with the same small
change applied N times in N different commits. If there was some accidental
reformatting or whitespace changes during the course of your commits, please
rebase them away before submitting the MR.

Files

All files must be 80 columns width formatted (actually 79), exception when it
is not possible.

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.

Foodcritic Metric
            

1.0.0 passed this metric