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
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

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:

    Directories:

    • /etc/salt/cloud.providers.d

    • /etc/salt/cloud.profiles.d

    Files:

    • /etc/salt/cloud

    • /etc/salt/cloud.providers

    • /etc/salt/cloud.profiles

    • /etc/salt/cloud.map

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

    pool_size: 5
    minion:
        master: salt-master.teknification.com
        environment: production
  3. Execute the following commands:

    [root@salt-master ~]# which salt-cloud
    /usr/bin/salt-cloud
    
    [root@salt-master...