forked from chef-boneyard/cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jtimberman
committed
Nov 9, 2011
1 parent
ac2e00b
commit ad2dba1
Showing
2 changed files
with
42 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
Description | ||
=========== | ||
|
||
Configures a tftpd server for serving Ubuntu installers over PXE and setting them to run a provided preseed.cfg. | ||
|
||
Requirements | ||
============ | ||
Written and last tested with Chef 0.10.0 and Ubuntu 10.04 and 10.10. Using the `[apt::cacher]` recipe is highly recommended, but not a requirement. | ||
|
||
Requires Chef 0.10.0+. | ||
|
||
## Platform: | ||
|
||
Tested on: | ||
|
||
* Ubuntu 10.04-11.10 | ||
* Debian 6.0 | ||
|
||
## Cookbooks: | ||
|
||
Required: apache2, tftp | ||
|
||
Optional (recommended): apt (for `recipe[apt::cacher]`) | ||
|
||
pxe_dust Data Bag | ||
================= | ||
In order to manage configuration of machines registering themselves with their Chef Server or the Opscode Platform, we will use the `pxe_dust` data bag. | ||
|
||
In order to manage configuration of machines registering themselves with their Chef Server or Opscode Hosted Chef, we will use the `pxe_dust` data bag. | ||
|
||
``` | ||
% knife data bag create pxe_dust | ||
% knife data bag from file pxe_dust examples/defaults.json | ||
% knife data bag from file pxe_dust examples/default.json | ||
``` | ||
|
||
Here is an example of the defaults.json: | ||
Here is an example of the default.json: | ||
|
||
```json | ||
{ | ||
"id": "defaults", | ||
"id": "default", | ||
"arch": "amd64", | ||
"version": "lucid", | ||
}, | ||
|
@@ -31,53 +47,44 @@ Here is an example of the defaults.json: | |
} | ||
``` | ||
|
||
Here are currently supported options available for inclusion in the `defaults.json`.: | ||
Here are currently supported options available for inclusion in the `default.json`.: | ||
|
||
* `arch`: Architecture of the netboot.tar.gz to use as the source of pxeboot images, default is 'amd64'. | ||
|
||
* `version`: Ubuntu version of the netboot.tar.gz to use as the source of pxeboot images, default is 'lucid'. | ||
|
||
* `domain`: Default domain for nodes, default is none. | ||
|
||
* `run_list`: Default run list for nodes, default is none. | ||
|
||
* `bootstrap`: Optional additional bootstrapping configuration. | ||
|
||
`bootstrap_version_string`: for building specific version of Chef, default is none. | ||
|
||
`http_proxy`: HTTP proxy, default is none. | ||
|
||
`http_proxy_user`: HTTP proxy user, default is none. | ||
|
||
`http_proxy_pass`: HTTP proxy pass, default is none. | ||
|
||
`https_proxy`: HTTPS proxy, default is none. | ||
|
||
* `user`: | ||
|
||
* `user`: | ||
`crypted_password`: SHA512 password for the default user, default 'password'. This may be generated and added to the data bag. | ||
|
||
`fullname`: Full name of the default user, default 'Ubuntu'. | ||
|
||
`username`: Username of the default user, default 'ubuntu'. | ||
|
||
Templates | ||
========= | ||
|
||
syslinux.cfg.erb | ||
---------------- | ||
|
||
Sets the boot prompt to automatically run the installer. | ||
|
||
txt.cfg.erb | ||
----------- | ||
|
||
Sets the URL to the preseed file, architecture, the domain and which interfaces to use. | ||
|
||
preseed.cfg.erb | ||
--------------- | ||
The preseed file is full of opinions, you will want to update this. If there is a node providing an apt-cacher proxy via the `[apt::cacher]` recipe, it is provided in the preseed.cfg. The initial user and password is configured. The preseed finishes by calling the `chef-bootstrap` script. | ||
|
||
The preseed file is full of opinions, you will want to update this. If there is a node providing an apt-cacher proxy via `recipe[apt::cacher]`, it is provided in the preseed.cfg. The initial user and password is configured. The preseed finishes by calling the `chef-bootstrap` script. | ||
|
||
chef-bootstrap.sh.erb | ||
--------------------- | ||
|
||
This is the `preseed/late_command` that bootstraps the node with Chef via gems. | ||
|
||
Recipes | ||
|
@@ -86,11 +93,12 @@ Recipes | |
Default | ||
------- | ||
|
||
The default recipe passes through to `pxe_dust::server`. | ||
The default recipe includes recipe `pxe_dust::server`. | ||
|
||
Server | ||
------ | ||
The server includes the `apache2` and `tftp::server` recipes. | ||
|
||
`recipe[pxe_dust::server]` includes the `apache2` and `tftp::server` recipes. | ||
|
||
The recipe does the following: | ||
|
||
|
@@ -102,7 +110,8 @@ The recipe does the following: | |
|
||
Usage | ||
===== | ||
Add the `[pxe_dust::server]` recipe to the server's run_list. Create the `pxe_dust` data bag and update the `defaults.json` item before adding it. | ||
|
||
Add `recipe[pxe_dust::server]` to a node's or role's run list. Create the `pxe_dust` data bag and update the `defaults.json` item before adding it. | ||
|
||
On an Ubuntu system, the password can be generated by installing the `mkpasswd` package and running: | ||
|
||
|
@@ -118,11 +127,17 @@ Side note, for DD-WRT bootp support [this forum post was followed](http://www.dd | |
|
||
in the section `Additional DNSMasq Options` where the IP address is that of the tftpd server we're configuring here and pxelinux.0 is from the netboot tarball. | ||
|
||
Changes | ||
======= | ||
|
||
## v1.1.2: | ||
|
||
* Fixes COOK-481, COOK-594 | ||
|
||
License and Author | ||
================== | ||
|
||
Author:: Matt Ray <[email protected]> | ||
|
||
Author:: Joshua Timberman <[email protected]> | ||
|
||
Copyright:: 2011 Opscode, Inc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters