Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Configuration Management with Chef-Solo

You're reading from   Configuration Management with Chef-Solo A comprehensive guide to get you up and running with Chef-Solo.

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783982462
Length 116 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Naveed ur Rahman Naveed ur Rahman
Author Profile Icon Naveed ur Rahman
Naveed ur Rahman
Arrow right icon
View More author details
Toc

Roles


The term "role" is used to define certain patterns and processes of configuration on a single or several nodes. Imagine that if your application has high traffic and one server is not able to handle all requests, you might need another server to handle requests. You need Apache (or any other web server) across all nodes. In this case, you can create the role name Web Server, and it contains the run list of the Apache server with site configurations. Roles are defined in the same way as the normal recipes with run_list. Similarly, we can create a database role to set up a database server.

Tip

Note that the use of roles with the Chef server is controversial. It's fine to use them with Chef-Solo.

Let's have a look at some real-world examples.

Now, we will create a cookbook to set up a Python/Django app with Nginx and uWSGI. We will not explain each bit of code as we did in the previous example, assuming that now we have an understanding of the recipe structure and the important code blocks...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image