recipiez 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/recipiez/version.rb +1 -1
- data/recipes/deployment_recipiez.rb +28 -0
- metadata +53 -37
- checksums.yaml +0 -7
data/lib/recipiez/version.rb
CHANGED
@@ -133,6 +133,34 @@ namespace :recipiez do
|
|
133
133
|
run "rm #{filename}"
|
134
134
|
end
|
135
135
|
|
136
|
+
desc "Dump database structure only, copy it across and restore locally."
|
137
|
+
task :pull_structure do
|
138
|
+
set_variables_from_yaml
|
139
|
+
archive = generate_archive(application)
|
140
|
+
filename = get_filename(application)
|
141
|
+
cmd = "mysqldump --opt --skip-add-locks -u #{db_user} "
|
142
|
+
cmd += " -d -h #{db_host} " if exists?('db_host')
|
143
|
+
cmd += " -p#{db_password} "
|
144
|
+
cmd += "#{database_to_dump} > #{archive}"
|
145
|
+
result = run(cmd)
|
146
|
+
|
147
|
+
cmd = "rsync -av -e \"ssh -p #{ssh_options[:port]} #{get_identities}\" #{user}@#{roles[:db].servers.first}:#{archive} #{dump_dir}#{filename}"
|
148
|
+
puts "running #{cmd}"
|
149
|
+
result = system(cmd)
|
150
|
+
puts result
|
151
|
+
run "rm #{archive}"
|
152
|
+
|
153
|
+
puts "Restoring db"
|
154
|
+
begin
|
155
|
+
`mysqladmin -u#{db_local_user} -p#{db_local_password} --force drop #{db_dev}`
|
156
|
+
rescue
|
157
|
+
# do nothing
|
158
|
+
end
|
159
|
+
`mysqladmin -u#{db_local_user} -p#{db_local_password} --force create #{db_dev}`
|
160
|
+
`cat #{dump_dir}#{get_filename(application)} | mysql -u#{db_local_user} -p#{db_local_password} #{db_dev}`
|
161
|
+
puts "All done!"
|
162
|
+
end
|
163
|
+
|
136
164
|
|
137
165
|
desc "Create database, user and priviledges NB: Requires db_root_password"
|
138
166
|
task :setup do
|
metadata
CHANGED
@@ -1,37 +1,44 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: recipiez
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 5
|
8
|
+
- 3
|
9
|
+
version: 0.5.3
|
5
10
|
platform: ruby
|
6
|
-
authors:
|
11
|
+
authors:
|
7
12
|
- Alastair Brunton
|
8
13
|
autorequire:
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
16
|
+
|
17
|
+
date: 2013-07-01 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
14
21
|
name: tinder
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
22
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
description: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
|
33
|
+
email:
|
30
34
|
- info@simplyexcited.co.uk
|
31
35
|
executables: []
|
36
|
+
|
32
37
|
extensions: []
|
38
|
+
|
33
39
|
extra_rdoc_files: []
|
34
|
-
|
40
|
+
|
41
|
+
files:
|
35
42
|
- .gitignore
|
36
43
|
- MIT-LICENSE
|
37
44
|
- README.md
|
@@ -68,28 +75,37 @@ files:
|
|
68
75
|
- recipes/tolk.rb
|
69
76
|
- recipiez.gemspec
|
70
77
|
- release_gem.sh
|
78
|
+
has_rdoc: true
|
71
79
|
homepage: http://github.com/pyrat/deployment_recipiez
|
72
80
|
licenses: []
|
73
|
-
|
81
|
+
|
74
82
|
post_install_message:
|
75
83
|
rdoc_options: []
|
76
|
-
|
84
|
+
|
85
|
+
require_paths:
|
77
86
|
- lib
|
78
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
segments:
|
99
|
+
- 1
|
100
|
+
- 3
|
101
|
+
- 1
|
87
102
|
version: 1.3.1
|
88
103
|
requirements: []
|
104
|
+
|
89
105
|
rubyforge_project:
|
90
|
-
rubygems_version:
|
106
|
+
rubygems_version: 1.3.6
|
91
107
|
signing_key:
|
92
|
-
specification_version:
|
93
|
-
summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab,
|
94
|
-
Monit, NodeJS, Nginx
|
108
|
+
specification_version: 3
|
109
|
+
summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
|
95
110
|
test_files: []
|
111
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: d33cb7ff46ca4d18a0668c7ec9d540e904c23556
|
4
|
-
data.tar.gz: 004b1d2e4ab4eaee549c6b4eaf1db1aa4cc97256
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: cdcdaad0ab86486604abcc7c76f7e3578aafafe7b7eab0a413bdb2ae16bb219dc40510008d1e40ff7ad560c4b6df153dfe26619174f3df9fe4d1c7eba7cc5f32
|
7
|
-
data.tar.gz: eed2dfb648b071145c33dacd2b6a135d4d81be3bde0712133191b714734420887d63db56fa0c370ef5bae413d59913ff3901d0a60e03fedc653c891360a5d2d0
|