Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gordonbondon/choregraphie-dynamodb-lock
Development repository for Choregraphie DynamoDB Lock Cookbook
https://github.com/gordonbondon/choregraphie-dynamodb-lock
chef chef-cookbook dynamodb orchestration
Last synced: 10 days ago
JSON representation
Development repository for Choregraphie DynamoDB Lock Cookbook
- Host: GitHub
- URL: https://github.com/gordonbondon/choregraphie-dynamodb-lock
- Owner: gordonbondon
- License: mit
- Created: 2018-07-22T19:09:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T10:40:08.000Z (about 6 years ago)
- Last Synced: 2024-12-16T02:03:56.559Z (16 days ago)
- Topics: chef, chef-cookbook, dynamodb, orchestration
- Language: Ruby
- Homepage: https://supermarket.chef.io/cookbooks/choregraphie_dynamodb_lock
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# choregraphie_dynamodb_lock Cookbook
[![Build Status](https://travis-ci.org/gordonbondon/choregraphie-dynamodb-lock.svg?branch=master)](https://travis-ci.org/gordonbondon/choregraphie-dynamodb-lock) [![Cookbook Version](https://img.shields.io/cookbook/v/choregraphie_dynamodb_lock.svg)](https://supermarket.chef.io/cookbooks/choregraphie_dynamodb_lock)
This cookbook provides AWS DynamoDB lock primitive for [choregraphie](https://github.com/criteo-cookbooks/choregraphie) cookbook
## Usage
Check choregraphie [documentation](https://github.com/criteo-cookbooks/choregraphie/blob/master/README.md) on how to use primitives in chef recipes.
### Primitive attributes
`:table` - (Required) name of a table to use
`:hash_key` - (Required) DynamoDB table hash key name
`:id` - (Required) unique id for lock name
`:create_table` - (Optional) create DynamoDB table if it's missing. Default: `false`
`:ttl` - (Optional) TTL for lock before it expires, in seconds. Default: `30`
`:expires_key` - (Optional) Name of TTL attribute in table . Default: `Expires`Example:
```ruby
dynamodb_lock(table: 'LockTable', hash_key: 'id', id: 'my_node', ttl: 600)
```### AWS Configuration
Block can be used to provide specific [AWS Config](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/index.html#Configuration_Options):
```ruby
...
dynamodb_lock(table: 'LockTable', hash_key: 'id', id: 'my_node') do
require 'aws-sdk-dynamodb'
Aws.config.update({
region: 'us-west-2',
})
end
...
```## Requirements
### Platforms
- Any platform supported by Chef and the AWS-SDK
### Chef
- Chef 12.6+
# References
* https://github.com/eredi93/marloss