Instant Chef Starter
Format: PDF / Kindle (mobi) / ePub
A practical guide to getting started with Chef, an indispensable tool for provisioning and managing your system's infrastructure
- Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
- Learn the core capabilities of Chef and how it integrates with your infrastructure
- Set up your own Chef server for managing your infrastructure
- Provision new servers with ease and develop your own recipes for use with Chef
As any systems administrator will tell you, managing one server can be challenging, let alone a dozen or more. With Chef, you can make managing dozens or even hundreds of servers manageable and learn how to configure and deploy new servers.
"Instant Chef Starter" is a hands-on guide to managing your infrastructure. You will learn the benefits of using Chef as well as how to install, configure, and use the set of tools provided. The book will also cover developing recipes for use with Chef to install software and maintain configurations so managing dozens of servers is no more difficult than managing one.
Learn how Chef fits into your infrastructure, install the software, build your own recipes, and provision servers with ease.
This book covers installing your own Chef server to manage your infrastructure and software configurations. Discover where you can find existing templates for managing software packages and operating systems and then learn to write your own. After you have done that, learn how to apply operations, execute scripts, and manage configurations across an entire network with only one command.
What you will learn from this book
- What Chef can provide you as a systems administrator
- Install your own Chef server
- Provision new servers programmatically
- Download and use existing recipes
- Build your own custom recipes
- Use data bags to describe complex infrastructure data
- Automate operations across an entire network or a subset of it
- Scale your infrastructure from a handful to hundreds of servers
Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks.This is a practical Starter guide which helps you gain the skills needed to learn Chef.
Who this book is written for
This book is aimed at developers and system administrators who are looking for ways to better manage complex infrastructures in a consistent fashion. No previous experience with Chef is assumed.
some recipes to the role. You will notice that in the recipes section there are more recipes than there are cookbooks, this is because each cookbook can contain multiple recipes. Here we will want to choose the following recipes by dragging them from the section titled Available Recipes into the section titled Default Run List: ÊÊ apache2 ÊÊ apache2::mod_php5 ÊÊ mysql::client ÊÊ mysql::server ÊÊ php::module_mysql Order is important here, the run list is executed in the order specified. Therefore,
the same task. As you become more comfortable with knife, you may never even visit the web management console again. 48 Instant Chef Starter If you edit the data and the JSON fails to validate, you will likely lose your changes. As a result, it may be wiser to use from file in place of create. This allows you to edit the file ahead of time and upload it. An easy way to do this is to create a new node, and save the skeleton JSON somewhere locally and then edit that, uploading it once you have
to make. Again this is a Ruby script that configures the services so any valid Ruby can be used (such as File.join to make things simpler). Starting the Chef services After you have the configuration file tailored to your system, you will need to start the services. Those can be started with the following commands: sudo chef-solr sudo chef-server -N -e production sudo chef-server-webui -p 4040 -e production You will likely want to figure out a way to get these to run at bootup, via init
API server chef-server 4000 Yes Web management console chef-server-webui 4040 Yes Data indexer chef-expander N/A N/A Solr java (running start.jar in the chef directory) 8983 No CouchDb beam.smp (erlang process) running couch 5984 No RabbitMQ beam.smp running rabbit 5672 No Public services need to be made open to any clients, nodes, or end users that expect to be using the Chef service. If any of these services are not running, you will need to consult the log files
take you through the process of using Chef to provision a new Ubuntu 12.10 server and set it up as a LAMP (Linux, Apache, MySQL, and PHP) server as this is a very simple and quite common server configuration at the moment. The basic steps will be as follows: 1. Setting up the server. 2. Downloading and examining cookbooks. 3. Uploading cookbooks into your Chef Server. 4. Creating and assigning roles to the node. 5. Completing the process by applying changes to the node. In order to provide