Running Chef Server on Ubuntu 16

Since I have established a working software-VPN solution to connect to my AWS VPC, an internal-only configuration management system can now be implemented. The chosen system is Chef. This means my chef server is not available to the public, and can be only accessed via VPN.

Below will summarize the commands to get a Chef Server up and running. For more information, read Chef’s article: https://docs.chef.io/install_server.html, and credit goes to Chef.

Pre-requisites

– Have a running Ubuntu EC2 (t2.medium is a good choice)

– Appropriate Security Group rules (port 22, 443)

– Set a hostname on the EC2, and its best that it be the FQDN of what it will be in DNS, if      used.

Commands

Commands below are exactly what was run on the ubuntu server as root (Chef expects its package(s) to be installed this way, otherwise it will complain).

 

1. Download chef server core package for Ubuntu OS: “wget https://packages.chef.io/files/stable/chef-server/12.17.15/ubuntu/16.04/chef-server-core_12.17.15-1_amd64.deb”

2. Install package: “dpkg -i chef-server-core_12.17.15-1_amd64.deb”

3. Get backend services up and running: “chef-server-ctl reconfigure” This process took about 4mins 15secs.

4. Create hidden chef directory to place chef-related files: “mkdir -p .chef”

5. Create admin user: “chef-server-ctl user-create admin Admin User admin@xyz.net ‘{password}’ –filename /root/.chef/chef.pem” Of course, password purposely not provided.

6. Create an organization and associate user created in step #5: “chef-server-ctl org-create esn ‘MyXingfu Net’ –association_user admin –filename /root/.chef/esn-validator.pem”

At this point, you have a working chef server running on Ubuntu 16, but there is no web UI. I like using the UI and installed the frontend for Chef Server, called Chef Manage, in three steps:

1. chef-server-ctl install chef-manage

2. chef-server-ctl reconfigure

3. chef-manage-ctl reconfigure –accept-license

Chef Server WebUI: https://<Private-IP or FQDN>; login with created user.

I also like Chef’s reporting mechanism, so installed that package as well:

1. chef-server-ctl install opscode-reporting

2. chef-server-ctl reconfigure

3. opscode-reporting-ctl reconfigure –accept-license

Login to chef server UI and click on “Reporting” tab.

Leave a comment