My personal notes on installing the Chef server + WebUI on Debian Squeeze and be able to manage it from my local workstation running Mac OS. The official documentation is just TOO long and spread across different pages - having it all put together makes it easier to follow the next time around.
DISCLAIMER: If it works for me, does not mean it will work for you. You’ve been warned.
Good, with that out of the way, let’s get to the action.
Create own chef-repo
To work with Chef, a repository is the preferred method as it will nicely integrate with Knife cookbook commands.
1 2 3 4 5 6 7 8 9 10
Now that the repository is ready and available online (private or not doesn’t matter), we are ready to start the setup.
On the remote server
Install some required packages:
1 2 3 4 5 6 7 8 9 10 11
During the package installation, you will be prompted with 3 configuration questions. The URL for the WebUI (important to keep the port number) and a password for each, the AMQP and the WebUI.
Once the package installation is done, check that services are all running and listening to the correct ports:
This should show the following ports: 4000, 4040, 5984, 8983 and amqp.
It’s now time to configure the CLI client on the server:
The answers I gave:
To check that all is working, run
knife client list; which should return a list like this:
1 2 3
Ok! Half-way there. It’s now time to setup the local machine. But before switching to it, let’s create the client login/keys:
1 2 3
Verify the client was correctly created:
You are now ready to move to local (and probably never touch the server setup again).
On the local workstation
1 2 3 4 5 6 7
Like on the remote, this will prompt you with some questions. To which I answered:
To make sure it’s working and can connect to the server, run:
We’re done with the initial setup! It’s now time to start exploring and configuring environments, roles, nodes, cookbooks, etc.