Deploying Chef Client from start to finish using cloud-init
We can deploy Chef using the official omnibus installer through cloud-init. This installer embeds everything needed to deploy Chef and all its dependencies. We'll then configure the Chef client to authenticate securely against the Chef Server organization, and finally apply an initial set of cookbooks.
Note
Warning: The current cloud-init version shipped with Ubuntu 16.04 LTS and CentOS 7 is having issues installing Chef. This recipe is using Ubuntu 14.04 LTS waiting for the issue to be fixed.
Getting ready
To step through this recipe, you will need the following:
Access to a cloud-config enabled infrastructure
A working Chef Server and organization setup
How to do it…
Everything related to Chef with cloud-init is configured under the directive named chef
.
Deploying the Chef omnibus installer using cloud-init
As we want to use the official omnibus build (other choices are installing Chef through a Ruby gem—deprecated and too dependent on...