negroku 2.0.0.pre3 → 2.0.0.pre4
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/.gitignore +0 -11
- data/.travis.yml +7 -0
- data/README.md +156 -4
- data/lib/negroku/tasks/whenever.rake +1 -1
- data/lib/negroku/templates/negroku/deploy.rb.erb +1 -1
- data/lib/negroku/version.rb +1 -1
- data/negroku.gemspec +0 -3
- metadata +5 -13
- data/README.rdoc +0 -6
- data/negroku.rdoc +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d045fb351d197f53adfebf653a29e9989be6838
|
4
|
+
data.tar.gz: fad09b0fdad39ed72d3b6dcdb1d0aacd1cf6af7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c75d2c4a932c6aade463d7ad576dda2d6e02dbca3b625439c0b2eefb9c6d2e085ebc4baf358884e992df5f5a341adb377a13a6398c7414f5f87a611bd7fae167
|
7
|
+
data.tar.gz: b87a9a82dfb370cecaf7c6593bf7da1632869555e003d8777bee4cb03a65d4e020ff1cf44cff6a16b67a7a9a8aa9e5a1895dba5894d6169c6bf55762db068efa
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,15 +1,167 @@
|
|
1
|
-
Negroku [![Stories in Ready]
|
1
|
+
Negroku [![Stories in Ready][ready]][waffle] [![Build Status][travis-badge]][travis]
|
2
2
|
=======
|
3
|
+
[waffle]: http://waffle.io/platanus/negroku
|
4
|
+
[ready]: https://badge.waffle.io/platanus/negroku.svg?label=ready&title=ready
|
5
|
+
[travis]: https://travis-ci.org/platanus/negroku
|
6
|
+
[travis-badge]: https://travis-ci.org/platanus/negroku.svg?branch=master
|
3
7
|
|
4
8
|
Negroku is an opinionated collection of recipes for capistrano.
|
5
9
|
|
6
|
-
The goal is to be able to deploy **ruby
|
10
|
+
The goal is to be able to deploy **ruby applications** without the hassle of configure and define all the stuff involved in an application deployment.
|
7
11
|
|
8
|
-
|
12
|
+
## Installation
|
9
13
|
|
10
|
-
|
14
|
+
Install negroku as a global gem.
|
11
15
|
|
16
|
+
```shell
|
17
|
+
$ gem install negroku --pre
|
18
|
+
```
|
12
19
|
|
20
|
+
Add the negroku gem to your `Gemfile` development group to lock the version your are going to use.
|
13
21
|
|
22
|
+
```ruby
|
23
|
+
group :development do
|
24
|
+
gem 'negroku', '~> 2.0.0.pre3'
|
25
|
+
end
|
26
|
+
```
|
14
27
|
|
28
|
+
Then run
|
15
29
|
|
30
|
+
```shell
|
31
|
+
$ bundle install
|
32
|
+
```
|
33
|
+
|
34
|
+
## Prepare your application
|
35
|
+
|
36
|
+
1. Create your app executing the following command, and just follow the on-screen questions.
|
37
|
+
|
38
|
+
```shell
|
39
|
+
$ negroku app create
|
40
|
+
```
|
41
|
+
|
42
|
+

|
43
|
+
|
44
|
+
1. **Give your application a name**
|
45
|
+
|
46
|
+
This will be used to create the app folder structure in the server.
|
47
|
+
|
48
|
+
1. **Please choose your repository url**
|
49
|
+
|
50
|
+
You'll need to choose the git respository where your are going deploy your project from. Typically a GitHub repository.
|
51
|
+
|
52
|
+
If you have already initializated your git repository for the project, you'll be offered to choose the remotes of the current repo.
|
53
|
+
|
54
|
+
The `app create` command will bootpstrap your app (behind the scenes it will run the `cap install` command and add some customizations)
|
55
|
+
|
56
|
+
Some files and folders will be added to your project.
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
project_root
|
60
|
+
|--- Capfile # Capistrano load file
|
61
|
+
+--- config
|
62
|
+
|--- deploy.rb # Global setting for all environments
|
63
|
+
```
|
64
|
+
|
65
|
+
1. Add a new stage for your deployment.
|
66
|
+
|
67
|
+
```shell
|
68
|
+
$negroku stage add
|
69
|
+
```
|
70
|
+
|
71
|
+

|
72
|
+
|
73
|
+
1. **Stage Name**
|
74
|
+
|
75
|
+
This will be used to create de stage configuration files
|
76
|
+
|
77
|
+
|
78
|
+
1. **Select the branch to use**
|
79
|
+
|
80
|
+
Here you'll be presented with your remote branches (git branch -r) so you can choose which one you want to deploy the stage you are creating.
|
81
|
+
|
82
|
+
1. **Type the domains to use**
|
83
|
+
|
84
|
+
You can pass comma separated domains you want to use in the application
|
85
|
+
|
86
|
+
1. **Type the server ur to deploy to**
|
87
|
+
|
88
|
+
Set the server where you are going to deploy this stage
|
89
|
+
|
90
|
+
1. **Do you want to add rbenv-vars to the server now?**
|
91
|
+
|
92
|
+
If you choose 'y'es you wil able to create a `.rbenv-vars` file in the server with the KEYS and VALUES you choose from your local `.rbenv-vars`
|
93
|
+
|
94
|
+
The `stage add` command will create the stage configuration file and run the `rbenv:vars:add` capistrano task if you chosen to add environmental variables to the applicatin
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
project_root
|
98
|
+
+--- config
|
99
|
+
+--- deploy
|
100
|
+
+--- production.rb # Specific settings for production server
|
101
|
+
```
|
102
|
+
|
103
|
+
1. In the `Capfile` you can enable and disabled the tasks you need in your application. You only have to comment out the stuff you don't need.
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
# Node
|
107
|
+
require 'capistrano/nodenv'
|
108
|
+
# require 'capistrano/bower'
|
109
|
+
|
110
|
+
# App server
|
111
|
+
require 'capistrano3/unicorn'
|
112
|
+
|
113
|
+
# Static server
|
114
|
+
require 'capistrano/nginx'
|
115
|
+
```
|
116
|
+
|
117
|
+
1. Configure your specific settings in the files created above
|
118
|
+
|
119
|
+
1. Common settings for all stages `deploy.rb`
|
120
|
+
|
121
|
+
Here you can add all the settings that are common to all the stage severs. For example:
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
set :unicorn_workers, 1
|
125
|
+
set :unicorn_workers_timeout, 30
|
126
|
+
```
|
127
|
+
|
128
|
+
|
129
|
+
1. Per-stage settings `staging.rb` `production.rb`
|
130
|
+
|
131
|
+
Here you can add all the settings that are specific to the stage. For example:
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
set :branch, "production" # Optional, defaults to master
|
135
|
+
|
136
|
+
set :rails_env, "production"
|
137
|
+
```
|
138
|
+
|
139
|
+
1. Commit and push the changes to the repository
|
140
|
+
|
141
|
+
## Deploy you application
|
142
|
+
|
143
|
+
To deploy your application you just need to run capistrano task to do so.
|
144
|
+
|
145
|
+
```shell
|
146
|
+
$ cap staging deploy # to deploy to the staging stage
|
147
|
+
```
|
148
|
+
|
149
|
+
## Contributing
|
150
|
+
|
151
|
+
1. Fork it
|
152
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
153
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
154
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
155
|
+
5. Create new Pull Request
|
156
|
+
|
157
|
+
## Credits
|
158
|
+
|
159
|
+
Thank you [contributors](https://github.com/platanus/negroku/graphs/contributors)!
|
160
|
+
|
161
|
+
<img src="http://platan.us/gravatar_with_text.png" alt="Platanus" width="250"/>
|
162
|
+
|
163
|
+
negroku is maintained by [platanus](http://platan.us).
|
164
|
+
|
165
|
+
## License
|
166
|
+
|
167
|
+
Guides is © 2014 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.
|
@@ -24,7 +24,7 @@ set :deploy_to, "/home/deploy/applications/#{fetch(:application)}"
|
|
24
24
|
# set :linked_files, fetch(:linked_files, []) + %w{}
|
25
25
|
|
26
26
|
# Default value for linked_dirs is []
|
27
|
-
# set :linked_dirs, fetch(:linked_dirs, []) + %w{
|
27
|
+
# set :linked_dirs, fetch(:linked_dirs, []) + %w{log tmp/pids tmp/cache tmp/sockets public/system}
|
28
28
|
|
29
29
|
######################
|
30
30
|
# Unicorn
|
data/lib/negroku/version.rb
CHANGED
data/negroku.gemspec
CHANGED
@@ -12,9 +12,6 @@ spec = Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split($/)
|
14
14
|
s.require_paths << 'lib'
|
15
|
-
s.has_rdoc = true
|
16
|
-
s.extra_rdoc_files = ['README.rdoc','negroku.rdoc']
|
17
|
-
s.rdoc_options << '--title' << 'negroku' << '--main' << 'README.rdoc' << '-ri'
|
18
15
|
s.bindir = 'bin'
|
19
16
|
s.executables << 'negroku'
|
20
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: negroku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Ignacio Donoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -282,16 +282,14 @@ email: jidonoso@gmail.com
|
|
282
282
|
executables:
|
283
283
|
- negroku
|
284
284
|
extensions: []
|
285
|
-
extra_rdoc_files:
|
286
|
-
- README.rdoc
|
287
|
-
- negroku.rdoc
|
285
|
+
extra_rdoc_files: []
|
288
286
|
files:
|
289
287
|
- .gitignore
|
290
288
|
- .rspec
|
289
|
+
- .travis.yml
|
291
290
|
- Gemfile
|
292
291
|
- LICENSE.txt
|
293
292
|
- README.md
|
294
|
-
- README.rdoc
|
295
293
|
- Rakefile
|
296
294
|
- bin/negroku
|
297
295
|
- lib/negroku.rb
|
@@ -330,7 +328,6 @@ files:
|
|
330
328
|
- lib/negroku/templates/tasks/unicorn_rails_activerecord.rb.erb
|
331
329
|
- lib/negroku/version.rb
|
332
330
|
- negroku.gemspec
|
333
|
-
- negroku.rdoc
|
334
331
|
- spec/lib/cli/bootstrap_spec.rb
|
335
332
|
- spec/lib/cli/env_spec.rb
|
336
333
|
- spec/lib/cli/stage_spec.rb
|
@@ -339,12 +336,7 @@ homepage: http://github.com/platanus/negroku
|
|
339
336
|
licenses: []
|
340
337
|
metadata: {}
|
341
338
|
post_install_message:
|
342
|
-
rdoc_options:
|
343
|
-
- --title
|
344
|
-
- negroku
|
345
|
-
- --main
|
346
|
-
- README.rdoc
|
347
|
-
- -ri
|
339
|
+
rdoc_options: []
|
348
340
|
require_paths:
|
349
341
|
- lib
|
350
342
|
- lib
|
data/README.rdoc
DELETED