O'Reilly logo

Configuration Management with Chef-Solo by Naveed ur Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required