Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dena/capistrano-net_storage-s3
Capistrano::NetStorage Plugin for Deployment via Amazon S3
https://github.com/dena/capistrano-net_storage-s3
capistrano deployment s3
Last synced: 3 months ago
JSON representation
Capistrano::NetStorage Plugin for Deployment via Amazon S3
- Host: GitHub
- URL: https://github.com/dena/capistrano-net_storage-s3
- Owner: DeNA
- License: mit
- Created: 2017-04-12T08:40:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-07T13:47:10.000Z (over 1 year ago)
- Last Synced: 2024-10-21T02:02:18.042Z (3 months ago)
- Topics: capistrano, deployment, s3
- Language: Ruby
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 15
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/capistrano-net_storage-s3.svg)](https://badge.fury.io/rb/capistrano-net_storage-s3)
[![Test](https://github.com/DeNADev/capistrano-net_storage-s3/actions/workflows/test.yml/badge.svg)](https://github.com/DeNADev/capistrano-net_storage-s3/actions/workflows/test.yml?query=branch%3Amaster)
# Capistrano::NetStorage::S3**Capistrano::NetStorage::S3** is a transport plugin of
[Capistrano::NetStorage](https://github.com/DeNADev/capistrano-net_storage) to deploy application
via [Amazon S3](https://aws.amazon.com/s3/).
And Capistrano::NetStorage is a plugin of [Capistrano](http://capistranorb.com/).## Installation
Add this line to your application's Gemfile:
```ruby
gem 'capistrano-net_storage-s3', require: false
```And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-net_storage-s3
## Configuration
Set Capistrano variables by `set name, value`.
#### General Settings
Name | Default | Description
------|---------|------------
`:net_storage_transport` | NO DEFAULT | Set `Capistrano::NetStorage::S3::Transport`
`:net_storage_s3_bucket` | NO DEFAULT | S3 bucket name (e.g. `"your-bucket-name"` )
`:net_storage_s3_archives_directory` | `"/"` | Directory for application archives in S3 bucket#### Settings for AWS
Name | Default | Description
------|---------|------------
`:net_storage_s3_aws_access_key_id` | `ENV['AWS_ACCESS_KEY_ID']` | AWS Access Key ID
`:net_storage_s3_aws_secret_access_key` | `ENV['AWS_SECRET_ACCESS_KEY']` | AWS Secret Access Key
`:net_storage_s3_aws_session_token` | `ENV['AWS_SESSION_TOKEN']` | AWS Session Token
`:net_storage_s3_aws_region` | `ENV['AWS_DEFAULT_REGION']` | AWS Region
`:net_storage_s3_aws_profile` | `ENV['AWS_DEFAULT_PROFILE']` | AWS Profile
`:net_storage_s3_aws_config_file` | `ENV['AWS_CONFIG_FILE']` | AWS Config File#### Other Settings
**NOTE: We strongly recommend the defaults for integrity and performance. Change at your own risk.**
Name | Default | Description
------|---------|------------
`:net_storage_s3_max_retry` | `3` | Max retry to download from S3 to each serversSee also
[the configuration section of Capistrano::NetStorage](https://github.com/DeNADev/capistrano-net_storage#configuration).## Usage
Edit Capfile:
```ruby
# Load DSL and Setup Up Stages
require 'capistrano/setup'# Includes default deployment tasks
require 'capistrano/deploy'# Includes tasks from other gems included in your Gemfile
require "capistrano/net_storage/plugin"
install_plugin Capistrano::NetStorage::Plugin# Load transport plugin for Capistrano::NetStorage
require 'capistrano/net_storage/s3'
```Edit your `config/deploy.rb`:
```ruby
set :net_storage_transport, Capistrano::NetStorage::S3::Transport
set :net_storage_config_files, Pathname('path/to/config').glob('*.yml')# These settings upload archives to s3://bucket-for-deployment/api/#{sha1_hash}.tar.gz
set :net_storage_s3_bucket, 'bucket-for-deployment'
set :net_storage_s3_archives_directory 'api'set :net_storage_s3_aws_config_file, '~/.aws/config'
# set :net_storage_s3_aws_profile, 'some-name' # If you are using multiple profiles
```## License
Available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Copyright (c) 2017 DeNA Co., Ltd., IKEDA Kiyoshi