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

Launching, querying, and destroying instances

Once all our configurations are done, it is time to actually use them and launch the instances. In this recipe, you will learn how to launch, query, and destroy instances.

How to do it...

  1. Create a new file /etc/salt/, and edit it to have the following entries:

      - cookbookapp01
      - cookbookapp02
  2. Execute the following command to launch an instance without using the map file:

    [root@salt-master ~]# salt-cloud -p cookbook_ec2_prod_db cookbookdb08
    [INFO    ] salt-cloud starting
    [INFO    ] Creating Cloud VM cookbookdb08 in us-west-2
    [INFO    ] Attempting to look up root device name for image id ami-721b7b42 on VM cookbookdb08
    [INFO    ] Found root device name: /dev/sda1
    [INFO    ] Created node cookbookdb08
    [INFO    ] Salt node data. Private_ip:
    Warning: Permanently added '' (RSA) to the list of known hosts.
    [INFO    ] Rendering deploy script:...