You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 13518e8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: application/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,9 @@ Using the node's `run_state` that contains the current application in the search
58
58
59
59
This recipe can be used on nodes that are going to run the application, or on nodes that need to have the application code checkout available such as supporting utility nodes or a configured load balancer that needs static assets stored in the application repository.
60
60
61
+
For Gem Bundler: include `bundler` or `bundler08` in the gems list. `bundle install` or `gem bundle` will be run before migrations.
62
+
For config.gem in environment: `rake gems:install RAILS_ENV=<node environment>` will be run when a Gem Bundler command is not.
63
+
61
64
unicorn
62
65
-------
63
66
@@ -133,7 +136,7 @@ Note about gems and packages, the version is optional. If specified, the version
133
136
"production": "true or false boolean to force migration, see rails.rb recipe"
Copy file name to clipboardExpand all lines: chef/README.md
+91-48Lines changed: 91 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,21 @@ This cookbook is used to configure the system to be a Chef Client or a Chef Serv
21
21
REQUIREMENTS
22
22
============
23
23
24
-
Chef 0.8.x or higher is required.
24
+
Chef 0.8.16 or later is required.
25
+
26
+
Chef 0.9.0 or later is required to use the `chef.init_style` attribute value `init`, in order to have the init scripts available.
25
27
26
28
Platform
27
29
--------
28
30
29
-
If using this cookbook to manage a Chef Server system that was installed from Debian/Ubuntu packages, note that the configuration files are split up for server.rb, solr.rb and webui.rb, and the `chef::server` recipe may not work as desired.
31
+
If using this cookbook to manage a Chef Server system that was installed from Debian/Ubuntu packages, note that in the packages, the configuration files are split up for server.rb, solr.rb and webui.rb, and the `chef::server` recipe may not work as desired.
32
+
33
+
We recommend using a recent version of Ubuntu or Debian for the Chef Server.
34
+
35
+
* Ubuntu 9.10/10.04
36
+
* Debian testing/unstable
37
+
38
+
These versions have newer versions of CouchDB and RabbitMQ packaged.
30
39
31
40
`chef::client` is tested on Ubuntu 8.04+, Debian 5.0, CentOS 5.x, Fedora 10+, OpenBSD 4.6, FreeBSD 7.1 and Gentoo.
32
41
@@ -44,14 +53,14 @@ Client
44
53
Server
45
54
------
46
55
47
-
The `chef::bootstrap_server` recipe uses the following other cookbooks from the Opscode repo.
56
+
The `chef::bootstrap_server` recipe uses the following other cookbooks from the Opscode repository.
48
57
49
-
couchdb
50
-
rabbitmq_chef
51
-
openssl
52
-
zlib
53
-
xml
54
-
java
58
+
* couchdb
59
+
*`rabbitmq_chef`
60
+
* openssl
61
+
* zlib
62
+
* xml
63
+
* java
55
64
56
65
The `chef::server_proxy` recipe uses the following cookbook:
57
66
@@ -62,6 +71,8 @@ ATTRIBUTES
62
71
63
72
The attributes for configuring the `chef` cookbook are under the `chef` namespace on the node, i.e., `@node[:chef]` or `@node.chef`.
64
73
74
+
When using the bootstrap recipe, set the desired attributes using a JSON file. See "BOOTSTRAPPING" for examples.
75
+
65
76
umask
66
77
-----
67
78
@@ -77,9 +88,13 @@ By default the only URL config setting for Chef 0.8.x+ is `Chef::Config[:chef_se
77
88
init_style
78
89
----------
79
90
80
-
Specifies the init style to use. Default `runit`. Other possible values `init`, `bsd`, any other string will be treated as unknown.
91
+
Specifies the init style to use. Default `runit`. Other possible values `init`, `bsd`, any other string will be treated as unknown and a message will be displayed during the Chef run.
92
+
93
+
If your platform doesn't have a `runit` package or if the cookbook doesn't detect it, but you still want to use runit, set `init_style` to `none` and install runit separately. You may need to configure the runit services separately.
81
94
82
-
If your platform doesn't have a `runit` package or if the cookbook doesn't detect it, but you still want to use runit, set `init_style` to `none` and install runit separately.
95
+
Using the `init` value for this attribute will retrieve the init scripts that are distributed with the Chef gem.
96
+
97
+
This cookbook does not yet support Upstart for Ubuntu/Debian, but that is planned for a future release, and will be specified via this attribute.
83
98
84
99
path
85
100
----
@@ -104,7 +119,7 @@ If `init_style` is `init`, this is used, and should match what the init script i
104
119
cache_path
105
120
----------
106
121
107
-
Location where the client will cache cookbooks and other data. Default is `cache` underneath the `chef[:path]` location. Linux distributions might prefer `/var/cache/chef` instead.
122
+
Location where the client will cache cookbooks and other data. Default is `cache` underneath the `chef[:path]` location. Linux distributions adhering to the FHS prefer `/var/cache/chef` instead.
108
123
109
124
Base directory for data that is easily regenerated such as cookbook tarballs (`Chef::Config[:cookbook_tarballs]`) on the server, downloaded cookbooks on the client, etc. See the config templates.
110
125
@@ -116,12 +131,12 @@ Used by the Chef server as the base location to "serve" cookbooks, roles and oth
116
131
server_version
117
132
--------------
118
133
119
-
Version of Chef to install for the server. Used by the `server_proxy` recipe to set the location of the DocumentRoot of the WebUI.
134
+
Version of Chef to install for the server. Used by the `server_proxy` recipe to set the location of the DocumentRoot of the WebUI. Automatically determined via ohai's `chef_packages[:chef][:version]` by default.
120
135
121
136
client_version
122
137
--------------
123
138
124
-
Version of Chef to install for the client. Used to display a log message about the location of the init scripts when `init_style` is `init`, and can be used to upgrade `chef` gem with the `chef::bootstrap_client` recipe.
139
+
Version of Chef to install for the client. Used to display a log message about the location of the init scripts when `init_style` is `init`, and can be used to upgrade `chef` gem with the `chef::bootstrap_client` recipe. Automatically determined via ohai's `chef_packages[:chef][:version]` by default.
125
140
126
141
client_interval
127
142
---------------
@@ -136,14 +151,12 @@ Splay interval to randomly add to interval. Default `20`.
136
151
log_dir
137
152
-------
138
153
139
-
Directory where logs are stored if logs are not sent to STDOUT. Systems using runit should send logs to STDOUT as runit manages log output. Default STDOUT when `init_style` is `runit`, otherwise the default is `/var/log/chef`.
154
+
When `init_style` is `init`, this directory needs to be created. The default is `/var/log/chef`.
140
155
141
156
client_log, indexer_log, server_log
142
157
-----------------------------------
143
158
144
-
Location of the client, indexer and server logs, respectively. Default `STDOUT` on systems with runit, `/var/log/chef/{client,indexer,server}.log` on other systems.
145
-
146
-
Note that `chef-indexer` is deprecated for `chef-solr-indexer`.
159
+
These options are deprecated to reduce complexity and potential confusion.
147
160
148
161
server_port
149
162
-----------
@@ -160,12 +173,6 @@ webui_enabled
160
173
161
174
As of version 0.8.x+, the WebUI part of the Chef Server is optional, and disabled by default. To enable it, set this to true.
162
175
163
-
webui_admin_password
164
-
--------------------
165
-
166
-
The default password in the `Chef::Config` is `p@ssw0rd1`, which may not be desirable. Change the webui `admin` user's password with this attribute. Note that this may require the `chef-server-webui` service be restarted an additional time, and it should still be changed on first login with the `admin` user.
167
-
168
-
169
176
server_fqdn
170
177
-----------
171
178
@@ -175,6 +182,21 @@ On servers, this specifies the URL the server expects to use by default `Chef::C
175
182
176
183
On clients, this specifies the URL the client uses to connect to the server as `Chef::Config[:chef_server_url]`.
177
184
185
+
server_url
186
+
----------
187
+
188
+
Full URI for the Chef Server. Used for `chef_server_url` config setting. The default value combines the attributes `chef.url_type`, `chef.server_fqdn` and `chef.server_port`, creating for example "http://chef.example.com:4000". If you are using the Opscode Platform, set this to "https://api.opscode.com/organizations/ORGNAME", where ORGNAME is your organization's simple string name.
189
+
190
+
SERVER PROXY
191
+
------------
192
+
193
+
The following attributes are used by the `server_proxy.rb` recipe, and are stored in the `server_proxy.rb` attributes file.
194
+
195
+
doc_root
196
+
--------
197
+
198
+
DocumentRoot for the WebUI. Also gets set in the vhost for the API, but it is not used since the vhost merely proxies to the server on port 4000.
199
+
178
200
server_ssl_req
179
201
--------------
180
202
@@ -188,11 +210,30 @@ Used by the `server_proxy` recipe, this attribute can be used to set up a self-s
188
210
* CN: canonical name, usually the fully qualified domain name of the server (FQDN)
189
211
* emailAddress: contact email address
190
212
213
+
This attribute is now in the `server_proxy.rb` attributes file, as it is specific to that context.
214
+
215
+
server_proxy.css_expire_hours
216
+
-----------------------------
217
+
218
+
Sets expiration time for CSS in the WebUI.
219
+
220
+
server_proxy.js_expire_hours
221
+
----------------------------
222
+
223
+
Sets expiration time for JavaScript in the WebUI.
224
+
191
225
RECIPES AND USAGE
192
226
=================
193
227
194
228
This section describes the recipes in the cookbook and how to use them in your environment.
195
229
230
+
BOOTSTRAPPING
231
+
-------------
232
+
233
+
The first two recipes described are for "bootstrapping" a system to be a Chef Client or Chef Server, respectively. Only use these recipes with RubyGems installations of Chef.
234
+
235
+
These recipes are typically used with chef-solo using a JSON file of attributes and a run list, and a solo config file. For more information see [Bootstrap Chef RubyGems Installation](http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation) on the Chef Wiki.
236
+
196
237
bootstrap_client
197
238
----------------
198
239
@@ -205,20 +246,25 @@ Use this recipe to "bootstrap" a client so it can connect to a Chef Server. This
205
246
* Sets up some directories for Chef to use.
206
247
* Creates the client configuration file `/etc/chef/client.rb` based on the configuration passed via JSON.
207
248
208
-
Minimal JSON to use for the client configuration:
249
+
For configuring a new client to connect to the Opscode Platform:
This recipe is typically used with chef-solo. For more information see [Bootstrap Chef RubyGems Installation](http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation)
258
+
For configuring a new client to connect to a local Chef Server:
259
+
260
+
{
261
+
"chef": {
262
+
"server_url": "http://chef.example.com:4000"
263
+
},
264
+
"run_list": "recipe[chef::bootstrap_client]"
265
+
}
266
+
267
+
This is the minimal JSON to use for the client configuration. See the ATTRIBUTES section above for more options.
222
268
223
269
bootstrap_server
224
270
----------------
@@ -232,20 +278,15 @@ Use this recipe to "bootstrap" a system to become a Chef Server. This recipe doe
232
278
* Installs Java for the `chef-solr` search engine.
233
279
* Installs RabbitMQ (`rabbitmq_chef` cookbook) for the `chef-solr-indexer` consumer.
234
280
* Installs all the Server-related Gems.
235
-
* Creates the server configuration file `/etc/chef/server.rb` based on the configuration passed via JSON.
281
+
* Creates the server configuration file `/etc/chef/server.rb` based on the configuration passed via JSON.
236
282
* Sets up some directories for the server to use.
237
283
* Sets up the `chef-server`, `chef-solr`, `chef-solr-indexer` services depending on the `init_style` attribute (see above).
@@ -254,27 +295,27 @@ Note that the `chef-server-webui` is optional and can be enabled if desired by a
254
295
255
296
"webui_enabled": true
256
297
257
-
See above about the `webui_admin_password` to use something other than the `Chef::Config` default.
258
-
259
-
This recipe is typically used with chef-solo. For more information see [Bootstrap Chef RubyGems Installation](http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation)
260
-
261
298
client
262
299
------
263
300
264
301
The client recipe is used to manage the configuration of an already-installed and configured Chef client. It can be used after a RubyGems installation bootstrap (per above), or with clients that were installed from platform packaging.
265
302
266
-
The recipe itself manages the `/etc/chef/client.rb` config file based on the attributes in this cookbook. When the client config is updated, the recipe will also reread the configuration during the Chef run, so the way Chef runs can be dynamically changed.
303
+
The recipe itself manages the `/etc/chef/client.rb` config file based on the attributes in this cookbook. When the client config is updated, the recipe will also reread the configuration during the Chef run, so the current Chef run can be dynamically changed.
304
+
305
+
This recipe does not manage the `chef-client` service. It is assumed to have been set up and started from the `bootstrap_client` recipe above, or from OS / distribution packaging. The `chef-client` service should not be restarted as a result of `/etc/chef/client.rb` changing, as that can cause the current process running the client to be restarted, having unpredictable results.
267
306
268
307
default
269
308
-------
270
309
271
-
There is no spoon.
310
+
There is no spoon :-).
272
311
273
312
delete_validation
274
313
-----------------
275
314
276
315
This is a standalone recipe that merely deletes the validation certificate (default `/etc/chef/validation.pem`). Use this if managing the client config file is not required in your environment.
277
316
317
+
Beware if using this on your Chef Server. First copy the validation.pem certificate file to another location, such as your knife configuration directory (`~/.chef`) or [Chef Repository](http://wiki.opscode.com/display/chef/Chef+Repository).
318
+
278
319
server
279
320
------
280
321
@@ -291,12 +332,14 @@ The following services are managed:
291
332
292
333
Changes to the `/etc/chef/server.rb` will trigger a restart of these services.
293
334
294
-
Since the Chef Server itself typically runs the CouchDB service for the data store, the recipe will do a compaction on the Chef database and all the views associated with the Chef Server. These compactions only occur if the database/view size is more than 100Mb. It will use the configured CouchDB URL, which is `http://localhost:5984` by default.
335
+
Since the Chef Server itself typically runs the CouchDB service for the data store, the recipe will do a compaction on the Chef database and all the views associated with the Chef Server. These compactions only occur if the database/view size is more than 100Mb. It will use the configured CouchDB URL, which is `http://localhost:5984` by default. The actual value used for the CouchDB server is from the `Chef::Config[:couchdb_url]`, so this can be dynamically changed.
295
336
296
337
server_proxy
297
338
------------
298
339
299
-
Sets up an Apache2 VirtualHost to proxy HTTPS for the Chef Server API and WebUI.
340
+
This recipe sets up an Apache2 VirtualHost to proxy HTTPS for the Chef Server API and WebUI.
341
+
342
+
The API will be proxied on port 443. If the `chef-serer-webui` is installed, it will be proxied on port 444. The recipe dynamically creates the OpenSSL certificate based on the `chef.server_ssl_req` attribute. It uses some additional configuration for Apache to improve performance of the webui. The virtual host template is `chef_server.conf.erb`. The DocumentRoot setting is used for the WebUI, but not the API, and is set with the attribute `chef.doc_root`.
0 commit comments