capistrano-s3_archive 0.9.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +4 -5
- data/.rubocop.yml +73 -0
- data/.rubocop_todo.yml +33 -0
- data/README.md +81 -22
- data/capistrano-s3_archive.gemspec +8 -6
- data/example/.bundle/config +2 -0
- data/example/Capfile +41 -0
- data/example/Gemfile +13 -0
- data/example/Gemfile.lock +62 -0
- data/example/config/deploy/localtest.rb +3 -0
- data/example/config/deploy/production.rb +61 -0
- data/example/config/deploy/staging.rb +65 -0
- data/example/config/deploy.rb +13 -0
- data/img/s3_archive-direct.png +0 -0
- data/img/s3_archive-repo-branch.png +0 -0
- data/img/s3_archive-rsync.png +0 -0
- data/lib/capistrano/s3_archive/version.rb +1 -1
- data/lib/capistrano/s3_archive.rb +1 -1
- data/lib/capistrano/scm/s3_archive/archive_object.rb +76 -0
- data/lib/capistrano/scm/s3_archive/local_cache.rb +82 -0
- data/lib/capistrano/scm/s3_archive/remote_cache.rb +45 -0
- data/lib/capistrano/scm/s3_archive.rb +98 -231
- data/lib/capistrano/scm/tasks/s3_archive.rake +36 -32
- metadata +67 -17
- data/Vagrantfile +0 -22
- data/vagrant_example/.insecure_private_key +0 -27
- data/vagrant_example/Capfile +0 -27
- data/vagrant_example/Gemfile +0 -5
- data/vagrant_example/config/deploy/production.rb +0 -7
- data/vagrant_example/config/deploy.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: af4eb25b90c60b6a5ef6f072ff01024706128c1924e051424191f3d1f535ff50
|
4
|
+
data.tar.gz: 523ba94440f350ae342fd2b73b45f0d9b593cbf7e9d3935c4e239c100649d03b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfe3e1ac51a0dac8ef600e2a313feb4e3a665120c3ee1df0e46292e6e455c8ea428e50cdec7c8d5437c9bdc699259bbd5cc232b909cc4e0a4d5bec02cdda2a80
|
7
|
+
data.tar.gz: 7c2bb15d6493e9e2f82704c5d0e544679f27ea69c920501b81f5e1701d9a4b7c88dec4180a096b192675decf6bdde70fe7e20ce74f996281f2bb4c0c8fdc0dcd
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
DisplayCopNames: true
|
5
|
+
DisplayStyleGuide: true
|
6
|
+
TargetRubyVersion: 2.4
|
7
|
+
Exclude:
|
8
|
+
- "vagrant_example/**/*"
|
9
|
+
- "vendor/**/*"
|
10
|
+
- "spec/**/*"
|
11
|
+
- "lib/capistrano/**/*legacy*"
|
12
|
+
- "example/**/*"
|
13
|
+
|
14
|
+
Lint/AmbiguousBlockAssociation:
|
15
|
+
Enabled:
|
16
|
+
false
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- "spec/**/*"
|
20
|
+
- "lib/**/*.rake"
|
21
|
+
Style/BarePercentLiterals:
|
22
|
+
EnforcedStyle: percent_q
|
23
|
+
Style/ClassAndModuleChildren:
|
24
|
+
Enabled: false
|
25
|
+
Style/DoubleNegation:
|
26
|
+
Enabled: false
|
27
|
+
Naming/FileName:
|
28
|
+
Exclude:
|
29
|
+
- "Dangerfile"
|
30
|
+
Layout/IndentHeredoc:
|
31
|
+
Enabled: false
|
32
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
33
|
+
EnforcedStyle: no_space
|
34
|
+
Style/StringLiterals:
|
35
|
+
EnforcedStyle: double_quotes
|
36
|
+
Style/TrivialAccessors:
|
37
|
+
AllowPredicates: true
|
38
|
+
Style/PercentLiteralDelimiters:
|
39
|
+
Enabled: false
|
40
|
+
Style/SingleLineBlockParams:
|
41
|
+
Enabled: false
|
42
|
+
Style/ModuleFunction:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
# Enable someday
|
46
|
+
Style/Documentation:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# Needs refactors
|
50
|
+
Metrics/PerceivedComplexity:
|
51
|
+
Enabled: false
|
52
|
+
Metrics/CyclomaticComplexity:
|
53
|
+
Enabled: false
|
54
|
+
Metrics/MethodLength:
|
55
|
+
Enabled: false
|
56
|
+
Naming/PredicateName:
|
57
|
+
Enabled: false
|
58
|
+
Metrics/LineLength:
|
59
|
+
Enabled: false
|
60
|
+
Metrics/AbcSize:
|
61
|
+
Enabled: false
|
62
|
+
Style/PerlBackrefs:
|
63
|
+
Enabled: false
|
64
|
+
Style/FrozenStringLiteralComment:
|
65
|
+
Enabled: false
|
66
|
+
Style/StringLiterals:
|
67
|
+
Enabled: false
|
68
|
+
Metrics/ClassLength:
|
69
|
+
Enabled: false
|
70
|
+
Metrics/ModuleLength:
|
71
|
+
Enabled: false
|
72
|
+
Naming/AccessorMethodName:
|
73
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-07-12 16:40:11 +0900 using RuboCop version 0.65.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
Performance/RedundantBlockCall:
|
12
|
+
Exclude:
|
13
|
+
- 'lib/capistrano/scm/s3_archive/local_cache.rb'
|
14
|
+
|
15
|
+
# Offense count: 1
|
16
|
+
# Cop supports --auto-correct.
|
17
|
+
# Configuration parameters: EnforcedStyle.
|
18
|
+
# SupportedStyles: percent_q, bare_percent
|
19
|
+
Style/BarePercentLiterals:
|
20
|
+
Exclude:
|
21
|
+
- 'lib/capistrano/scm/s3_archive.rb'
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
Style/IfUnlessModifier:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/capistrano/scm/s3_archive.rb'
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# Cop supports --auto-correct.
|
31
|
+
Style/MultilineIfModifier:
|
32
|
+
Exclude:
|
33
|
+
- 'lib/capistrano/scm/tasks/s3_archive.rake'
|
data/README.md
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
# Capistrano::S3Archive
|
2
2
|
|
3
|
-
Capistrano::S3Archive is
|
3
|
+
Capistrano::S3Archive is the `SCM` extention of [Capistrano](http://www.capistranorb.com/).
|
4
4
|
|
5
|
-
|
5
|
+
**CAUTION!!** Document for VERSION < 0.9 is [legacy_README](legacy_README.md)
|
6
6
|
|
7
|
-
|
7
|
+
This `SCM` treats your S3 bucket as a source repository, and maps the uploaded ZIP/TAR archive file to a `branch` in Capistrano.
|
8
8
|
|
9
|
-
|
9
|
+

|
10
|
+
|
11
|
+
And this makes it possible to separate the deployment process into "pre-build" and "distribution", and helps to shorten the time of distribution and simplify the management of access rights. For example, you can prepare a zip file that has already done `npm install`, and an other, you can set up an EC2 IAM profile that allowed to read S3 instead of putting access keys for your private Git repository on the remote hosts.
|
10
12
|
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
Add this line to your application's Gemfile:
|
14
16
|
|
15
17
|
```ruby
|
16
|
-
gem 'capistrano-s3_archive', '
|
18
|
+
gem 'capistrano-s3_archive', '~> 1.0'
|
17
19
|
```
|
18
20
|
|
19
21
|
And then execute:
|
@@ -24,16 +26,14 @@ And then execute:
|
|
24
26
|
|
25
27
|
<!-- $ gem install capistrano-s3_archive -->
|
26
28
|
|
27
|
-
## Usage
|
28
29
|
|
29
30
|
### Quick Start
|
30
31
|
|
31
32
|
In Capfile:
|
32
33
|
|
33
|
-
```
|
34
34
|
require "capistrano/scm/s3_archive"
|
35
35
|
install_plugin Capistrano::SCM::S3Archive
|
36
|
-
|
36
|
+
|
37
37
|
|
38
38
|
And set a S3 path containing source archives to `:repo_url` and the parameters to access Amazon S3 to `:s3_archive_client_options`, For example, if you has following tree,
|
39
39
|
|
@@ -46,10 +46,9 @@ And set a S3 path containing source archives to `:repo_url` and the parameters t
|
|
46
46
|
|
47
47
|
then your `config/deploy.rb` would be:
|
48
48
|
|
49
|
-
```
|
50
49
|
set :repo_url, 's3://yourbucket/somedirectory/'
|
51
50
|
set :s3_archive_client_options, { region: 'ap-northeast-1', credentials: somecredentials }
|
52
|
-
|
51
|
+
|
53
52
|
|
54
53
|
To deploy staging:
|
55
54
|
|
@@ -57,28 +56,64 @@ To deploy staging:
|
|
57
56
|
$ bundle exec cap staging deploy
|
58
57
|
```
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
## Usage
|
60
|
+
### Set strategy
|
61
|
+
Choose a strategy for deploying extracted code to the remote from the archive.
|
62
|
+
- rsync
|
63
|
+
- direct (alpha)
|
64
|
+
|
65
|
+
_e.g._ `set :s3_archive_strategy, :rsync`.
|
66
|
+
|
67
|
+
|
68
|
+
#### strategy `rsync` (default)
|
69
|
+

|
70
|
+
|
71
|
+
This strategy behaves like the [capistrano-rsync](https://github.com/moll/capistrano-rsync) except downloading sources from S3 instead of GIT by default.
|
72
|
+
|
73
|
+
#### strategy `direct` (alpha)
|
74
|
+

|
75
|
+
|
76
|
+
|
77
|
+
### Requirements
|
78
|
+
|
79
|
+
| For `rsync` strategy | local | remotes |
|
80
|
+
| :- | :-: | :-: |
|
81
|
+
| rsync | ✔ | ✔ |
|
82
|
+
| unzip or tar | ✔ | - |
|
83
|
+
| awscli | - | - |
|
84
|
+
| s3:ListBucket | ✔ | - |
|
85
|
+
| s3:ListBucketVersions | ✔ | - |
|
86
|
+
| s3:GetObjectVersion | ✔ | - |
|
87
|
+
| s3:GetObject | ✔ | - |
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
| For `direct` strategy | local | remotes |
|
92
|
+
| :- | :-: | :-: |
|
93
|
+
| rsync | - | - |
|
94
|
+
| unzip or tar | - | ✔ |
|
95
|
+
| awscli | - | ✔ |
|
96
|
+
| awscli configuration (*1) | - | ✔ |
|
97
|
+
| s3:ListBucket | ✔ | ✔ |
|
98
|
+
| s3:ListBucketVersions | ✔ | ✔ |
|
99
|
+
| s3:GetObjectVersion | - | ✔ |
|
100
|
+
| s3:GetObject | - | ✔ |
|
101
|
+
|
102
|
+
_(*1) awscli on remote hosts need to have access rights to S3 by default settings._
|
64
103
|
|
65
104
|
|
66
105
|
### Configuration
|
67
106
|
|
68
107
|
Available configurations are followings (key, default).
|
69
108
|
|
109
|
+
# COMMON SETTINGS
|
70
110
|
:repo_url, nil
|
71
111
|
:branch, :latest
|
72
|
-
:s3_archive_client_options,
|
112
|
+
:s3_archive_client_options, {}
|
73
113
|
:s3_archive_sort_proc, ->(new, old) { old.key <=> new.key }
|
114
|
+
:s3_archive_strategy, :rsync
|
74
115
|
:s3_archive_object_version_id, nil
|
75
|
-
|
76
|
-
:s3_archive_local_cache_dir, "tmp/deploy"
|
77
|
-
:s3_archive_remote_rsync_options, ['-az', '--delete']
|
78
|
-
:s3_archive_remote_rsync_ssh_options, []
|
79
|
-
:s3_archive_remote_rsync_runner_options, {}
|
80
|
-
:s3_archive_rsync_cache_dir, "shared/deploy"
|
81
|
-
:s3_archive_hardlink_release, false
|
116
|
+
|
82
117
|
|
83
118
|
**`repo_url` (required)**
|
84
119
|
|
@@ -96,10 +131,29 @@ Options passed to `Aws::S3::Client.new(options)` to fetch archives.
|
|
96
131
|
|
97
132
|
Sort algorithm used to detect basename of `:latest` object. It should be proc object for `new,old` as `Aws::S3::Object` comparing.
|
98
133
|
|
134
|
+
**`:s3_archive_strategy, :rsync`**
|
135
|
+
|
136
|
+
A Strategy to distribute archived source code. You can set `:rsync` or `direct`.
|
137
|
+
|
99
138
|
**`:s3_archive_object_version_id`**
|
100
139
|
|
101
140
|
Version ID of version-controlled S3 object. It should use with `:branch`. e.g. `set :branch, 'myapp.zip'; set :version_id, 'qawsedrftgyhujikolq'`
|
102
141
|
|
142
|
+
#### Configurations for `rsync` strategy
|
143
|
+
|
144
|
+
:s3_archive_skip_download, nil
|
145
|
+
:s3_archive_local_download_dir, "tmp/archives"
|
146
|
+
:s3_archive_local_cache_dir, "tmp/deploy"
|
147
|
+
:s3_archive_remote_rsync_options, ['-az', '--delete']
|
148
|
+
:s3_archive_remote_rsync_ssh_options, []
|
149
|
+
:s3_archive_remote_rsync_runner_options, {}
|
150
|
+
:s3_archive_rsync_cache_dir, "shared/deploy"
|
151
|
+
:s3_archive_hardlink_release, false
|
152
|
+
|
153
|
+
**`:s3_archive_skip_download`**
|
154
|
+
|
155
|
+
If this set to true, skip downloading the archive and rsync from local cache.
|
156
|
+
|
103
157
|
**`:s3_archive_local_download_dir`**
|
104
158
|
|
105
159
|
Path where to download source archives. Can use both relative or absolute.
|
@@ -128,6 +182,11 @@ Path where to cache your sources on the remote server to avoid rsyncing from scr
|
|
128
182
|
|
129
183
|
Enable `--link-dest` option when creating release directory by remote rsyncing. It could speed deployment up.
|
130
184
|
|
185
|
+
#### Configurations for `direct` strategy
|
186
|
+
|
187
|
+
:s3_archive_remote_cache_dir, -> { File.join(shared_path, "archives") } # 典型的には,
|
188
|
+
|
189
|
+
|
131
190
|
## Development
|
132
191
|
|
133
192
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'capistrano/s3_archive/version'
|
5
4
|
|
@@ -9,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.authors = ["Takuto Komazaki"]
|
10
9
|
spec.email = ["komazarari@gmail.com"]
|
11
10
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
11
|
+
spec.summary = 'Capistrano deployment from an archive on Amazon S3.'
|
12
|
+
spec.description = 'Capistrano deployment from an archive on Amazon S3.'
|
14
13
|
spec.homepage = "https://github.com/komazarari/capistrano-s3_archive"
|
15
14
|
|
16
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -18,11 +17,14 @@ Gem::Specification.new do |spec|
|
|
18
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
18
|
spec.require_paths = ["lib"]
|
20
19
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
20
|
+
spec.required_ruby_version = '>= 2.4.0'
|
21
|
+
spec.add_dependency 'aws-sdk-s3', '~> 1'
|
22
22
|
spec.add_dependency 'capistrano', '~> 3.0'
|
23
|
-
spec.add_dependency 'aws-sdk', '~> 2.0'
|
24
23
|
|
25
24
|
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "mocha"
|
26
|
+
spec.add_development_dependency "pry"
|
26
27
|
spec.add_development_dependency "rake"
|
28
|
+
spec.add_development_dependency "rspec"
|
27
29
|
spec.add_development_dependency "rubocop"
|
28
30
|
end
|
data/example/Capfile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Load DSL and set up stages
|
2
|
+
require "capistrano/setup"
|
3
|
+
|
4
|
+
# Include default deployment tasks
|
5
|
+
require "capistrano/deploy"
|
6
|
+
|
7
|
+
# Load the SCM plugin appropriate to your project:
|
8
|
+
#
|
9
|
+
# require "capistrano/scm/hg"
|
10
|
+
# install_plugin Capistrano::SCM::Hg
|
11
|
+
# or
|
12
|
+
# require "capistrano/scm/svn"
|
13
|
+
# install_plugin Capistrano::SCM::Svn
|
14
|
+
# or
|
15
|
+
require "capistrano/scm/s3_archive"
|
16
|
+
install_plugin Capistrano::SCM::S3Archive
|
17
|
+
|
18
|
+
# Include tasks from other gems included in your Gemfile
|
19
|
+
#
|
20
|
+
# For documentation on these, see for example:
|
21
|
+
#
|
22
|
+
# https://github.com/capistrano/rvm
|
23
|
+
# https://github.com/capistrano/rbenv
|
24
|
+
# https://github.com/capistrano/chruby
|
25
|
+
# https://github.com/capistrano/bundler
|
26
|
+
# https://github.com/capistrano/rails
|
27
|
+
# https://github.com/capistrano/passenger
|
28
|
+
#
|
29
|
+
# require "capistrano/rvm"
|
30
|
+
# require "capistrano/rbenv"
|
31
|
+
# require "capistrano/chruby"
|
32
|
+
# require "capistrano/bundler"
|
33
|
+
# require "capistrano/rails/assets"
|
34
|
+
# require "capistrano/rails/migrations"
|
35
|
+
# require "capistrano/passenger"
|
36
|
+
require "capistrano/locally"
|
37
|
+
|
38
|
+
require "pry"
|
39
|
+
|
40
|
+
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
41
|
+
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
data/example/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
6
|
+
|
7
|
+
gem "capistrano-s3_archive", path: "../"
|
8
|
+
|
9
|
+
### local stage exapmle
|
10
|
+
gem "capistrano-locally"
|
11
|
+
|
12
|
+
### debug
|
13
|
+
gem "pry"
|
@@ -0,0 +1,62 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
capistrano-s3_archive (1.0.0.beta)
|
5
|
+
aws-sdk-s3 (~> 1)
|
6
|
+
capistrano (~> 3.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
airbrussh (1.3.2)
|
12
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
13
|
+
aws-eventstream (1.0.3)
|
14
|
+
aws-partitions (1.187.0)
|
15
|
+
aws-sdk-core (3.59.0)
|
16
|
+
aws-eventstream (~> 1.0, >= 1.0.2)
|
17
|
+
aws-partitions (~> 1.0)
|
18
|
+
aws-sigv4 (~> 1.1)
|
19
|
+
jmespath (~> 1.0)
|
20
|
+
aws-sdk-kms (1.23.0)
|
21
|
+
aws-sdk-core (~> 3, >= 3.58.0)
|
22
|
+
aws-sigv4 (~> 1.1)
|
23
|
+
aws-sdk-s3 (1.45.0)
|
24
|
+
aws-sdk-core (~> 3, >= 3.58.0)
|
25
|
+
aws-sdk-kms (~> 1)
|
26
|
+
aws-sigv4 (~> 1.1)
|
27
|
+
aws-sigv4 (1.1.0)
|
28
|
+
aws-eventstream (~> 1.0, >= 1.0.2)
|
29
|
+
capistrano (3.11.0)
|
30
|
+
airbrussh (>= 1.0.0)
|
31
|
+
i18n
|
32
|
+
rake (>= 10.0.0)
|
33
|
+
sshkit (>= 1.9.0)
|
34
|
+
capistrano-locally (0.2.6)
|
35
|
+
capistrano (~> 3.0)
|
36
|
+
coderay (1.1.2)
|
37
|
+
concurrent-ruby (1.1.5)
|
38
|
+
i18n (1.6.0)
|
39
|
+
concurrent-ruby (~> 1.0)
|
40
|
+
jmespath (1.4.0)
|
41
|
+
method_source (0.9.2)
|
42
|
+
net-scp (2.0.0)
|
43
|
+
net-ssh (>= 2.6.5, < 6.0.0)
|
44
|
+
net-ssh (5.2.0)
|
45
|
+
pry (0.12.2)
|
46
|
+
coderay (~> 1.1.0)
|
47
|
+
method_source (~> 0.9.0)
|
48
|
+
rake (12.3.2)
|
49
|
+
sshkit (1.19.1)
|
50
|
+
net-scp (>= 1.1.2)
|
51
|
+
net-ssh (>= 2.8.0)
|
52
|
+
|
53
|
+
PLATFORMS
|
54
|
+
ruby
|
55
|
+
|
56
|
+
DEPENDENCIES
|
57
|
+
capistrano-locally
|
58
|
+
capistrano-s3_archive!
|
59
|
+
pry
|
60
|
+
|
61
|
+
BUNDLED WITH
|
62
|
+
1.17.2
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# server-based syntax
|
2
|
+
# ======================
|
3
|
+
# Defines a single server with a list of roles and multiple properties.
|
4
|
+
# You can define all roles on a single server, or split them:
|
5
|
+
|
6
|
+
# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value
|
7
|
+
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
|
8
|
+
# server "db.example.com", user: "deploy", roles: %w{db}
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
# role-based syntax
|
13
|
+
# ==================
|
14
|
+
|
15
|
+
# Defines a role with one or multiple servers. The primary server in each
|
16
|
+
# group is considered to be the first unless any hosts have the primary
|
17
|
+
# property set. Specify the username and a domain or IP for the server.
|
18
|
+
# Don't use `:all`, it's a meta role.
|
19
|
+
|
20
|
+
# role :app, %w{deploy@example.com}, my_property: :my_value
|
21
|
+
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
22
|
+
# role :db, %w{deploy@example.com}
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
# Configuration
|
27
|
+
# =============
|
28
|
+
# You can set any configuration variable like in config/deploy.rb
|
29
|
+
# These variables are then only loaded and set in this stage.
|
30
|
+
# For available Capistrano configuration variables see the documentation page.
|
31
|
+
# http://capistranorb.com/documentation/getting-started/configuration/
|
32
|
+
# Feel free to add new variables to customise your setup.
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
# Custom SSH Options
|
37
|
+
# ==================
|
38
|
+
# You may pass any option but keep in mind that net/ssh understands a
|
39
|
+
# limited set of options, consult the Net::SSH documentation.
|
40
|
+
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
|
41
|
+
#
|
42
|
+
# Global options
|
43
|
+
# --------------
|
44
|
+
# set :ssh_options, {
|
45
|
+
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
46
|
+
# forward_agent: false,
|
47
|
+
# auth_methods: %w(password)
|
48
|
+
# }
|
49
|
+
#
|
50
|
+
# The server-based syntax can be used to override options:
|
51
|
+
# ------------------------------------
|
52
|
+
# server "example.com",
|
53
|
+
# user: "user_name",
|
54
|
+
# roles: %w{web app},
|
55
|
+
# ssh_options: {
|
56
|
+
# user: "user_name", # overrides user setting above
|
57
|
+
# keys: %w(/home/user_name/.ssh/id_rsa),
|
58
|
+
# forward_agent: false,
|
59
|
+
# auth_methods: %w(publickey password)
|
60
|
+
# # password: "please use keys"
|
61
|
+
# }
|
@@ -0,0 +1,65 @@
|
|
1
|
+
server 'koma-bionic.dev-inf.gree-dev.net', roles: [:app]
|
2
|
+
|
3
|
+
set :deploy_to, '/var/tmp/testmyapp'
|
4
|
+
|
5
|
+
# server-based syntax
|
6
|
+
# ======================
|
7
|
+
# Defines a single server with a list of roles and multiple properties.
|
8
|
+
# You can define all roles on a single server, or split them:
|
9
|
+
|
10
|
+
# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value
|
11
|
+
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
|
12
|
+
# server "db.example.com", user: "deploy", roles: %w{db}
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
# role-based syntax
|
17
|
+
# ==================
|
18
|
+
|
19
|
+
# Defines a role with one or multiple servers. The primary server in each
|
20
|
+
# group is considered to be the first unless any hosts have the primary
|
21
|
+
# property set. Specify the username and a domain or IP for the server.
|
22
|
+
# Don't use `:all`, it's a meta role.
|
23
|
+
|
24
|
+
# role :app, %w{deploy@example.com}, my_property: :my_value
|
25
|
+
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
26
|
+
# role :db, %w{deploy@example.com}
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
# Configuration
|
31
|
+
# =============
|
32
|
+
# You can set any configuration variable like in config/deploy.rb
|
33
|
+
# These variables are then only loaded and set in this stage.
|
34
|
+
# For available Capistrano configuration variables see the documentation page.
|
35
|
+
# http://capistranorb.com/documentation/getting-started/configuration/
|
36
|
+
# Feel free to add new variables to customise your setup.
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
# Custom SSH Options
|
41
|
+
# ==================
|
42
|
+
# You may pass any option but keep in mind that net/ssh understands a
|
43
|
+
# limited set of options, consult the Net::SSH documentation.
|
44
|
+
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
|
45
|
+
#
|
46
|
+
# Global options
|
47
|
+
# --------------
|
48
|
+
# set :ssh_options, {
|
49
|
+
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
50
|
+
# forward_agent: false,
|
51
|
+
# auth_methods: %w(password)
|
52
|
+
# }
|
53
|
+
#
|
54
|
+
# The server-based syntax can be used to override options:
|
55
|
+
# ------------------------------------
|
56
|
+
# server "example.com",
|
57
|
+
# user: "user_name",
|
58
|
+
# roles: %w{web app},
|
59
|
+
# ssh_options: {
|
60
|
+
# user: "user_name", # overrides user setting above
|
61
|
+
# keys: %w(/home/user_name/.ssh/id_rsa),
|
62
|
+
# forward_agent: false,
|
63
|
+
# auth_methods: %w(publickey password)
|
64
|
+
# # password: "please use keys"
|
65
|
+
# }
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# config valid for current version and patch releases of Capistrano
|
2
|
+
lock "~> 3.11.0"
|
3
|
+
|
4
|
+
set :application, "my_app_name"
|
5
|
+
set :repo_url, "s3://komazarari-public-01/capistrano-s3_archive/test-archives/"
|
6
|
+
|
7
|
+
# set :branch, '20190711_my_app.zip'
|
8
|
+
# set :branch, :master # same as :latest
|
9
|
+
set :branch, :latest
|
10
|
+
|
11
|
+
set :s3_archive_client_options, { region: 'us-east-1' }
|
12
|
+
set :s3_archive_strategy, :direct
|
13
|
+
# set :s3_archive_object_version_id, 'QUC.zh2MUXf7_ZCkFa7IZJN5CJKYlLKy'
|
Binary file
|
Binary file
|
data/img/s3_archive-rsync.png
CHANGED
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
load File.expand_path(
|
1
|
+
load File.expand_path('legacy_s3_archive.rb', __dir__)
|