summaryrefslogtreecommitdiff
path: root/distro/common/man/man1/chef-shell.1
blob: df004c5b0f33876ec8159ce8e6e526953f4c2511 (plain)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
.\" Man page generated from reStructuredText.
.
.TH "CHEF-SHELL" "1" "Chef 12.0" "" "chef-shell"
.SH NAME
chef-shell \- The man page for the chef-shell command line tool.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
chef\-shell is a recipe debugging tool that allows the use of breakpoints within recipes. chef\-shell runs as an Interactive Ruby (IRb) session. chef\-shell supports both recipe and attribute file syntax, as well as interactive debugging features.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
chef\-shell is the new name for Shef as of Chef 11.x\&. chef\-shell is backwards compatible and aside from the name change, has the same set of functionality as with previous releases.
.UNINDENT
.UNINDENT
.sp
The chef\-shell executable is run as a command\-line tool.
.SH MODES
.sp
chef\-shell is tool that allows knife to be run using an Interactive Ruby (IRb) session. chef\-shell currently supports recipe and attribute file syntax, as well as interactive debugging features. chef\-shell has three run modes:
.TS
center;
|l|l|.
_
T{
Mode
T}	T{
Description
T}
_
T{
Standalone
T}	T{
No cookbooks are loaded, and the run list is empty. This mode is the default.
T}
_
T{
Solo
T}	T{
chef\-shell acts as a chef\-solo client. It attempts to load the chef\-solo configuration file and JSON attributes. If the JSON attributes set a run list, it will be honored. Cookbooks will be loaded in the same way that chef\-solo loads them. chef\-solo mode is activated with the \fB\-s\fP or \fB\-\-solo\fP command line option, and JSON attributes are specified in the same way as for chef\-solo, with \fB\-j /path/to/chef\-solo.json\fP\&.
T}
_
T{
Client
T}	T{
chef\-shell acts as a chef\-client\&. During startup, it reads the chef\-client configuration file and contacts the Chef server to get attributes and cookbooks. The run list will be set in the same way as normal chef\-client runs. chef\-client mode is activated with the \fB\-z\fP or \fB\-\-client\fP options. You can also specify the configuration file with \fB\-c CONFIG\fP and the server URL with \fB\-S SERVER_URL\fP\&.
T}
_
.TE
.SH OPTIONS
.sp
This command has the following syntax:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
chef\-shell OPTION VALUE OPTION VALUE ...
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This command has the following options:
.INDENT 0.0
.TP
.B \fB\-a\fP, \fB\-\-standalone\fP
Use to run chef\-shell in standalone mode.
.TP
.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP
The configuration file to use.
.TP
.B \fB\-h\fP, \fB\-\-help\fP
Shows help for the command.
.TP
.B \fB\-j PATH\fP, \fB\-\-json\-attributes PATH\fP
The path to a file that contains JSON data.
.sp
Use this option to define a \fBrun_list\fP object. For example, a JSON file similar to:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
"run_list": [
  "recipe[base]",
  "recipe[foo]",
  "recipe[bar]",
  "role[webserver]"
],
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
may be used by running \fBchef\-client \-j path/to/file.json\fP\&.
.sp
In certain situations this option may be used to update \fBnormal\fP attributes.
.sp
\fBWARNING:\fP
.INDENT 7.0
.INDENT 3.5
Any other attribute type that is contained in this JSON file will be treated as a \fBnormal\fP attribute. For example, attempting to update \fBoverride\fP attributes using the \fB\-j\fP option:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
  "name": "dev\-99",
  "description": "Install some stuff",
  "override_attributes": {
    "apptastic": {
      "enable_apptastic": "false",
      "apptastic_tier_name": "dev\-99.bomb.com"
    }
  }
}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will result in a node object similar to:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
  "name": "maybe\-dev\-99",
  "normal": {
  "name": "dev\-99",
    "description": "Install some stuff",
    "override_attributes": {
      "apptastic": {
        "enable_apptastic": "false",
        "apptastic_tier_name": "dev\-99.bomb.com"
      }
    }
  }
}
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.TP
.B \fB\-l LEVEL\fP, \fB\-\-log\-level LEVEL\fP
The level of logging that will be stored in a log file.
.TP
.B \fB\-s\fP, \fB\-\-solo\fP
Use to run chef\-shell in chef\-solo mode.
.TP
.B \fB\-S CHEF_SERVER_URL\fP, \fB\-\-server CHEF_SERVER_URL\fP
The URL for the Chef server\&.
.TP
.B \fB\-v\fP, \fB\-\-version\fP
The version of the chef\-client\&.
.TP
.B \fB\-z\fP, \fB\-\-client\fP
Use to run chef\-shell in chef\-client mode.
.UNINDENT
.SH AUTHOR
Chef
.\" Generated by docutils manpage writer.
.