../_images/preview.png

Chef Integration

Definition and Scope

SCOPE_SCALR SCOPE_ACC SCOPE_ENV SCOPE_ROLE SCOPE_F_ROLE

Scalr provides a built-in integration with Chef allowing you to add servers built by Scalr to Chef for configuration management.

Find out more about Chef here: Chef Documentation NEWWIN

Adding a Chef Server

Chef servers can be added at the Scalr, Account, or Environment scope. To add a Chef server click on the Scalr icon on the top left MENU_ACC and click on Chef Servers. In the Chef Servers page, click on New Chef Server and you will be prompted for the following:

../_images/new_chef_servers.png
Field Description
URL The URL should look like: https://chef.server.host.name/organizations/${OrganizationName}/
Client Authorization Username Username in Chef
Client Authorization Key They key for the user above
Client Validator Authorization Username ${OrganizationName}-validator
Client Validator Authorization Key Organization Validation Key

Using Chef with Scalr

SCOPE_ROLE SCOPE_F_ROLE

To use Chef with Scalr, the images that you are building from must have the Chef Client installed on them.

Chef Bootstrapping can be added in two places:

  • The Role scope which would force the configuration on all servers built using that Role.
  • The Farm Role scope which would force the configuration on all servers built using that Farm Role.

Role Scope

If a Chef server is configured at the or above the scope for the Role, the tab will be available on the Role configuration screen. This option allows you to enable Chef Bootstrap for the Role and define either a Chef Server or Chef Solo Cookbook to be used. Within here you can add Chef Roles, Runlists, Cookbooks, and more. All Farm Roles that use this role will inherit the configuration. To add Chef to a role, you must click on the gear icon under Bootstrap Settings in the Roles page and enable Chef:

../_images/role_chef3.png

Then select Chef when the Configure Scalr Automation pop up appears:

../_images/role_chef4.png

Once that is enabled you will then be able to click on the Chef tab on the bottom left of the page which will bring up the pages below.

Chef Server:

CHEF1

Chef Solo:

CHEF2

Farm Role Scope

The Bootstrap config can also be added directly into a Farm Role if the Role allows for it. To do this, go into the Farm Role and click on Bootstrap with Chef. Within here you can add Chef Roles, Runlists, Cookbooks, and more.

../_images/farm_role_chef.png

Troubleshooting

If you need to troubleshoot any issues related to your Chef Cookbooks, all logs from the Chef Client are displayed in the Orchestration Logs tab in the Environment scope.