Skip to content

Commit

Permalink
pxe_dust v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Nov 9, 2011
1 parent ac2e00b commit ad2dba1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
65 changes: 40 additions & 25 deletions pxe_dust/README.md
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",
},
Expand All @@ -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
Expand All @@ -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:

Expand All @@ -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:

Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions pxe_dust/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
license "Apache 2.0"
description "Configures installing operating systems with preseed and kickstart files via PXE booting."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.3"
version "1.1.2"
depends "apache2"
depends "tftp"

#tested with Ubuntu, assume Debian works similarly
%w{ ubuntu }.each do |os|
%w{ ubuntu debian }.each do |os|
supports os
end

0 comments on commit ad2dba1

Please sign in to comment.