capistrano-slug 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +11 -8
- data/capistrano-slug.gemspec +1 -1
- data/lib/capistrano/tasks/slug.rake +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aeacc7ca16625360e2088e174b509f1012b904d
|
4
|
+
data.tar.gz: ef628070c16473db2a4dbbc43765fd46168c8191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7288b4836dcd39b6698d0931badc2cbd28823db650a0a19fabe484e18a4b78c64d10bd37f05b608f18c9b4bf32c6aa55add29dd8ed014c0f1b802ae28b256876
|
7
|
+
data.tar.gz: 8a466d9fc4a05ab49c10ecc804c8786f89f14e740d8dce1849f2bf2391feb422f8535bc4857909b23e5e00c99e54c23d5ca39834b23dcac57a176c19577aef6e
|
data/README.md
CHANGED
@@ -2,14 +2,17 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/capistrano-slug)
|
4
4
|
|
5
|
-
Basically after a deploy is completed Capistrano packs up it's directory and sends it off for artifact deployment sometime else.
|
5
|
+
Basically after a deploy is completed Capistrano packs up it's directory and sends it off for artifact deployment sometime else.
|
6
6
|
|
7
|
-
The initial use case is taking a point-in-time snapshot of Capistrano deployment, after every deployment, to use on newly bootstrapped servers.
|
8
|
-
When a new server bootstraps I want it to have the current code (and config etc) that was deployed by Capistrano
|
7
|
+
The initial use case is taking a point-in-time snapshot of Capistrano deployment, after every deployment, to use on newly bootstrapped servers.
|
8
|
+
When a new server bootstraps I want it to have the current code (and config etc) that was deployed by Capistrano without actually having to do a `cap deploy`.
|
9
|
+
This is achieved by downloading and 'installing' the slug on boot of a new server.
|
9
10
|
|
10
11
|
This enables things like automatic provisioning of new servers but still allows for Capistrano deployments.
|
11
12
|
|
12
|
-
Slug work happens on a single server only - the primary of the configured role (default `:
|
13
|
+
Slug work happens on a single server only - the primary of the configured role (default `:web`).
|
14
|
+
|
15
|
+
Here's an example of capistrano-slug in use: https://gist.github.com/rjocoleman/11268563
|
13
16
|
|
14
17
|
|
15
18
|
## Installation
|
@@ -70,7 +73,7 @@ Creates a slug:
|
|
70
73
|
|
71
74
|
```shell
|
72
75
|
$ cap staging slug:create
|
73
|
-
INFO
|
76
|
+
INFO Slug: Successfully created foo-application-slug.tar.gz
|
74
77
|
```
|
75
78
|
|
76
79
|
|
@@ -80,7 +83,7 @@ Uploads a slug to your configured storage:
|
|
80
83
|
|
81
84
|
```shell
|
82
85
|
$ cap staging slug:upload
|
83
|
-
INFO
|
86
|
+
INFO Slug: Uploaded foo-application-slug.tar.gz
|
84
87
|
```
|
85
88
|
|
86
89
|
#### slug:clean
|
@@ -89,7 +92,7 @@ Removes a slug from your server (not it's storage):
|
|
89
92
|
|
90
93
|
```shell
|
91
94
|
$ cap staging slug:clean
|
92
|
-
INFO
|
95
|
+
INFO Slug: Cleaned foo-application-slug.tar.gz
|
93
96
|
```
|
94
97
|
|
95
98
|
|
@@ -99,7 +102,7 @@ $ cap staging slug:clean
|
|
99
102
|
Configurable options, shown here with defaults:
|
100
103
|
|
101
104
|
```ruby
|
102
|
-
set :slug_role, :
|
105
|
+
set :slug_role, :web
|
103
106
|
set :slug_name, -> { fetch(:application) }
|
104
107
|
set :slug_storage_backend, 's3'
|
105
108
|
set :slug_s3_bucket, nil
|
data/capistrano-slug.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-slug'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.1'
|
8
8
|
spec.authors = ['Robert Coleman']
|
9
9
|
spec.email = ['github@robert.net.nz']
|
10
10
|
spec.summary = %q{Capistrano tasks to make deployment artifacts}
|
@@ -3,8 +3,10 @@ namespace :slug do
|
|
3
3
|
desc 'Create Slug'
|
4
4
|
task :create do
|
5
5
|
on primary fetch(:slug_role) do
|
6
|
-
|
6
|
+
slug_dir = "#{fetch(:tmp_dir)}/#{fetch(:application)}"
|
7
|
+
slug_file = "#{slug_dir}/#{fetch(:slug_name)}-slug.tar.gz"
|
7
8
|
info "Slug: Creating #{slug_file}"
|
9
|
+
execute :mkdir, '-p', slug_dir
|
8
10
|
execute "tar czf #{slug_file} -C #{deploy_path} ."
|
9
11
|
info "Slug: Successfully created #{slug_file}"
|
10
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-slug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Coleman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|