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 DNS with Route53


The DNS naming service is one of the core components of infrastructure management, and Amazon provides an excellent service to host and manage DNS zones. In this recipe, we will learn how to manage DNS in AWS using Salt modules.

How to do it...

  1. Create and edit /opt/ salt-cookbook/production/aws/dns.sls to have the following entries:

    cookbookcname:
        boto_route53.present:
            - name: cookbook.salt-cookbook.com.
            - value: cookbookelb-440144868.us-west- 2.elb.amazonaws.com.
            - zone: salt-cookbook.com.
            - ttl: 60
            - record_type: CNAME
            - region: us-west-2
            - keyid: <access-key>
            - key: '<secret-key>'
  2. Apply the state to the Salt master by running the following command:

    [root@salt-master ~]# salt 'salt-master' state.sls aws.dns saltenv=production
    salt-master:
    ----------
              ID: cookbookcname
        Function: boto_route53.present
            Name: cookbook.salt-cookbook.com.
          Result: True
         Comment...