## Running Chef after bootstrap

When an image is bootstrapped, there're still some provisioning bits and pieces to manage, such as setting up hostname, /etc/hosts and all their occurrencies across different app-specific configurations (i.e. haproxy.cfg, nginx.conf, alfresco-global.properties, and so on)

On the other hand, when creating an immutable image that needs to be redistributed, you don't want to ship sensitive data, such as databags or cookbooks (if code is private).

For these reasons `img-basic::chef-client` recipe installs the latest version of Chef in the system and (optionally) copies cookbooks and databags used (by Packer) to build the image; this way, the server can run Chef without the need to locate code and data, as it's already inside the box.

To enable cookbook and databags copy (disabled by default), set the following attributes:
```
default['chef_client']['cookbook_path'] = '/etc/chef/cookbooks'
default['chef_client']['data_bag_path'] = '/etc/chef/data_bags'
```

## Defining a Chef node to run

You can register Chef runs using `commons::chef-client-run` and the following default attributes: run Chef
```
default['commons']['chef-client-cron']['cron_name'] = "my-chef-run"
default['commons']['chef-client-cron']['chef_json_cookbook'] = "my-wrapping-cookbook"
default['commons']['chef-client-cron']['chef_json_source'] = "chef-template/my-source-path"
```
