mina 1.0.0.rc2 → 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 +4 -4
- data/Readme.md +12 -42
- data/docs/Readme.md +1 -0
- data/docs/cookbook.md +35 -0
- data/docs/deploying.md +9 -8
- data/docs/writing_your_own_tasks.md +5 -9
- data/lib/mina/version.rb +1 -1
- data/mina.gemspec +4 -6
- metadata +7 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83c8e34e69b93e44e780d82f363b92d4842692e
|
4
|
+
data.tar.gz: 1e41bf4bb3e5faabb34e81512350084f3f5e9de7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bafb508437f658045cff9226d6eb96f7597a629de20f83dd9aaa1d570a0ef7e80dde85613357de0ab0197caac1aefef871bae42fd59121f2eee1a0a7721a0081
|
7
|
+
data.tar.gz: cc2834a756ed65615a7b7639b14f6d78507cc46b83fe47c6d359ae02604afbdd380b893591a33c20b8e3bbd03fbd0e396a9eafabcc8cdb3ac8ea8b6bb4a7d13c
|
data/Readme.md
CHANGED
@@ -5,24 +5,24 @@
|
|
5
5
|
[](https://semaphoreci.com/d4be4st/mina)
|
6
6
|
[](https://badge.fury.io/rb/mina)
|
7
7
|
|
8
|
+

|
9
|
+
|
8
10
|
Really fast deployer and server automation tool.
|
9
11
|
|
10
12
|
## Warning
|
11
13
|
|
12
|
-
**This is a readme of the current master, version 1.0.0.
|
14
|
+
**This is a readme of the current master, version 1.0.0. If you are using older mina (pre 0.3) please take a look at [0.3 readme](https://github.com/mina-deploy/mina/blob/v0.3.8/Readme.md)**
|
13
15
|
|
14
16
|
|
15
17
|
Mina works really fast because it's a deploy Bash script generator. It
|
16
18
|
generates an entire procedure as a Bash script and runs it remotely in the
|
17
19
|
server.
|
18
20
|
|
19
|
-
Compare this to the likes of [
|
20
|
-
|
21
|
-
is run separately on their own SSH sessions. Mina only creates *one* SSH
|
22
|
-
session per deploy, minimizing the SSH connection overhead.
|
21
|
+
Compare this to the likes of [Capistrano](https://github.com/capistrano/capistrano), where it opens an SSH connection and runs each command in sequence
|
22
|
+
, Mina only creates a SSH session and sends *one* command.
|
23
23
|
|
24
24
|
$ gem install mina
|
25
|
-
$ mina
|
25
|
+
$ mina init
|
26
26
|
|
27
27
|
Documentation
|
28
28
|
----------------
|
@@ -37,46 +37,16 @@ If you are missing some plugins check the [3rd party plugins doc](docs/3rd_party
|
|
37
37
|
|
38
38
|
For other documentation please visit the [docs](docs)
|
39
39
|
|
40
|
-
|
40
|
+
Licence
|
41
41
|
----------------
|
42
42
|
|
43
|
-
© 2012-2015, Nadarei.
|
44
|
-
2015-2016, Infinum.
|
45
43
|
Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
|
46
44
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
Stjepan:
|
51
|
-
|
52
|
-
* [Github](https://github.com/d4be4st) (@d4be4st)
|
53
|
-
* [Twitter](https://twitter.com/_Beast_) (@_Beast_)
|
54
|
-
|
55
|
-
Gabrijel:
|
56
|
-
|
57
|
-
* [Github](https://github.com/gabskoro) (@gabskoro)
|
58
|
-
* [Twitter](https://twitter.com/gabskoro) (@gabskoro)
|
59
|
-
|
60
|
-
Rico:
|
61
|
-
|
62
|
-
* [My website](https://ricostacruz.com) (ricostacruz.com)
|
63
|
-
* [Github](https://github.com/rstacruz) (@rstacruz)
|
64
|
-
* [Twitter](https://twitter.com/rstacruz) (@rstacruz)
|
65
|
-
|
66
|
-
Michael:
|
67
|
-
|
68
|
-
* [My website][mg] (michaelgalero.com)
|
69
|
-
* [Github](https://github.com/mikong) (@mikong)
|
45
|
+
Credits
|
46
|
+
----------------
|
70
47
|
|
71
|
-
|
48
|
+
Mina is maintained and sponsored by [Infinum](https://infinum.co).
|
72
49
|
|
73
|
-
|
74
|
-
* [Github](https://github.com/nadarei) (@nadarei)
|
50
|
+
You can reach us on twitter [Stef](https://twitter.com/_Beast_) & [Infinum](https://twitter.com/infinumco)
|
75
51
|
|
76
|
-
[
|
77
|
-
[mg]: https://devblog.michaelgalero.com/
|
78
|
-
[c]: https://github.com/mina-deploy/mina/graphs/contributors
|
79
|
-
[nd]: https://nadarei.co
|
80
|
-
[sh]: https://github.com/d4be4st
|
81
|
-
[gs]: https://github.com/gabskoro
|
82
|
-
[inf]: https://infinum.co
|
52
|
+
 © 2016 Infinum.
|
data/docs/Readme.md
CHANGED
data/docs/cookbook.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
Cookbook
|
2
|
+
--------------------
|
3
|
+
|
4
|
+
# Multi environment deploy
|
5
|
+
|
6
|
+
``` ruby
|
7
|
+
# deploy.rb
|
8
|
+
|
9
|
+
set :domain, '...'
|
10
|
+
|
11
|
+
task :staging do
|
12
|
+
set :deploy_to, 'home/deploy/www/app-staging/'
|
13
|
+
set :rails_env, 'staging'
|
14
|
+
set :branch, 'develop'
|
15
|
+
end
|
16
|
+
|
17
|
+
task :production do
|
18
|
+
set :deploy_to, 'home/deploy/www/app/'
|
19
|
+
set :rails_env, 'production'
|
20
|
+
set :branch, 'master'
|
21
|
+
end
|
22
|
+
|
23
|
+
task :deploy do
|
24
|
+
...
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
```
|
29
|
+
$ mina staging deploy
|
30
|
+
$ mina production deploy
|
31
|
+
```
|
32
|
+
|
33
|
+
|
34
|
+
-------------------------------
|
35
|
+
\* *feel free to add your own recipes*
|
data/docs/deploying.md
CHANGED
@@ -18,13 +18,13 @@ task :deploy do
|
|
18
18
|
invoke :'bundle:install'
|
19
19
|
|
20
20
|
# These are instructions to start the app after it's been prepared.
|
21
|
-
|
22
|
-
|
21
|
+
on :launch do
|
22
|
+
command %{touch tmp/restart.txt}
|
23
23
|
end
|
24
24
|
|
25
25
|
# This optional block defines how a broken release should be cleaned up.
|
26
|
-
|
27
|
-
|
26
|
+
on :clean do
|
27
|
+
command %{log "failed deployment"}
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -58,8 +58,8 @@ In this example, it will do `git:clone` and `bundle:install`.
|
|
58
58
|
|
59
59
|
### Step 2: Move it to releases
|
60
60
|
|
61
|
-
Once the project has been built, it will be moved to `releases/`.
|
62
|
-
|
61
|
+
Once the project has been built, it will be moved to `releases/`.
|
62
|
+
Invoke the commands queued up in the `on :build` block.
|
63
63
|
|
64
64
|
$
|
65
65
|
-----> Moving to releases/4
|
@@ -69,7 +69,8 @@ called `current/` will be created to point to the active release.
|
|
69
69
|
|
70
70
|
### Step 3: Launch it
|
71
71
|
|
72
|
-
|
72
|
+
A symlink called `current/` will be created to point to the active release.
|
73
|
+
Invoke the commands queued up in the `on :launch` block. These often
|
73
74
|
commands to restart the webserver process. Once this in complete, you're done!
|
74
75
|
|
75
76
|
$
|
@@ -81,7 +82,7 @@ commands to restart the webserver process. Once this in complete, you're done!
|
|
81
82
|
### What about failure?
|
82
83
|
|
83
84
|
If it fails at any point, the release path will be deleted. If any commands are
|
84
|
-
queued using the `
|
85
|
+
queued using the `on :clean` block, they will be run. It will be as if nothing
|
85
86
|
happened. Lets see what happens if a build fails:
|
86
87
|
|
87
88
|
$
|
@@ -25,10 +25,6 @@ The `command` command queues up Bash commands to be run on the remote server.
|
|
25
25
|
If you invoke `mina restart`, it will invoke the task above and run the queued
|
26
26
|
commands on the remote server `your.server.com` via SSH.
|
27
27
|
|
28
|
-
# Workflow
|
29
|
-
|
30
|
-
WIP
|
31
|
-
|
32
28
|
# DSL
|
33
29
|
|
34
30
|
## Helpers
|
@@ -49,22 +45,22 @@ This queues code to be run on the current queue name (defaults to `:default`).
|
|
49
45
|
By default, whitespace is stripped from the beginning and end of the command.
|
50
46
|
|
51
47
|
``` ruby
|
52
|
-
command
|
48
|
+
command %{ls -al} # => [ls -al]
|
53
49
|
```
|
54
50
|
|
55
51
|
### comment
|
56
52
|
Adds a comment to the command queue.
|
57
53
|
|
58
54
|
``` ruby
|
59
|
-
comment
|
55
|
+
comment %{ls -al} # => [echo "-----> ls -al"]
|
60
56
|
```
|
61
57
|
|
62
58
|
### run
|
63
|
-
Runs the given block on the defined backend
|
59
|
+
Runs the given block on the defined backend (remote or local)
|
64
60
|
|
65
61
|
``` ruby
|
66
62
|
run :remote do
|
67
|
-
command
|
63
|
+
command %{ls -al}
|
68
64
|
end
|
69
65
|
```
|
70
66
|
|
@@ -82,7 +78,7 @@ Change the path the commands in the given block is run.
|
|
82
78
|
|
83
79
|
``` ruby
|
84
80
|
in_path('some/new/path') do
|
85
|
-
command
|
81
|
+
command %{ls -al} # => cd some/new/path && ls -al
|
86
82
|
end
|
87
83
|
```
|
88
84
|
|
data/lib/mina/version.rb
CHANGED
data/mina.gemspec
CHANGED
@@ -9,12 +9,10 @@ require 'mina/version'
|
|
9
9
|
Gem::Specification.new do |spec|
|
10
10
|
spec.name = 'mina'
|
11
11
|
spec.version = Mina::VERSION
|
12
|
-
spec.summary = '
|
13
|
-
spec.description = '
|
14
|
-
spec.authors = ['Stjepan Hadjić'
|
15
|
-
spec.email = [
|
16
|
-
'stjepan.hadjic@infinum.co', 'gabrijel.skoro@infinum.co', 'rico@nadarei.co', 'mikong@nadarei.co'
|
17
|
-
]
|
12
|
+
spec.summary = 'Blazing fast application deployment tool.'
|
13
|
+
spec.description = 'Blazing fast application deployment tool.'
|
14
|
+
spec.authors = ['Stjepan Hadjić']
|
15
|
+
spec.email = ['stjepan.hadjic@infinum.co']
|
18
16
|
spec.homepage = 'https://github.com/mina-deploy/mina'
|
19
17
|
spec.files = `git ls-files`.strip.split("\n")
|
20
18
|
spec.executables = Dir['bin/*'].map { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjić
|
8
|
-
- Gabrijel Škoro
|
9
|
-
- Rico Sta. Cruz
|
10
|
-
- Michael Galero
|
11
8
|
autorequire:
|
12
9
|
bindir: bin
|
13
10
|
cert_chain: []
|
14
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
15
12
|
dependencies:
|
16
13
|
- !ruby/object:Gem::Dependency
|
17
14
|
name: rake
|
@@ -97,12 +94,9 @@ dependencies:
|
|
97
94
|
- - ">="
|
98
95
|
- !ruby/object:Gem::Version
|
99
96
|
version: '0'
|
100
|
-
description:
|
97
|
+
description: Blazing fast application deployment tool.
|
101
98
|
email:
|
102
99
|
- stjepan.hadjic@infinum.co
|
103
|
-
- gabrijel.skoro@infinum.co
|
104
|
-
- rico@nadarei.co
|
105
|
-
- mikong@nadarei.co
|
106
100
|
executables:
|
107
101
|
- mina
|
108
102
|
extensions: []
|
@@ -124,6 +118,7 @@ files:
|
|
124
118
|
- docs/3rd_party_plugins.md
|
125
119
|
- docs/Readme.md
|
126
120
|
- docs/command_line_options.md
|
121
|
+
- docs/cookbook.md
|
127
122
|
- docs/deploying.md
|
128
123
|
- docs/faq.md
|
129
124
|
- docs/getting_started.md
|
@@ -213,14 +208,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
208
|
version: '0'
|
214
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
210
|
requirements:
|
216
|
-
- - "
|
211
|
+
- - ">="
|
217
212
|
- !ruby/object:Gem::Version
|
218
|
-
version:
|
213
|
+
version: '0'
|
219
214
|
requirements: []
|
220
215
|
rubyforge_project:
|
221
216
|
rubygems_version: 2.5.1
|
222
217
|
signing_key:
|
223
218
|
specification_version: 4
|
224
|
-
summary:
|
219
|
+
summary: Blazing fast application deployment tool.
|
225
220
|
test_files: []
|
226
|
-
has_rdoc:
|