ec2onrails 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +27 -1
- data/lib/ec2onrails/recipes.rb +85 -39
- data/lib/ec2onrails/version.rb +3 -3
- data/website/index.html +10 -12
- data/website/index.txt +7 -9
- metadata +4 -4
data/History.txt
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
== 0.9.7 2008-03-03
|
2
|
+
|
3
|
+
* ami-5c0aef35 (32-bit) and ami-540aef3d (64-bit)
|
4
|
+
* memcached installed, and capistrano tasks now support a new role named "memcache". Memcached won't run on hosts that aren't in the "memcache" role.
|
5
|
+
* New Capistrano task ec2onrails:get_public_key_from_server to copy the public key file from the server before first use.
|
6
|
+
* cap ec2onrails:server:install_gems can now install a specific version of a gem instead of the latest (use "gemname -v version" instead of "gemname" in deploy.rb)
|
7
|
+
* Now automatically runs hourly, daily, weekly and monthly scripts in current application's script directory, they run as "app" user, with $RAILS_ENV set.
|
8
|
+
* Support for different named rails environments (e.g. "production", "staging1", "staging2"), the current environment name is defined in /etc/mongrel_cluster/app.yml
|
9
|
+
* s3.yml now supports multiple sections for different rails environment names
|
10
|
+
* cap ec2onrails:server:upgrade_gems now does "gem update --system"
|
11
|
+
* Added admin user to adm group to allow read access to syslog without using sudo
|
12
|
+
* Added "sudoers" group, if you add named administrator accounts, add them to this group
|
13
|
+
* Set PATH and RUBYLIB in /etc/environment, removed and disabled $HOME/.ssh/environment because it's no longer necessary
|
14
|
+
* Fixed bug #16423: "hostname defined in deploy.rb shouldn't have to match what the instance thinks it's hostname is"
|
15
|
+
* Removed rfacebook gem
|
16
|
+
|
17
|
+
|
1
18
|
== 0.9.6 2007-12-21
|
2
19
|
|
3
20
|
* ami-e620c58f (32-bit) and ami-f920c590 (64-bit)
|
@@ -5,12 +22,14 @@
|
|
5
22
|
* Fixed server:install_gems task, issue #16006
|
6
23
|
* Fixed db:set_root_password task for Capistrano 2.1, issue #15256
|
7
24
|
* Fixed apache config to remove warning on restart, issue #16213
|
25
|
+
* Now includes Rails 2.0.1 as well as 1.2.6
|
8
26
|
* Removed dependency on tar for server:deploy_files task, now using all-ruby tar lib
|
9
27
|
* Rotate logs (including rails production.log) and archive to S3 daily
|
10
28
|
* Symlink all log files in /mnt/log from /var/log so that programs (e.g. logwatch) that expect them to be in /var/log still work
|
11
29
|
* New script to archive any file to s3
|
12
30
|
* New command-line flags on s3 archive & restore scripts
|
13
31
|
|
32
|
+
|
14
33
|
== 0.9.5 2007-10-28
|
15
34
|
|
16
35
|
* ami-86c025ef (32-bit) and ami-99c025f0 (64-bit)
|
@@ -18,11 +37,12 @@
|
|
18
37
|
* Fixed rebundling.
|
19
38
|
* Generates new ssh keys on first startup
|
20
39
|
|
40
|
+
|
21
41
|
== 0.9.4 2007-10-25
|
22
42
|
|
23
43
|
* ami-ecc12485 (32-bit) and ami-efc12486 (64-bit)
|
24
44
|
* This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
|
25
|
-
* _The rebundling doesn't seem to be working._ I'll fix that in a new version. Details
|
45
|
+
* _The rebundling doesn't seem to be working._ I'll fix that in a new version. Details at http://rubyforge.org/tracker/?func=detail&aid=15047&group_id=4552&atid=17558
|
26
46
|
* Ubuntu 7.10/Gutsy
|
27
47
|
* Experimental multiple instance support.
|
28
48
|
** *Mongrel & MySQL now listen on all ports.* Be sure your firewall settings are correct, and set a MySQL root password.
|
@@ -35,6 +55,7 @@
|
|
35
55
|
* syslog now logs to /mnt/log.
|
36
56
|
* Build now cleans apt cache, image is now 1/2 the size.
|
37
57
|
|
58
|
+
|
38
59
|
== 0.9.3 2007-10-06
|
39
60
|
|
40
61
|
* ami-a3f91cca
|
@@ -45,18 +66,21 @@
|
|
45
66
|
* Fixed missing /etc/mongrel_cluster
|
46
67
|
* Installed more ruby standard lib packages
|
47
68
|
|
69
|
+
|
48
70
|
== 0.9.2 2007-09-13
|
49
71
|
|
50
72
|
* ami-0cf61365
|
51
73
|
* This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
|
52
74
|
* Fixed missing kernel modules
|
53
75
|
|
76
|
+
|
54
77
|
== 0.9.1 2007-09-11
|
55
78
|
|
56
79
|
* ami-99f712f0
|
57
80
|
* This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
|
58
81
|
* Fixed permissions on /var/lib/dhcp3
|
59
82
|
|
83
|
+
|
60
84
|
== 0.9.0 2007-09-07
|
61
85
|
|
62
86
|
* ami-bdf411d4
|
@@ -65,6 +89,7 @@
|
|
65
89
|
* Removed "http://packages.ubuntu.com/feisty/libs/sun-java6-jre":Java and it's massive list of dependencies because it was only needed for the EC2 API tools. This saved a huge amount of space.
|
66
90
|
* Removed ImageMagick, RMagick and hpricot due to popular demand. There will soon be cap2 tasks to customize which packages and gems are installed.
|
67
91
|
|
92
|
+
|
68
93
|
== 0.8.1 2007-07-29
|
69
94
|
|
70
95
|
* ami-b79a7fde
|
@@ -74,6 +99,7 @@
|
|
74
99
|
* Added empty /etc/apache2/sites-available/app.custom for custom Apache configuration in a separate file (so it can be deployed by rsync more easily).
|
75
100
|
* Added ImageMagick, RMagick and hpricot due to popular demand.
|
76
101
|
|
102
|
+
|
77
103
|
== 0.8.0 2007-06-20
|
78
104
|
|
79
105
|
* ami-4e907527
|
data/lib/ec2onrails/recipes.rb
CHANGED
@@ -87,6 +87,34 @@ Capistrano::Configuration.instance.load do
|
|
87
87
|
puts "64-bit server image for EC2 on Rails #{ec2onrails_version}: #{image_id_64_bit}"
|
88
88
|
end
|
89
89
|
|
90
|
+
desc <<-DESC
|
91
|
+
Copies the public key from the server using the external "ssh"
|
92
|
+
command because Net::SSH, which is used by Capistrano, needs it.
|
93
|
+
This will only work if you have an ssh command in the path.
|
94
|
+
If Capistrano can successfully connect to your EC2 instance you
|
95
|
+
don't need to do this. It will copy from the first server in the
|
96
|
+
:app role, this can be overridden by specifying the HOST
|
97
|
+
environment variable
|
98
|
+
DESC
|
99
|
+
task :get_public_key_from_server do
|
100
|
+
host = find_servers_for_task(current_task).first.host
|
101
|
+
privkey = ssh_options[:keys][0]
|
102
|
+
pubkey = "#{privkey}.pub"
|
103
|
+
msg = <<-MSG
|
104
|
+
Your first key in ssh_options[:keys] is #{privkey}, presumably that's
|
105
|
+
your EC2 private key. The public key will be copied from the server
|
106
|
+
named '#{host}' and saved locally as #{pubkey}. Continue? [y/n]
|
107
|
+
MSG
|
108
|
+
choice = nil
|
109
|
+
while choice != "y" && choice != "n"
|
110
|
+
choice = Capistrano::CLI.ui.ask(msg).downcase
|
111
|
+
msg = "Please enter 'y' or 'n'."
|
112
|
+
end
|
113
|
+
if choice == "y"
|
114
|
+
run_local "scp -i '#{privkey}' app@#{host}:.ssh/authorized_keys #{pubkey}"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
90
118
|
desc <<-DESC
|
91
119
|
Start a new server instance and prepare it for a cold deploy.
|
92
120
|
DESC
|
@@ -96,6 +124,7 @@ Capistrano::Configuration.instance.load do
|
|
96
124
|
server.install_packages
|
97
125
|
server.install_gems
|
98
126
|
server.deploy_files
|
127
|
+
server.set_rails_env
|
99
128
|
server.restart_services
|
100
129
|
deploy.setup
|
101
130
|
server.set_roles
|
@@ -116,7 +145,6 @@ Capistrano::Configuration.instance.load do
|
|
116
145
|
|
117
146
|
namespace :ec2 do
|
118
147
|
desc <<-DESC
|
119
|
-
Start an instance, using the AMI of the correct version to match this gem.
|
120
148
|
DESC
|
121
149
|
task :start_instance, :roles => [:web, :db, :app] do
|
122
150
|
# TODO
|
@@ -131,26 +159,26 @@ Capistrano::Configuration.instance.load do
|
|
131
159
|
|
132
160
|
namespace :db do
|
133
161
|
desc <<-DESC
|
134
|
-
[internal] Load configuration info for the
|
162
|
+
[internal] Load configuration info for the database from
|
135
163
|
config/database.yml.
|
136
164
|
DESC
|
137
165
|
task :load_config, :roles => :db do
|
138
|
-
db_config = YAML::load(ERB.new(File.read("config/database.yml")).result)[
|
139
|
-
cfg[:
|
140
|
-
cfg[:
|
141
|
-
cfg[:
|
142
|
-
cfg[:
|
143
|
-
cfg[:
|
166
|
+
db_config = YAML::load(ERB.new(File.read("config/database.yml")).result)[rails_env]
|
167
|
+
cfg[:db_name] = db_config['database']
|
168
|
+
cfg[:db_user] = db_config['username']
|
169
|
+
cfg[:db_password] = db_config['password']
|
170
|
+
cfg[:db_host] = db_config['host']
|
171
|
+
cfg[:db_socket] = db_config['socket']
|
144
172
|
|
145
|
-
if (cfg[:
|
146
|
-
(cfg[:
|
147
|
-
(cfg[:
|
148
|
-
raise "ERROR: missing database config. Make sure database.yml contains a '
|
173
|
+
if (cfg[:db_host].nil? || cfg[:db_host].empty?) &&
|
174
|
+
(cfg[:db_host] != 'localhost' || cfg[:db_host] != '127.0.0.1') &&
|
175
|
+
(cfg[:db_socket].nil? || cfg[:db_socket].empty?)
|
176
|
+
raise "ERROR: missing database config. Make sure database.yml contains a '#{rails_env}' section with either 'host: localhost' or 'socket: /var/run/mysqld/mysqld.sock'."
|
149
177
|
end
|
150
178
|
|
151
|
-
[cfg[:
|
179
|
+
[cfg[:db_name], cfg[:db_user], cfg[:db_password]].each do |s|
|
152
180
|
if s.nil? || s.empty?
|
153
|
-
raise "ERROR: missing database config. Make sure database.yml contains a '
|
181
|
+
raise "ERROR: missing database config. Make sure database.yml contains a '#{rails_env}' section with a database name, user, and password."
|
154
182
|
elsif s.match(/['"]/)
|
155
183
|
raise "ERROR: database config string '#{s}' contains quotes."
|
156
184
|
end
|
@@ -158,25 +186,25 @@ Capistrano::Configuration.instance.load do
|
|
158
186
|
end
|
159
187
|
|
160
188
|
desc <<-DESC
|
161
|
-
Create the MySQL
|
189
|
+
Create the MySQL database. Assumes there is no MySQL root \
|
162
190
|
password. To create a MySQL root password create a task that's run \
|
163
191
|
after this task using an after hook.
|
164
192
|
DESC
|
165
193
|
task :create, :roles => :db do
|
166
194
|
on_rollback { drop }
|
167
195
|
load_config
|
168
|
-
run "echo 'create database #{cfg[:
|
169
|
-
run "echo \"grant all on #{cfg[:
|
196
|
+
run "echo 'create database if not exists #{cfg[:db_name]};' | mysql -u root"
|
197
|
+
run "echo \"grant all on #{cfg[:db_name]}.* to '#{cfg[:db_user]}'@'%' identified by '#{cfg[:db_password]}';\" | mysql -u root"
|
170
198
|
end
|
171
199
|
|
172
200
|
desc <<-DESC
|
173
|
-
Drop the MySQL
|
201
|
+
Drop the MySQL database. Assumes there is no MySQL root \
|
174
202
|
password. If there is a MySQL root password, create a task that removes \
|
175
203
|
it and run that task before this one using a before hook.
|
176
204
|
DESC
|
177
205
|
task :drop, :roles => :db do
|
178
206
|
load_config
|
179
|
-
run "echo 'drop database if exists #{cfg[:
|
207
|
+
run "echo 'drop database if exists #{cfg[:db_name]};' | mysql -u root"
|
180
208
|
end
|
181
209
|
|
182
210
|
desc <<-DESC
|
@@ -224,7 +252,18 @@ Capistrano::Configuration.instance.load do
|
|
224
252
|
DESC
|
225
253
|
task :set_roles, :roles => [:web_admin, :db_admin, :app_admin] do
|
226
254
|
# TODO generate this based on the roles that actually exist so arbitrary new ones can be added
|
227
|
-
sudo "/usr/local/ec2onrails/bin/set_roles.rb web=#{hostnames_for_role(:web)} app=#{hostnames_for_role(:app)} db_primary=#{hostnames_for_role(:db, :primary => true)}"
|
255
|
+
sudo "/usr/local/ec2onrails/bin/set_roles.rb web=#{hostnames_for_role(:web)} app=#{hostnames_for_role(:app)} db_primary=#{hostnames_for_role(:db, :primary => true)} memcache=#{hostnames_for_role(:memcache)}"
|
256
|
+
end
|
257
|
+
|
258
|
+
desc <<-DESC
|
259
|
+
Change the default value of RAILS_ENV on the server. Technically
|
260
|
+
this changes the server's mongrel config to use a different value
|
261
|
+
for "environment". The value is specified in :rails_env
|
262
|
+
DESC
|
263
|
+
task :set_rails_env, :roles => [:web_admin, :db_admin, :app_admin] do
|
264
|
+
rails_env = fetch(:rails_env, "production")
|
265
|
+
sudo "/usr/local/ec2onrails/bin/set_rails_env #{rails_env}"
|
266
|
+
deploy.restart
|
228
267
|
end
|
229
268
|
|
230
269
|
desc <<-DESC
|
@@ -239,7 +278,19 @@ Capistrano::Configuration.instance.load do
|
|
239
278
|
Upgrade to the newest versions of all rubygems.
|
240
279
|
DESC
|
241
280
|
task :upgrade_gems, :roles => [:web_admin, :db_admin, :app_admin] do
|
242
|
-
sudo "gem update
|
281
|
+
sudo "gem update --system --no-rdoc --no-ri"
|
282
|
+
sudo "gem update -y --no-rdoc --no-ri" do |ch, str, data|
|
283
|
+
ch[:data] ||= ""
|
284
|
+
ch[:data] << data
|
285
|
+
if data =~ />\s*$/
|
286
|
+
puts data
|
287
|
+
choice = Capistrano::CLI.ui.ask("The gem command is asking for a number:")
|
288
|
+
ch.send_data("#{choice}\n")
|
289
|
+
else
|
290
|
+
puts data
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
243
294
|
end
|
244
295
|
|
245
296
|
desc <<-DESC
|
@@ -248,7 +299,7 @@ Capistrano::Configuration.instance.load do
|
|
248
299
|
NOTE: the package installation will be non-interactive, if the packages \
|
249
300
|
require configuration either log in as 'admin' and run \
|
250
301
|
'dpkg-reconfigure packagename' or replace the package's config files \
|
251
|
-
using the 'ec2onrails:
|
302
|
+
using the 'ec2onrails:server:deploy_files' task.
|
252
303
|
DESC
|
253
304
|
task :install_packages, :roles => [:web_admin, :db_admin, :app_admin] do
|
254
305
|
if cfg[:packages] && cfg[:packages].any?
|
@@ -261,17 +312,18 @@ Capistrano::Configuration.instance.load do
|
|
261
312
|
be with an array of strings.
|
262
313
|
DESC
|
263
314
|
task :install_gems, :roles => [:web_admin, :db_admin, :app_admin] do
|
264
|
-
if cfg[:rubygems]
|
265
|
-
|
266
|
-
ch
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
315
|
+
if cfg[:rubygems]
|
316
|
+
cfg[:rubygems].each do |gem|
|
317
|
+
sudo "gem install #{gem} -y --no-rdoc --no-ri" do |ch, str, data|
|
318
|
+
ch[:data] ||= ""
|
319
|
+
ch[:data] << data
|
320
|
+
if data =~ />\s*$/
|
321
|
+
puts data
|
322
|
+
choice = Capistrano::CLI.ui.ask("The gem command is asking for a number:")
|
323
|
+
ch.send_data("#{choice}\n")
|
324
|
+
else
|
325
|
+
puts data
|
326
|
+
end
|
275
327
|
end
|
276
328
|
end
|
277
329
|
end
|
@@ -356,12 +408,6 @@ Capistrano::Configuration.instance.load do
|
|
356
408
|
task :run_script, :roles => [:web_admin, :db_admin, :app_admin] do
|
357
409
|
# TODO
|
358
410
|
end
|
359
|
-
|
360
|
-
desc <<-DESC
|
361
|
-
DESC
|
362
|
-
task :archive_logs, :roles => [:web_admin, :db_admin, :app_admin] do
|
363
|
-
# TODO
|
364
|
-
end
|
365
411
|
end
|
366
412
|
|
367
413
|
end
|
data/lib/ec2onrails/version.rb
CHANGED
@@ -20,10 +20,10 @@ module Ec2onrails #:nodoc:
|
|
20
20
|
module VERSION #:nodoc:
|
21
21
|
MAJOR = 0
|
22
22
|
MINOR = 9
|
23
|
-
TINY =
|
23
|
+
TINY = 7
|
24
24
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
25
25
|
|
26
|
-
AMI_ID_32_BIT = 'ami-
|
27
|
-
AMI_ID_64_BIT = 'ami-
|
26
|
+
AMI_ID_32_BIT = 'ami-5c0aef35'
|
27
|
+
AMI_ID_64_BIT = 'ami-540aef3d'
|
28
28
|
end
|
29
29
|
end
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>EC2 on Rails</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ec2onrails"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/ec2onrails" class="numbers">0.9.
|
36
|
+
<a href="http://rubyforge.org/projects/ec2onrails" class="numbers">0.9.7</a>
|
37
37
|
</div>
|
38
38
|
<h2>Deploy a Ruby on Rails app on <span class="caps">EC2</span> in five minutes</h2>
|
39
39
|
|
@@ -67,6 +67,7 @@ your Rails app.</p>
|
|
67
67
|
<li>Amazon <span class="caps">AMI</span> tools installed</li>
|
68
68
|
<li>A script to rebundle a customized version of the image in one step if required</li>
|
69
69
|
<li>MySQL, Apache, and syslog configured to use /mnt for data and logging so you don’t fill up <span class="caps">EC2</span>’s small root filesystem</li>
|
70
|
+
<li>Automatically archives Rails and Apache logs to S3 nightly.</li>
|
70
71
|
<li>32-bit and 64-bit images available (supports all instance types, small to extra large).</li>
|
71
72
|
<li>Created using a build file, full source is available.</li>
|
72
73
|
<li>Multiple instance support.</li>
|
@@ -144,16 +145,10 @@ If you’re using multiple instances, be sure to allow them network access t
|
|
144
145
|
But for some reason Capistrano requires that you have both the public key and the private key files together on the client.</p>
|
145
146
|
|
146
147
|
|
147
|
-
<p>
|
148
|
-
You can copy it from the server using scp like this:</p>
|
148
|
+
<p>From within the root of your rails app do:</p>
|
149
149
|
|
150
150
|
|
151
|
-
<pre>
|
152
|
-
|
153
|
-
<p>This uses scp to connect to the server using your private key. It copies the file “authorized_keys” from /home/admin/.ssh/ and
|
154
|
-
saves it in your .ssh dir. So after this you should have two files, one named “yourkey” (this is your private key) and one
|
155
|
-
named (yourkey.pub), this is your public key.</p>
|
156
|
-
|
151
|
+
<pre>cap ec2onrails:get_public_key_from_server</pre>
|
157
152
|
|
158
153
|
<h4>6. Deploy the app with Capistrano</h4>
|
159
154
|
|
@@ -165,10 +160,10 @@ cap deploy:migrations
|
|
165
160
|
|
166
161
|
<p>Yes, it’s that easy! The setup task will set the server’s timezone, install any
|
167
162
|
gems and Ubuntu packages that you specified in the config file, and
|
168
|
-
create your
|
163
|
+
create your database.</p>
|
169
164
|
|
170
165
|
|
171
|
-
<p>That’s it,
|
166
|
+
<p>That’s it, your app is now running on <span class="caps">EC2</span>!!</p>
|
172
167
|
|
173
168
|
|
174
169
|
<h2>Capistrano tasks</h2>
|
@@ -234,6 +229,9 @@ bucket and deploy the app, useful to set up a staging server.</li>
|
|
234
229
|
</ul>
|
235
230
|
|
236
231
|
|
232
|
+
<p>To get a full list of the Capistrano tasks at any time type <code>cap -T</code> from with your rails app root.</p>
|
233
|
+
|
234
|
+
|
237
235
|
<h2>Saving your own customized version of the image.</h2>
|
238
236
|
|
239
237
|
|
@@ -312,7 +310,7 @@ or send me an <a href="http://pauldowman.com/contact/">email</a>.</p>
|
|
312
310
|
|
313
311
|
<p>This code is free to use under the terms of the <span class="caps">GPL</span> v2.</p>
|
314
312
|
<p class="coda">
|
315
|
-
<a href="http://pauldowman.com/contact/">Paul Dowman</a>,
|
313
|
+
<a href="http://pauldowman.com/contact/">Paul Dowman</a>, 2nd March 2008<br>
|
316
314
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
317
315
|
</p>
|
318
316
|
</div>
|
data/website/index.txt
CHANGED
@@ -27,6 +27,7 @@ Features of the EC2 image:
|
|
27
27
|
* Amazon AMI tools installed
|
28
28
|
* A script to rebundle a customized version of the image in one step if required
|
29
29
|
* MySQL, Apache, and syslog configured to use /mnt for data and logging so you don't fill up EC2's small root filesystem
|
30
|
+
* Automatically archives Rails and Apache logs to S3 nightly.
|
30
31
|
* 32-bit and 64-bit images available (supports all instance types, small to extra large).
|
31
32
|
* Created using a build file, full source is available.
|
32
33
|
* Multiple instance support.
|
@@ -89,14 +90,9 @@ h4. 5. Copy your public key from the server to keep Capistrano happy
|
|
89
90
|
Technically all you should need to connect to the server is the private key file, the public key is on the server.
|
90
91
|
But for some reason Capistrano requires that you have both the public key and the private key files together on the client.
|
91
92
|
|
92
|
-
|
93
|
-
You can copy it from the server using scp like this:
|
93
|
+
From within the root of your rails app do:
|
94
94
|
|
95
|
-
<pre>
|
96
|
-
|
97
|
-
This uses scp to connect to the server using your private key. It copies the file "authorized_keys" from /home/admin/.ssh/ and
|
98
|
-
saves it in your .ssh dir. So after this you should have two files, one named "yourkey" (this is your private key) and one
|
99
|
-
named (yourkey.pub), this is your public key.
|
95
|
+
<pre>cap ec2onrails:get_public_key_from_server</pre>
|
100
96
|
|
101
97
|
|
102
98
|
h4. 6. Deploy the app with Capistrano
|
@@ -108,9 +104,9 @@ cap deploy:migrations
|
|
108
104
|
|
109
105
|
Yes, it's that easy! The setup task will set the server's timezone, install any
|
110
106
|
gems and Ubuntu packages that you specified in the config file, and
|
111
|
-
create your
|
107
|
+
create your database.
|
112
108
|
|
113
|
-
That's it,
|
109
|
+
That's it, your app is now running on EC2!!
|
114
110
|
|
115
111
|
h2. Capistrano tasks
|
116
112
|
|
@@ -158,6 +154,8 @@ step, everything except deploying the app.
|
|
158
154
|
- Another convenience task to recreate the db, restore data to it from an s3
|
159
155
|
bucket and deploy the app, useful to set up a staging server.
|
160
156
|
|
157
|
+
To get a full list of the Capistrano tasks at any time type <code>cap -T</code> from with your rails app root.
|
158
|
+
|
161
159
|
|
162
160
|
h2. Saving your own customized version of the image.
|
163
161
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2onrails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
5
|
-
platform:
|
4
|
+
version: 0.9.7
|
5
|
+
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Dowman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2008-03-03 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements: []
|
102
102
|
|
103
103
|
rubyforge_project: ec2onrails
|
104
|
-
rubygems_version: 0.
|
104
|
+
rubygems_version: 1.0.1
|
105
105
|
signing_key:
|
106
106
|
specification_version: 2
|
107
107
|
summary: Client-side libraries (Capistrano tasks) for managing and deploying to EC2 on Rails servers.
|