README.md in chake-0.9.1 vs README.md in chake-0.10
- old
+ new
@@ -75,28 +75,27 @@
host2.mycompany.com ssh
```
## Preparings nodes to be managed
-Nodes has very few requirements to be managed with `chake`:
+Nodes have very few initial requirements to be managed with `chake`:
- The node must be accessible via SSH.
-- The node must have `sudo` installed.
- The user you connect to the node must either be `root`, or be allowed to run
- `sudo`.
+ `sudo` (in which case `sudo` must be installed).
**A note on password prompts:** every time chake calls ssh on a node, you may
be required to type in your password; every time chake calls sudo on the node,
-you may be require to type in your password. For managaing one or two nodes
-this is probably fine, but for larger numbers it is not practical. To avoid
+you may be require to type in your password. For managing one or two nodes this
+is probably fine, but for larger numbers of nodes it is not practical. To avoid
password prompts, you can:
-- configure SSH key authentication.
- - this is more secure than using passwords, anyway.
- - bonus points: disable password authentication completely, and only allow
- key-based authentication
-- configure passwordless `sudo` access for your user on the server
+- Configure SSH key-based authentication. This is more secure than using passwords.
+ While you are at it, you also probably want disable password authentication
+ completely, and only allow key-based authentication
+- Configure passwordless `sudo` access for the user you use to connect to your
+ nodes.
## Applying cookbooks
To apply the configuration to all nodes, run
@@ -144,9 +143,28 @@
| port | port number to connect to | 22 |
| /path | where to store the cookbooks at the node | `/var/tmp/chef.$USERNAME` |
## Extra features
+
+### Hooks
+
+You can define rake tasks that will be executed before bootstrapping nodes,
+before uploading configuration management content to nodes, and before
+converging. To do this, you just need to enhance the corresponding tasks:
+
+* `bootstrap_common`: executed before bootstrapping nodes (even if nodes have
+ already been bootstrapped)
+* `upload_common`: executed before uploading content to the node
+* `converge_common`: executed before converging (i.e. running chef)
+
+Example:
+
+```
+task :bootstrap_common do
+ sh './scripts/pre-bootstrap-checks'
+end
+```
### Encrypted files
Any files ending matching `*.gpg` and `*.asc` will be decrypted with GnuPG
before being sent to the node. You can use them to store passwords and other