Skip to end of metadata
Go to start of metadata

Chef 11 Server Testing

This page documents testing releases of the Erchef powered Chef 11 Server.

 

NOTE: The new Chef server has been officially released as part of Chef 11! Stable builds are available on the Chef download page.

Know an Omnibus

Omnibus allows you to build self-contained full-stack software packages. We use Omnibus to to distribute the Chef Server bundled with its dependencies such as Erlang, Ruby, PostgreSQL, RabbitMQ, and Nginx. The result is a single package that can be installed on the target system and configured.

Omnibus packages separate the installation step from the configuration step. After an Omnibus package is installed, a configuration step must be run before the installed system can be used. In particular, this approach makes handling upgrades easier.

Configuring Chef Server

Chef Server is configured through the /etc/chef-server/chef-server.rb file. Standalone single-server configurations do not require custom configuration and can use the default values for everything.

See the chef-server.rb documentation page for configuration values.

 Applying Configuration Changes

The chef-server-ctl reconfigure command reads the /etc/chef-server/chef-server.rb file and applies the specified configuration to the system. Any time you make a change to your configuration, you need to run chef-server-ctl reconfigure to apply it.

chef-server-ctl

Omnibus-based Chef Server installs have a command line utility, `chef-server-ctl`, which is used to operate the Chef Server. For example, you can use `chef-server-ctl` to start and stop individual services, reconfigure the entire server, and tail server log files.

chef-server-ctl commands are documented below:

CommandAction
helpPrint a list of all the available chef-server-ctl commands.
statusShows the status of the Chef Server services.
startStart all the enabled Chef Server services.
stopStop all the enabled Chef Server services.
restartRestart all the enabled chef server services.
tailFollow the Chef Server logs for all services.
testExecutes, chef-pedant, the integration test suite against the Chef Server installation. By default only a subset of tests are run, add the --all flag to run the full test suite.
reconfigureRead values in /etc/chef-server/chef-server.rb and apply configuration to underlying system.

The status, start, stop, restart, and tail commands can optionally be applied to a single service by adding the service name to the end of the command line. For example, to get the status of the erchef component of Chef Server, you can run:

Supported Platforms

Chef Server Omnibus packages are built for the following platforms:

  • CentOS 5 64-bit
  • CentOS 6 64-bit
  • Ubuntu 10.04, 10.10 64-bit
  • Ubuntu 11.04, 11.10 64-bit
  • Ubuntu 12.04, 12.10 64-bit

Chef 11 Server Omnibus packages are built nightly across all supported platforms and published to S3.

Quick Start

Updated documentation for obtaining Chef Server packages is available here: http://docs.opscode.com/api_omnitruck.html

Acquire Installation Package

You can quickly download a platform-appropriate package from the Omnitruck web service.  Omnitruck download-server URLs use the following format:

http://www.opscode.com/chef/download-server?p=$PLATFORM&pv=$PLATFORM_VERSION&m=$MACHINE_ARCH&v=latest&prerelease=true&nightlies=true

Based on the query parameters provided you will be redirected to the appropriate package file.

ParameterDescriptionValid ValuesDefault Value
pThis platform. CentOS should use a platform of el.ubuntu, el 
pvThe platform version. For CentOS only include the major version (ie 6 not 6.3).

Ubuntu: 10.04, 10.10, 11.04, 11.10, 12.04, 12.10

CentOS: 5, 6

 
mThe architecture the package was built for.

64-bit: x86_64

 
v

This is the version of Chef Server you want to install. The Chef Server packages use SemVer 2.0.0-rc.1 compliant versioning so all of the following are valid versions:

11.0.0
11.0.0-rc.1
11.0.0-alpha.3+20130124075141.git.37.d143b92 

If you don't provide this value you will just get the latest version.

latest,latest
prereleaseThis indicates you would like to include prerelease versions in your query.true, falsefalse
nightliesThis indicates you would like to include nightly versions in your query.true, falsefalse

Until Chef 11 Server has been officially released it is recommend to always query for the latest prerelease nightly package (ie &v=latest&prerelease=true&nightlies=true)

Install Package

Ubuntu

Installing packages on Ubuntu takes two steps (you can blame dpkg):

CentOS

Installation on EL systems is even easier since RPM can install packages directly from a URL:

Configure Installation

As documented above perform initial configuration of the Chef Server installation by executing the chef-server-ctl reconfigure with sudo or as root.


Chef 11 Server cookbook

The easiest way to retrieve the appropriate alpha build for your system is to use the recently updated chef-server cookbook.

The default recipe in this cookbook:

  1. Retrieves and installs the appropriate platform-specific chef-server Omnibus package.
  2. Creates the initial /etc/chef-server/chef-server.rb file.
  3. Performs initial system configuration via chef-server-ctl reconfigure.

Omnibus package selection is done based on the following logic:

If a value has been provided, the chef-server Omnibus package is fetched from node['chef-server']['package_file']
If node['chef-server']['package_file'] is unset (ie nil or empty string), the candidate package is retrieved from the Omnitruck REST API based on node['chef-server']['version'] AND the node platform, platform_version and architecture. By default the latest package is installed.

Vagrant-based Self Contained Demo Environment

The easiest way to take Chef 11 Server for a spin is using the Berksfile and Vagrantfile that ship in the chef-server cookbook. The only requirements for standing up a virtualized Chef Server are Ruby (>= 1.9.1), Rubygems (>= 1.3.6), and VirtualBox:

If you need help installing any of the prerequisites take a look at Jamie Winsor's excellent blog post on the subject.

You can easily SSH into the running VM using the vagrant ssh command. The VM can easily be stopped and deleted with the vagrant destroy command. Please see the official Vagrant documentation for a more in depth explanation of available commands.

The running Chef-Server components are accessible from the host machine using the following URLs:

Reporting Issues

If you find a bug in a Chef 11 Server Alpha, please open a ticket in tickets.opscode.com with the following fields set so that it can be found and addressed before release:

Project: Chef
Component: Chef Server
Affects Versions: Set to the version installed

Known Issues

  1. knife client reregister does not work with Chef 10.16.x and lower. Upgrade to 10.18.0+ or delete and recreate the client.
  2. There are reports that bookshelf (cookbook file storage service) may forget uploaded files. There is no consistent repro case. Fixed! See CHEF-3716
Labels
  • None