This repository has been archived by the owner on Jul 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
4027e1c
commit 156b96a
Showing
5 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name 'rubygems-backups' | ||
|
||
version '0.0.21' | ||
version '0.0.24' | ||
|
||
depends 'chef-vault' | ||
depends 'rubygems-ruby' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
cookbooks/rubygems-backups/templates/default/public_redis.rb.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# encoding: utf-8 | ||
|
||
## | ||
# Backup v4.x Configuration | ||
# | ||
# Documentation: http://meskyanichi.github.io/backup | ||
# Issue Tracker: https://github.com/meskyanichi/backup/issues | ||
|
||
require 'json' | ||
|
||
Backup::Model.new(:public_redis, 'RubyGems.org Public Redis Dump') do | ||
|
||
database Redis do |db| | ||
db.rdb_path = '/var/lib/redis/dump-<%= node['redisio']['servers'][0]['port'] %>.rdb' | ||
db.host = 'localhost' | ||
db.port = <%= node['redisio']['servers'][0]['port'] %> | ||
db.invoke_save = false | ||
end | ||
|
||
compress_with Gzip | ||
|
||
store_with S3 do |s3| | ||
s3.access_key_id = '<%= @aws_access_key %>' | ||
s3.secret_access_key = '<%= @aws_secret_key %>' | ||
s3.bucket = '<%= @bucket_name %>' | ||
s3.region = 'us-west-2' | ||
s3.path = '<%= node.chef_environment %>' | ||
end | ||
|
||
notify_by Slack do |slack| | ||
slack.on_success = false | ||
slack.on_warning = true | ||
slack.on_failure = true | ||
slack.team = 'bundler' | ||
slack.token = '<%= @slack_token %>' | ||
end | ||
|
||
end |