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


kea-dhcp (2) Versions 1.0.0

Install and Configure ISC Kea DHCP server

cookbook 'kea-dhcp', '= 1.0.0'
cookbook 'kea-dhcp', '= 1.0.0', :supermarket
knife cookbook site install kea-dhcp
knife cookbook site download kea-dhcp
Quality 56%



Install and configure ISC Kea, a Modern Open Source DHCPv4 & DHCPv6 Server.

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.



Declared in metadata.rb and in Gemfile.


  • RHEL Family 7, tested on Centos

It should be easy to add a new platform.


Easy Setup

Add recipe[kea-dhcp::server] in your run-list to install and configure Kea. Configuration will be fetched from attributes node['kea-dhcp']['kea-conf']. It directly follows '/etc/kea/kea.conf' format. See official documentation for more help.

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

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

To see examples, look at .kitchen.yml.


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: Kea server listening on eth1
  • node-centos-7: generic node with eth1 configured in dhcp

For more information, see .kitchen.yml and test directory.


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

Specific configuration (client or server)

To allow clients and servers to share a same role, it is possible to define specific configuration keys applicable to one of the status (client or server).

Specific configurations can be any of the attributes defined in attributes/default.rb but in either "client-config" or "server-config" sub-tree.

A node is declared as server if its FQDN is included in attribute node['kea-dhcp']['servers'] defined as an array. Else, it is considered as a client.



Call init and then, following the node status, call client or server recipe.


Determine if the current machine is a server or a client by looking if current fqdn is included in node['kea-dhcp']['servers'] (empty by default). Write the result in run_state['kea-dhcp']['status']. Then merge default and specific (client or server) configurations and store the result in run_state['kea-dhcp']['config'].

Note: init is included in all recipes.


Install dhclient package.


Meta recipe which includes server_install, server_config and server_service.


Install Kea by from EPEL repository.


Set /etc/kea/kea.conf from attributes kea-conf.


Start and enable Kea services (like dhcp4, dhcp6, dhcp-ddns) if enabled in attributes services.


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

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




Available in CHANGELOG.


Please read carefully before making a merge request.

License and Author

Copyright (c) 2015-2016 Sam4Mobile, 2017

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

network_interfaces_v2 >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.




  • Initial version with Centos 7 support importing code from dhcp-wrapper
  • Add the installation and configuration of Kea, a modern DHCP server from ISC

Collaborator Number Metric

1.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

1.0.0 passed this metric

License Metric

1.0.0 passed this metric

No Binaries Metric

1.0.0 passed this metric

Publish Metric

1.0.0 passed this metric

Supported Platforms Metric

1.0.0 passed this metric

Testing File Metric

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number