cookbook 'dhcp-wrapper', '= 1.2.0', :supermarket
dhcp-wrapper (5) Versions 1.2.0 Follow0
Wrapper around dhcp cookbook
cookbook 'dhcp-wrapper', '= 1.2.0'
knife supermarket install dhcp-wrapper
knife supermarket download dhcp-wrapper
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
- Author:: Samuel Bernard (samuel.bernard@s4m.io)
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
network_interfaces_v2 >= 0.0.0 |
dhcp >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Foodcritic Metric
1.2.0 passed this metric
1.2.0 passed this metric