| title: | Configure a Chef Server for Deis |
|---|---|
| description: | Guide to setting up a Chef Server for use with Deis |
| keywords: | tutorial, guide, walkthrough, howto, deis, sysadmins, operations, chef, chef server |
The first step in installing Deis is configuring a Chef Server. Deis relies heavily on Chef Server to provide a battle-tested foundation for:
- Hosting cookbooks used to configure Deis :ref:`Nodes <node>`
- Hosting data bags used to store global cluster configuration
Sign up for a free Hosted Chef account if you don't have a Chef Server.
The specific cookbook versions required for each Deis release reside in the project's
Berksfile. Use git to checkout the source code.
$ git clone https://github.com/opdemand/deis.git
$ cd deisCloning the default master branch will provide you with the latest development
version of Deis. If you instead want to deploy the latest stable release,
checkout the most recent tag using git checkout v0.3.0, for example.
You'll need a basic Ruby environment that allows the installation of
RubyGems like knife and berkshelf.
From the Deis checkout directory:
$ gem install bundler # install the bundler tool (if necessary)
$ bundle install # install ruby dependencies from GemfileIn order to communicate with the Chef Server, your knife.rb must be configured properly. You can test this with:
$ knife client list
gabrtv-validatorYou should see at least the validator key for your Chef organization. If not, your knife.rb configuration or Chef keys are probably incorrect.
Deis uses the wonderful Berkshelf utility to manage cookbooks.
The berks command should have been installed during bundle install.
To update Deis cookbooks using Berkshelf:
$ berks install # install cookbooks to your local berkshelf
$ berks upload # upload berkshelf cookbooks to the chef serverDeis uses three data bags on the Chef Server for storing global state used during chef-client runs:
- deis-users
- deis-formations
- deis-apps
Use knife to create these data bags on the Chef Server:
$ knife data bag create deis-users
Created data_bag[deis-users]
$ knife data bag create deis-formations
Created data_bag[deis-formations]
$ knife data bag create deis-apps
Created data_bag[deis-apps]