O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required