Skip to content
Newer
Older
100644 110 lines (73 sloc) 3.6 KB
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
1 Description
2 ===========
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
3
3242db9 @mattray added tftp cookbook support
mattray authored May 7, 2011
4 Configures a tftpd server for serving Ubuntu installers over PXE and setting them to run a provided preseed.cfg.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
5
6 Requirements
7 ============
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
8
3242db9 @mattray added tftp cookbook support
mattray authored May 7, 2011
9 Written and last tested with Chef 0.10.0 and Ubuntu 10.04.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
10
11 Attributes
12 ==========
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
13
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
14 Attributes under the `pxe_dust` namespace.
15
16 * `["pxe_dust"]["arch"]` - Architecture of the netboot.tar.gz to use as the source of pxeboot images.
17 * `["pxe_dust"]["version"]` - Ubuntu version of the netboot.tar.gz to use as the source of pxeboot images.
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
18 * `["pxe_dust"]["user"]["fullname"]` - Full name of the default user, default "Ubuntu".
19 * `["pxe_dust"]["user"]["username"]` - Username of the default user, default "ubuntu".
20 * `["pxe_dust"]["user"]["crypted_password"]` - SHA512 password for the default user, default nil. This must be generated and added as an attribute or you won't be able to login.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
21
22 Templates
23 =========
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
24
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
25 syslinux.cfg.erb
26 ----------------
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
27
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
28 Sets the boot prompt to automatically run the installer.
29
30 txt.cfg.erb
31 -----------
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
32
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
33 Sets the URL to the preseed file.
34
35 preseed.cfg.erb
36 ---------------
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
37
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
38 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.
39
40 Recipes
41 =======
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
42
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
43 Default
44 -------
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
45
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
46 The default recipe passes through to `pxe_dust::server`.
47
48 Server
49 ------
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
50
3242db9 @mattray added tftp cookbook support
mattray authored May 7, 2011
51 The server includes the `apache2` and `tftp::server` recipes.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
52
53 The recipe does the following:
54
55 1. Downloads the proper netboot.tar.gz to boot from.
3242db9 @mattray added tftp cookbook support
mattray authored May 7, 2011
56 2. Untars it to the `[:tftp][:directory]` directory.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
57 3. Instructs the installer prompt to automatically install.
58 4. Passes the URL of the preseed.cfg to the installer.
59 5. Uses the preseed.cfg template to pass in any `apt-cacher` proxies.
60
61 Usage
62 =====
63
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
64 Create a role, `pxe_server`.
65
66 name "pxe_server"
67 description "PXE Dust Boot Server"
68 run_list("recipe[pxe_dust::server]")
69 default_attributes(
70 "pxe_dust" => {
71 "user" => {
72 "username" => "ubuntu",
73 "fullname" => "Ubuntu",
74 "crypted_password" => "$6$Trby4Y5R$bi90k7uYY5ImXe5MWGFW9kel2BnMCcYO9EnwngTFIXKG2/nWcLKTJZ3verMFnpFbITI9.eHwZ.HR1UPeKbCAV1"
75 )
76
77 On an Ubuntu system, the password can be generated by installing the `mkpasswd` package and running:
78
79 mkpasswd -m sha-512
80
81 The example above is the hash of the password `ubuntu`, if you'd like to test. This attribute must be set to a valid sha-512 hash of the password or you will not be able to log in.
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
82
83 This cookbook does not provide DHCP or bootp to listen for PXE boot requests, this URL will have to be provided by another cookbook or manually. The author had to do this manually on a DD-WRT router.
84
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
85 Side note, for DD-WRT bootp support [this forum post was followed](http://www.dd-wrt.com/phpBB2/viewtopic.php?t=4662). The key syntax was
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
86
87 dhcp-boot=pxelinux.0,,192.168.1.147
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
88
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
89 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.
90
91 License and Author
92 ==================
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
93
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
94 Author:: Matt Ray <matt@opscode.com>
253e8ca @jtimberman set username, password as an attribute
jtimberman authored Mar 9, 2011
95 Author:: Joshua Timberman <joshua@opscode.com>
972a02a @mattray pxe_dust 1.0
mattray authored Mar 9, 2011
96
97 Copyright:: 2011 Opscode, Inc
98
99 Licensed under the Apache License, Version 2.0 (the "License");
100 you may not use this file except in compliance with the License.
101 You may obtain a copy of the License at
102
103 http://www.apache.org/licenses/LICENSE-2.0
104
105 Unless required by applicable law or agreed to in writing, software
106 distributed under the License is distributed on an "AS IS" BASIS,
107 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108 See the License for the specific language governing permissions and
109 limitations under the License.
Something went wrong with that request. Please try again.