Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
About the Author
About the Reviewer

Configuring the Salt cloud environment

Before learning the features of Salt cloud in detail, it is important to know about its core components and how they work with each other to provide the service. In this recipe, you will learn about the core components and configuration of the Salt cloud environment.

How to do it...

We will use Amazon EC2 to demonstrate the cloud capabilities of Salt. To configure a Salt master node in Amazon EC2, we will use a Virtual Private Cloud (VPC) in Amazon EC2.

  1. Create the following directories and files in the base configuration directory of Salt, that is, /etc/salt:


    • /etc/salt/cloud.providers.d

    • /etc/salt/cloud.profiles.d


    • /etc/salt/cloud

    • /etc/salt/cloud.providers

    • /etc/salt/cloud.profiles

    • /etc/salt/

  2. Edit /etc/salt/cloud to have the following entries:

    pool_size: 5
        environment: production
  3. Execute the following commands:

    [root@salt-master ~]# which salt-cloud