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

Deploying ElastiCache clusters


One more important feature in present day application management is caching services, and Amazon provides a service for this task called ElastiCache. In this recipe, we will learn how to configure ElastiCache using Salt modules.

How to do it...

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

    cookbook-elasticache:
      boto_elasticache.present:
        - engine: redis
        - cache_node_type: cache.t1.micro
        - num_cache_nodes: 1
        - notification_topic_arn: arn:aws:sns:us-west- 2:808429213833:salt-cookbook
        - 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 aws]# salt 'salt-master.teknification.com' state.sls aws.elasticache saltenv=production
    salt-master.teknification.com:
    ----------
              ID: cookbook-elasticache
        Function: boto_elasticache.present
          Result: True
         Comment:
         Started...