deploy_mate 0.18 → 0.18.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 +1 -0
- data/deploy-mate.gemspec +1 -1
- data/lib/capistrano/tasks/machine.rake +9 -11
- data/lib/deploy_mate/tasks.rake +19 -14
- data/lib/deploy_mate/templates/deploy.rb.erb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8a1c17d990ca37d1330258385fca3b2197ab656
|
4
|
+
data.tar.gz: 162e91f90cc01f3a9384d17bad97034177dc554c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9269bce666c20f07e473fa2679ba67466010969fff2631dea5202f54e416c76b683846246349b41a23c73fe235cdbb2ca33cc9c48444d9074c47a4916df74003
|
7
|
+
data.tar.gz: 476c9bad746e56bd82d2d60be897c66c72a04ef4a882c5511691629d648ccc2ca8ff9564d4e247a3833c1e61bf5c0bec0f9831d17b1cfe7926934544a0d70eb1
|
data/README.md
CHANGED
@@ -29,6 +29,7 @@ It uses the following Capistrano-roles to divide the installed components:
|
|
29
29
|
- **cronjobs**: [OPTIONAL] For environments where `whenever` should manage/run cronjobs
|
30
30
|
|
31
31
|
## Changelog
|
32
|
+
* **0.18.1 (2016-03-01)**: Added support for memcached
|
32
33
|
* **0.18 (2016-02-25)**: Added support for capistrano 3.4, Ask before overwriting existing config-files
|
33
34
|
* **2016-02-19**: Made selection of a deployed branch possible
|
34
35
|
* **2016-02-17**: Added support for puma as application server
|
data/deploy-mate.gemspec
CHANGED
@@ -22,6 +22,7 @@ namespace :machine do
|
|
22
22
|
invoke "machine:install:nodejs"
|
23
23
|
invoke "machine:install:elasticsearch"
|
24
24
|
invoke "machine:install:imagemagick" if fetch(:imagemagick)
|
25
|
+
invoke "machine:install:memcached" if fetch(:memcached)
|
25
26
|
invoke "machine:install:mysql_dev" if fetch(:db_engine) == "mysql"
|
26
27
|
invoke "machine:install:postgres_dev" if fetch(:db_engine) == "postgresql"
|
27
28
|
end
|
@@ -32,20 +33,13 @@ namespace :machine do
|
|
32
33
|
task :check_ubuntu_user do
|
33
34
|
on roles(:app) do
|
34
35
|
unless am_i?("ubuntu")
|
35
|
-
|
36
|
+
execute_script("create_ubuntu_user.sh") # Creates an Amazon AWS-style 'ubuntu'-user on machines with only 'root'
|
36
37
|
error "Please use a use a user named 'ubuntu' to login to the machine."
|
37
38
|
fail
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
42
|
-
desc "Creates an Amazon AWS-style 'ubuntu'-user on machines with only 'root'"
|
43
|
-
task :create_ubuntu_user do
|
44
|
-
on roles(:app) do
|
45
|
-
execute_script("create_ubuntu_user.sh")
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
43
|
desc "Install configs"
|
50
44
|
task :setup do
|
51
45
|
invoke "nginx:setup"
|
@@ -68,9 +62,7 @@ namespace :machine do
|
|
68
62
|
end
|
69
63
|
|
70
64
|
task :elasticsearch do
|
71
|
-
|
72
|
-
invoke 'elasticsearch:install'
|
73
|
-
end
|
65
|
+
invoke 'elasticsearch:install'
|
74
66
|
end
|
75
67
|
|
76
68
|
task :language_pack_de do
|
@@ -113,6 +105,12 @@ namespace :machine do
|
|
113
105
|
end
|
114
106
|
end
|
115
107
|
|
108
|
+
task :memcached do
|
109
|
+
on roles(:app) do
|
110
|
+
apt_get_install("memcached") unless is_package_installed?("memcached")
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
116
114
|
task :mysql_dev do
|
117
115
|
on roles(:app) do
|
118
116
|
apt_get_install("libmysqlclient-dev") unless is_package_installed?("libmysqlclient-dev")
|
data/lib/deploy_mate/tasks.rake
CHANGED
@@ -7,20 +7,21 @@ namespace :deploy_mate do
|
|
7
7
|
puts "I'm your DEPLOY_MATE."
|
8
8
|
puts "We will setting up your deployment now."
|
9
9
|
|
10
|
-
@app_name = ask("[01/
|
11
|
-
@stage_name = ask("[02/
|
12
|
-
@ssh_name = ask("[03/
|
13
|
-
@ruby_version = ask("[04/
|
14
|
-
@db_engine = ask_until("[05/
|
15
|
-
@app_server = ask_until("[06/
|
16
|
-
@repo_url = ask("[07/
|
17
|
-
@is_rails = yes_or_no?("[08/
|
18
|
-
@needs_imagemagick = yes_or_no?("[09/
|
19
|
-
@uses_sidekiq = yes_or_no?("[10/
|
20
|
-
@branch_name = ask("[11/
|
21
|
-
@host_name = ask("[12/
|
22
|
-
@environment = ask("[13/
|
23
|
-
@needs_elasticsearch = yes_or_no?("[14/
|
10
|
+
@app_name = ask("[01/15] App-Name (for nginx, servers, etc.)", guess_app_name)
|
11
|
+
@stage_name = ask("[02/15] Give the first stage a name", "prestage")
|
12
|
+
@ssh_name = ask("[03/15] SSH-Hostname for the server", "#{@app_name}-#{@stage_name}")
|
13
|
+
@ruby_version = ask("[04/15] Ruby-Version (the RVM-way, e.g. ruby-2.2.0)", guess_ruby_version)
|
14
|
+
@db_engine = ask_until("[05/15] What db are you using?", %w( postgresql mysql ), "mysql")
|
15
|
+
@app_server = ask_until("[06/15] What app server do you want to use?", %w( unicorn puma ), "unicorn")
|
16
|
+
@repo_url = ask("[07/15] Url-Location of git-repo", "git@github.com:hanseventures/#{@app_name}.git")
|
17
|
+
@is_rails = yes_or_no?("[08/15] Is this a RAILS project ?", (rails_present? ? "yes" : "no"))
|
18
|
+
@needs_imagemagick = yes_or_no?("[09/15] Does this project need ImageMagick ?", (needs_imagemagick? ? "yes" : "no"))
|
19
|
+
@uses_sidekiq = yes_or_no?("[10/15] Does this project use Sidekiq ?", (uses_sidekiq? ? "yes" : "no"))
|
20
|
+
@branch_name = ask("[11/15] Branch to deploy '#{@stage_name}' from", "dev")
|
21
|
+
@host_name = ask("[12/15] Web-URL for '#{@stage_name}'", "#{@stage_name}.#{@app_name}")
|
22
|
+
@environment = ask("[13/15] #{@stage_name}'s environment (RACK_ENV/RAILS_ENV)", "#{@stage_name}")
|
23
|
+
@needs_elasticsearch = yes_or_no?("[14/15] Do you need ElasticSearch on this machine ?", "no")
|
24
|
+
@needs_memcached = yes_or_no?("[15/15] Do you need Memcached on this machine ?", (needs_memcached? ? "yes" : "no"))
|
24
25
|
|
25
26
|
puts "Aye!"
|
26
27
|
puts "Worrrrking..."
|
@@ -55,6 +56,10 @@ def needs_imagemagick?
|
|
55
56
|
defined? RMagick || defined? MiniMagick
|
56
57
|
end
|
57
58
|
|
59
|
+
def needs_memcached?
|
60
|
+
defined? Dalli
|
61
|
+
end
|
62
|
+
|
58
63
|
def rails_present?
|
59
64
|
defined? Rails
|
60
65
|
end
|