Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Salt Cookbook
  • Toc
  • feedback
Salt Cookbook

Salt Cookbook

By : Anirban Saha
3.5 (2)
close
Salt Cookbook

Salt Cookbook

3.5 (2)
By: Anirban Saha

Overview of this book

If you are a professional associated with system and infrastructure management, looking at automated infrastructure and deployments, then this book is for you. No prior experience of Salt is required.
Table of Contents (13 chapters)
close
12
Index

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/cloud.map.app, and edit it to have the following entries:

    cloudopen_ec2_prod_app_us-west-2a:
      - cookbookapp01
    
    cloudopen_ec2_prod_app_us-west-2b:
      - 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: 172.31.16.184
    Warning: Permanently added '172.31.16.184' (RSA) to the list of known hosts.
    [INFO    ] Rendering deploy script:...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete