1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "CHEF\-SOLO" "8" "October 2013" "Chef 11.10.0.alpha.0" "Chef Manual"
.
.SH "NAME"
\fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\.
.
.SH "SYNOPSIS"
\fBchef\-solo\fR \fI(options)\fR
.
.TP
\fB\-c\fR, \fB\-\-config CONFIG\fR
The configuration file to use
.
.TP
\fB\-d\fR, \fB\-\-daemonize\fR
Daemonize the process
.
.TP
\fB\-g\fR, \fB\-\-group GROUP\fR
Group to set privilege to
.
.TP
\fB\-i\fR, \fB\-\-interval SECONDS\fR
Run chef\-client periodically, in seconds
.
.TP
\fB\-j\fR, \fB\-\-json\-attributes JSON_ATTRIBS\fR
Load attributes from a JSON file or URL
.
.TP
\fB\-l\fR, \fB\-\-log_level LEVEL\fR
Set the log level (debug, info, warn, error, fatal)
.
.TP
\fB\-L\fR, \fB\-\-logfile LOGLOCATION\fR
Set the log file location, defaults to STDOUT \- recommended for daemonizing
.
.TP
\fB\-N\fR, \fB\-\-node\-name NODE_NAME\fR
The node name for this client
.
.TP
\fB\-r\fR, \fB\-\-recipe\-url RECIPE_URL\fR
Pull down a remote gzipped tarball of recipes and untar it to the cookbook cache\.
.
.TP
\fB\-s\fR, \fB\-\-splay SECONDS\fR
The splay time for running at intervals, in seconds
.
.TP
\fB\-u\fR, \fB\-\-user USER\fR
User to set privilege to
.
.TP
\fB\-v\fR, \fB\-\-version\fR
Show chef version
.
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.
.SH "DESCRIPTION"
Chef Solo allows you to run Chef Cookbooks in the absence of a Chef Server\. To do this, the complete cookbook needs to be present on disk\.
.
.P
By default Chef Solo will look in /etc/chef/solo\.rb for its configuration\. This configuration file has two required variables: file_cache_path and cookbook_path\.
.
.P
For example: file_cache_path "/var/chef\-solo" cookbook_path "/var/chef\-solo/cookbooks"
.
.P
For your own systems, you can change this to reflect any directory you like, but you\'ll need to specify absolute paths and the cookbook_path directory should be a subdirectory of the file_cache_path\.
.
.P
You can also specify cookbook_path as an array, passing multiple locations to search for cookbooks\.
.
.P
For example: file_cache_path "/var/chef\-solo" cookbook_path ["/var/chef\-solo/cookbooks", "/var/chef\-solo/site\-cookbooks"]
.
.P
Note that earlier entries are now overridden by later ones\.
.
.P
Since chef\-solo doesn\'t have any interaction with a Chef Server, you\'ll need to specify node\-specifc attributes in a JSON file\. This can be located on the target system itself, or it can be stored on a remote server such as S3, or a web server on your network\.
.
.P
Within the JSON file, you\'ll also specify the recipes that Chef should run in the "run_list"\. An example JSON file, which sets a resolv\.conf:
.
.IP "" 4
.
.nf
{
"resolver": {
"nameservers": [ "10\.0\.0\.1" ],
"search":"int\.example\.com"
},
"run_list": [ "recipe[resolver]" ]
}
.
.fi
.
.IP "" 0
.
.P
Then you can run chef\-solo with \-j to specify the JSON file\. It will look for cookbooks in the cookbook_path configured in the configuration file, and apply attributes and use the run_list from the JSON file specified\.
.
.P
You can use \-c to specify the path to the configuration file (if you don\'t want chef\-solo to use the default)\. You can also specify \-r for a cookbook tarball\.
.
.P
For example: chef\-solo \-c ~/solo\.rb \-j ~/node\.json \-r http://www\.example\.com/chef\-solo\.tar\.gz
.
.P
In the above case, chef\-solo would extract the tarball to your specified cookbook_path, use ~/solo\.rb as the configuration file, and apply attributes and use the run_list from ~/node\.json\.
.
.SH "SEE ALSO"
Full documentation for Chef and chef\-solo is located on the Chef wiki, http://wiki\.opscode\.com/display/chef/Home\.
.
.SH "AUTHOR"
Chef was written by Adam Jacob \fIadam@ospcode\.com\fR of Opscode (http://www\.opscode\.com), with contributions from the community\. This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR with help2man\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
.
.P
On Debian systems, the complete text of the Apache 2\.0 License can be found in /usr/share/common\-licenses/Apache\-2\.0\.
|