ec2onrails 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,20 @@
1
+ == 0.9.4 2007-10-25
2
+
3
+ * ami-ecc12485 (32-bit) and ami-efc12486 (64-bit)
4
+ * This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
5
+ * _The rebundling doesn't seem to be working._ I'll fix that in a new version. Details "here":http://rubyforge.org/tracker/?func=detail&aid=15047&group_id=4552&atid=17558
6
+ * Ubuntu 7.10/Gutsy
7
+ * Experimental multiple instance support.
8
+ ** *Mongrel & MySQL now listen on all ports.* Be sure your firewall settings are correct, and set a MySQL root password.
9
+ * RDoc and RI not generated for installed gems.
10
+ * No longer upgrades packages & gems on ec2onrails:server:setup task.
11
+ * 32-bit and 64-bit images.
12
+ * EC2 AMI tools version 2007-08-29.
13
+ * NTP removed, it's no longer needed under Xen.
14
+ * MySQL data dir dirs now under /mnt.
15
+ * syslog now logs to /mnt/log.
16
+ * Build now cleans apt cache, image is now 1/2 the size.
17
+
1
18
  == 0.9.3 2007-10-06
2
19
 
3
20
  * Initial release
@@ -5,14 +5,24 @@ module Ec2onrails
5
5
  raise("error: #{$?}") unless result
6
6
  end
7
7
 
8
- def make_admin_role_for(role, newrole_sym)
8
+ def make_admin_role_for(role)
9
+ newrole = "#{role.to_s}_admin".to_sym
9
10
  roles[role].each do |srv_def|
10
11
  options = srv_def.options.dup
11
12
  options[:user] = "admin"
12
13
  options[:port] = srv_def.port
13
14
  options[:no_release] = true
14
- role newrole_sym, srv_def.host, options
15
+ role newrole, srv_def.host, options
15
16
  end
16
17
  end
18
+
19
+ # return hostnames for the role named role_sym. It must have the options given or no hostnames will be returned
20
+ def hostnames_for_role(role_sym, options = {})
21
+ role = roles[role_sym]
22
+ unless role
23
+ return []
24
+ end
25
+ role.reject{|s| s.options != options}.collect{|s| s.host}.join(',')
26
+ end
17
27
  end
18
28
  end
@@ -31,14 +31,16 @@ Capistrano::Configuration.instance.load do
31
31
 
32
32
  cfg = ec2onrails_config
33
33
 
34
- set :image_id, Ec2onrails::VERSION::AMI_ID
34
+ set :ec2onrails_version, Ec2onrails::VERSION::STRING
35
+ set :image_id_32_bit, Ec2onrails::VERSION::AMI_ID_32_BIT
36
+ set :image_id_64_bit, Ec2onrails::VERSION::AMI_ID_64_BIT
35
37
  set :deploy_to, "/mnt/app"
36
38
  set :use_sudo, false
37
39
  set :user, "app"
38
-
39
- make_admin_role_for(:web, :web_admin)
40
- make_admin_role_for(:app, :app_admin)
41
- make_admin_role_for(:db, :db_admin)
40
+
41
+ make_admin_role_for :web
42
+ make_admin_role_for :app
43
+ make_admin_role_for :db
42
44
 
43
45
  roles[:web_admin].to_s
44
46
  roles[:app_admin].to_s
@@ -48,30 +50,38 @@ Capistrano::Configuration.instance.load do
48
50
  namespace :deploy do
49
51
  desc <<-DESC
50
52
  Overrides the default Capistrano deploy:start, directly calls \
51
- /usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper
53
+ /etc/init.d/mongrel
52
54
  DESC
53
- task :start, :except => { :no_release => true } do
54
- run "/usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper start"
55
+ task :start, :roles => :app do
56
+ run "/etc/init.d/mongrel start"
55
57
  end
56
58
 
57
59
  desc <<-DESC
58
60
  Overrides the default Capistrano deploy:stop, directly calls \
59
- /usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper
61
+ /etc/init.d/mongrel
60
62
  DESC
61
- task :stop, :except => { :no_release => true } do
62
- run "/usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper stop"
63
+ task :stop, :roles => :app do
64
+ run "/etc/init.d/mongrel stop"
63
65
  end
64
66
 
65
67
  desc <<-DESC
66
68
  Overrides the default Capistrano deploy:restart, directly calls \
67
- /usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper
69
+ /etc/init.d/mongrel
68
70
  DESC
69
- task :restart, :except => { :no_release => true } do
70
- run "/usr/local/ec2onrails/bin/mongrel_cluster_ctl_wrapper restart"
71
+ task :restart, :roles => :app do
72
+ run "/etc/init.d/mongrel restart"
71
73
  end
72
74
  end
73
75
 
74
76
  namespace :ec2onrails do
77
+ desc <<-DESC
78
+ Show the AMI id's of the current images for this version of \
79
+ EC2 on Rails.
80
+ DESC
81
+ task :ami_ids, :roles => [:web, :db, :app] do
82
+ puts "32-bit server image for EC2 on Rails #{ec2onrails_version}: #{image_id_32_bit}"
83
+ puts "64-bit server image for EC2 on Rails #{ec2onrails_version}: #{image_id_64_bit}"
84
+ end
75
85
 
76
86
  desc <<-DESC
77
87
  Start a new server instance and prepare it for a cold deploy.
@@ -79,10 +89,12 @@ Capistrano::Configuration.instance.load do
79
89
  task :setup, :roles => [:web, :db, :app] do
80
90
  ec2.start_instance
81
91
  server.set_timezone
82
- server.upgrade_and_install_all
92
+ server.install_packages
93
+ server.install_gems
83
94
  server.deploy_files
84
95
  server.restart_services
85
96
  deploy.setup
97
+ server.set_roles
86
98
  db.create
87
99
  end
88
100
 
@@ -98,15 +110,12 @@ Capistrano::Configuration.instance.load do
98
110
  deploy.restart
99
111
  end
100
112
 
101
- namespace :ec2 do
113
+ namespace :ec2 do
102
114
  desc <<-DESC
103
115
  Start an instance, using the AMI of the correct version to match this gem.
104
116
  DESC
105
117
  task :start_instance, :roles => [:web, :db, :app] do
106
118
  # TODO
107
- # ec2 = EC2::Base.new(:access_key_id => access_key_id, :secret_access_key => secret_access_key)
108
- # ec2.run_instances(:image_id => image_id, :key_name => key_name, :group_id => group_id)
109
- # wait until image is booted
110
119
  end
111
120
 
112
121
  desc <<-DESC
@@ -119,7 +128,7 @@ Capistrano::Configuration.instance.load do
119
128
 
120
129
  namespace :db do
121
130
  desc <<-DESC
122
- Load configuration info for the production database from \
131
+ [internal] Load configuration info for the production database from \
123
132
  config/database.yml.
124
133
  DESC
125
134
  task :load_config, :roles => :db do
@@ -127,9 +136,19 @@ Capistrano::Configuration.instance.load do
127
136
  cfg[:production_db_name] = db_config['database']
128
137
  cfg[:production_db_user] = db_config['username']
129
138
  cfg[:production_db_password] = db_config['password']
139
+ cfg[:production_db_host] = db_config['host']
140
+ cfg[:production_db_socket] = db_config['socket']
141
+
142
+ if (cfg[:production_db_host].nil? || cfg[:production_db_host].empty?) &&
143
+ (cfg[:production_db_host] != 'localhost' || cfg[:production_db_host] != '127.0.0.1') &&
144
+ (cfg[:production_db_socket].nil? || cfg[:production_db_socket].empty?)
145
+ raise "ERROR: missing database config. Make sure database.yml contains a 'production' section with either 'host: localhost' or 'socket: /var/run/mysqld/mysqld.sock'."
146
+ end
130
147
 
131
148
  [cfg[:production_db_name], cfg[:production_db_user], cfg[:production_db_password]].each do |s|
132
- if s.match(/['"]/)
149
+ if s.nil? || s.empty?
150
+ raise "ERROR: missing database config. Make sure database.yml contains a 'production' section with a database name, user, and password."
151
+ elsif s.match(/['"]/)
133
152
  raise "ERROR: database config string '#{s}' contains quotes."
134
153
  end
135
154
  end
@@ -144,7 +163,7 @@ Capistrano::Configuration.instance.load do
144
163
  on_rollback { drop }
145
164
  load_config
146
165
  run "echo 'create database #{cfg[:production_db_name]};' | mysql -u root"
147
- run "echo \"grant all on #{cfg[:production_db_name]}.* to '#{cfg[:production_db_user]}'@'localhost' identified by '#{cfg[:production_db_password]}';\" | mysql -u root"
166
+ run "echo \"grant all on #{cfg[:production_db_name]}.* to '#{cfg[:production_db_user]}'@'%' identified by '#{cfg[:production_db_password]}';\" | mysql -u root"
148
167
  end
149
168
 
150
169
  desc <<-DESC
@@ -195,6 +214,16 @@ Capistrano::Configuration.instance.load do
195
214
  end
196
215
 
197
216
  namespace :server do
217
+ desc <<-DESC
218
+ Tell the servers what roles they are in. This configures them with \
219
+ the appropriate settings for each role, and starts and/or stops the \
220
+ relevant services.
221
+ DESC
222
+ task :set_roles, :roles => [:web_admin, :db_admin, :app_admin] do
223
+ # TODO generate this based on the roles that actually exist so arbitrary new ones can be added
224
+ 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)}"
225
+ end
226
+
198
227
  desc <<-DESC
199
228
  Upgrade to the newest versions of all Ubuntu packages.
200
229
  DESC
@@ -207,7 +236,7 @@ Capistrano::Configuration.instance.load do
207
236
  Upgrade to the newest versions of all rubygems.
208
237
  DESC
209
238
  task :upgrade_gems, :roles => [:web_admin, :db_admin, :app_admin] do
210
- sudo "gem update -y"
239
+ sudo "gem update -y --no-rdoc --no-ri"
211
240
  end
212
241
 
213
242
  desc <<-DESC
@@ -230,7 +259,7 @@ Capistrano::Configuration.instance.load do
230
259
  DESC
231
260
  task :install_gems, :roles => [:web_admin, :db_admin, :app_admin] do
232
261
  if cfg[:rubygems] && cfg[:rubygems].any?
233
- sudo "gem install #{cfg[:rubygems].join(' ')} -y" do |ch, str, data|
262
+ sudo "gem install #{cfg[:rubygems].join(' ')} -y --no-rdoc --no-ri" do |ch, str, data|
234
263
  ch[:data] ||= ""
235
264
  ch[:data] << data
236
265
  if data =~ />\s*$/
@@ -259,7 +288,7 @@ Capistrano::Configuration.instance.load do
259
288
  Set the timezone using the value of the variable named timezone. \
260
289
  Valid options for timezone can be determined by the contents of \
261
290
  /usr/share/zoneinfo, which can be seen here: \
262
- http://packages.ubuntu.com/cgi-bin/search_contents.pl?searchmode=filelist&word=tzdata&version=feisty&arch=all&page=1&number=all \
291
+ http://packages.ubuntu.com/cgi-bin/search_contents.pl?searchmode=filelist&word=tzdata&version=gutsy&arch=all&page=1&number=all \
263
292
  Remove 'usr/share/zoneinfo/' from the filename, and use the last \
264
293
  directory and file as the value. For example 'Africa/Abidjan' or \
265
294
  'posix/GMT' or 'Canada/Eastern'.
@@ -291,6 +320,9 @@ Capistrano::Configuration.instance.load do
291
320
  end
292
321
 
293
322
  desc <<-DESC
323
+ Restart a set of services. Set ec2onrails_config[:services_to_restart] \
324
+ to an array of strings. It's assumed that each service has a script \
325
+ in /etc/init.d
294
326
  DESC
295
327
  task :restart_services, :roles => [:web_admin, :db_admin, :app_admin] do
296
328
  if cfg[:services_to_restart] && cfg[:services_to_restart].any?
@@ -20,9 +20,10 @@ module Ec2onrails #:nodoc:
20
20
  module VERSION #:nodoc:
21
21
  MAJOR = 0
22
22
  MINOR = 9
23
- TINY = 3
23
+ TINY = 4
24
24
  STRING = [MAJOR, MINOR, TINY].join('.')
25
25
 
26
- AMI_ID = 'ami-a3f91cca'
26
+ AMI_ID_32_BIT = 'ami-ecc12485'
27
+ AMI_ID_64_BIT = 'ami-efc12486'
27
28
  end
28
29
  end
data/website/index.html CHANGED
@@ -33,33 +33,346 @@
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.3</a>
36
+ <a href="http://rubyforge.org/projects/ec2onrails" class="numbers">0.9.4</a>
37
37
  </div>
38
- <h2>This page will be updated soon!</h2>
38
+ <h2>Deploy a Ruby on Rails app on <span class="caps">EC2</span> in five minutes</h2>
39
39
 
40
40
 
41
- <h2>What</h2>
41
+ <p><span class="caps">EC2</span> on Rails is an Ubuntu Linux server image for
42
+ <a href="http://www.amazon.com/b/ref=sc_fe_l_2/102-6342260-7987311?ie=UTF8&#38;node=201590011&#38;no=3435361">Amazon&#8217;s <span class="caps">EC2</span> hosting service</a>
43
+ that&#8217;s ready to run a standard Ruby on Rails application with little or no customization.
44
+ It&#8217;s a Ruby on Rails <a href="http://en.wikipedia.org/wiki/Virtual_appliance">virtual appliance</a>.</p>
42
45
 
43
46
 
44
- <h2>Installing</h2>
47
+ <p>If you have an <span class="caps">EC2</span> account and a public keypair you&#8217;re five minutes away from deploying
48
+ your Rails app.</p>
45
49
 
46
50
 
47
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">ec2onrails</span></pre></p>
51
+ <p><em>Deploying a simple rails app is simple, and complex customization (if required) is possible.</em></p>
48
52
 
49
53
 
50
- <h2>The basics</h2>
54
+ <p>Features of the <span class="caps">EC2</span> image:</p>
51
55
 
52
56
 
53
- <h2>Demonstration of usage</h2>
57
+ <ul>
58
+ <li>Ready to deploy a Rails app with little or no configuration of the server required.</li>
59
+ <li>Automatic backup of MySQL database to S3.</li>
60
+ <li>Capistrano tasks to customize the server image, archive and restore the database to/from S3, and more (available as a rubygem).</li>
61
+ <li>Mongrel_cluster behind Apache 2.2, configured according to
62
+ <a href="http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/">Coda Hale&#8217;s excellent guide</a>
63
+ with /etc/init.d startup script</li>
64
+ <li>Ruby on Rails 1.2.5</li>
65
+ <li>Ruby 1.8.6</li>
66
+ <li>MySQL 5</li>
67
+ <li>Ubuntu 7.10 &#8220;Gutsy&#8221; with <a href="http://wiki.xensource.com/xenwiki/XenSpecificGlibc">Xen versions of standard libs</a> (<a href="http://packages.ubuntu.com/feisty/libs/libc6-xen">libc6-xen</a> package).</li>
68
+ <li>Amazon <span class="caps">AMI</span> tools installed</li>
69
+ <li>A script to rebundle a customized version of the image in one step if required</li>
70
+ <li>MySQL and Apache configured to write logs to /mnt/log so you don&#8217;t fill up <span class="caps">EC2</span>&#8217;s small root filesystem</li>
71
+ <li>32-bit and 64-bit images available (supports all instance types, small to extra large).</li>
72
+ <li>Created using a publicly available (GPL) build file.</li>
73
+ <li>Multiple instance support (though it&#8217;s still experimental, not fully tested yet).</li>
74
+ </ul>
54
75
 
55
76
 
56
- <h2>Forum</h2>
77
+ <h2>Using the image</h2>
57
78
 
58
79
 
59
- <p><a href="http://groups.google.com/group/ec2-on-rails-announce">Announcements</a></p>
80
+ <p>This documentation will be improved soon, for now hopefully this covers the basics.</p>
60
81
 
61
82
 
62
- <p><a href="http://groups.google.com/group/ec2-on-rails-discuss">Discussion</a></p>
83
+ <h4>1. Install the gem</h4>
84
+
85
+
86
+ <pre>sudo gem install ec2onrails</pre>
87
+
88
+ <h4>2. Add the config files to your Rails app</h4>
89
+
90
+
91
+ <p>Put <a href="http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/Capfile">Capfile</a>
92
+ in the root of your rails folder, and put
93
+ <a href="http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/deploy.rb">deploy.rb</a>
94
+ and
95
+ <a href="http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/s3.yml">s3.yml</a>
96
+ in the config folder.</p>
97
+
98
+
99
+ <p>Be sure to customize those files and read the comments.</p>
100
+
101
+
102
+ <p>Also, if you&#8217;re using a separate instance for the database, use the hostname &#8220;db_primary&#8221;
103
+ in your database.yml file. After running &#8220;cap ec2onrails:server:set_roles&#8221; it will resolve
104
+ to the instance defined in your Capistrano &#8220;db&#8221; role.</p>
105
+
106
+
107
+ <h4>4. Start up one or more instances of the image.</h4>
108
+
109
+
110
+ <p>Soon there will be a Capistrano task to do this for you. In the meantime read the
111
+ <a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html">running an instance section</a>
112
+ in Amazon&#8217;s getting started guide.</p>
113
+
114
+
115
+ The image id&#8217;s of the current images are:
116
+ <ul>
117
+ <li>32-bit: <strong>ami-ecc12485</strong>.</li>
118
+ <li>64-bit: <strong>ami-efc12486</strong>.</li>
119
+ </ul>
120
+
121
+
122
+ <p>(Please read the change log below for release notes. <span class="caps">NOTE</span>: multiple
123
+ instance support isn&#8217;t fully tested yet, look for version 1.0 soon!)</p>
124
+
125
+
126
+ <p>As is <a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/DeveloperGuide/public-ami-guidelines.html">standard for public <span class="caps">AMI</span>&#8217;s</a>,
127
+ password-based logins are disabled. You log in with your own
128
+ <a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html">public/private keypair</a>.</p>
129
+
130
+
131
+ <p>Most basic things can be configured automatically by the Capistrano tasks, but if you want to
132
+ you can login by ssh as a user named &#8220;admin&#8221; (has sudo ability) or as &#8220;app&#8221; (the user
133
+ that the app runs as, does not have sudo ability). The Capistrano tasks automatically
134
+ use the app user use to deploy the app, and the admin user for server admin tasks
135
+ that require sudo.</p>
136
+
137
+
138
+ <p>Double-check <a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html">your firewall settings</a>.
139
+ Be sure that you haven&#8217;t allowed public access to any ports other than <span class="caps">TCP 22</span> and <span class="caps">TCP 80</span>.
140
+ If you&#8217;re using multiple instances, be sure to allow them network access to each other.</p>
141
+
142
+
143
+ <h4>5. Deploy the app with Capistrano</h4>
144
+
145
+
146
+ <pre>
147
+ cap ec2onrails:setup
148
+ cap deploy:migrations
149
+ </pre>
150
+
151
+ <p>Yes, it&#8217;s that easy! The setup task will set the server&#8217;s timezone, install any
152
+ gems and Ubuntu packages that you specified in the config file, and
153
+ create your production database.</p>
154
+
155
+
156
+ <p>That&#8217;s it, you&#8217;re done.</p>
157
+
158
+
159
+ <h2>Capistrano tasks</h2>
160
+
161
+
162
+ <p>I&#8217;ll post full documentation for the Capistrano tasks soon, in the meantime here&#8217;s a brief summary:</p>
163
+
164
+
165
+ Server config tasks. These run as the admin user. You can specify lists of
166
+ gems and Ubuntu packages to be installed. The deploy_files task uploads
167
+ files to the server (they will be owned by root). It&#8217;s intended mainly for
168
+ customized config files for new packages installed via the install_packages
169
+ task.
170
+ <ul>
171
+ <li>ec2onrails:server:deploy_files</li>
172
+ <li>ec2onrails:server:set_timezone</li>
173
+ <li>ec2onrails:server:upgrade_gems</li>
174
+ <li>ec2onrails:server:upgrade_packages</li>
175
+ <li>ec2onrails:server:install_gems</li>
176
+ <li>ec2onrails:server:install_packages</li>
177
+ <li>ec2onrails:server:upgrade_and_install_all</li>
178
+ <li>ec2onrails:server:restart_services</li>
179
+ <li>ec2onrails:server:set_roles
180
+ - Customizes each instance for it&#8217;s role(s) (as defined in your Capistrano deploy.rb file).
181
+ For now this just makes sure that only the appropriate services (Apache, Mongrel, and/or MySQL)
182
+ are running. Eventually this will customize settings for the running services also. Note that
183
+ an instance can have more than one role. If there&#8217;s only one instance it will have all roles.</li>
184
+ </ul>
185
+
186
+
187
+ Database management tasks: archive and restore can operate on any specified S3 bucket.
188
+ For example, I use this to restore the current production data (from my actual production backup
189
+ bucket) onto a staging server that has the current production version of my
190
+ app. I then deploy the new version which tests migrations exactly as they&#8217;ll
191
+ run on the production server.
192
+ <ul>
193
+ <li>ec2onrails:db:archive</li>
194
+ <li>ec2onrails:db:restore</li>
195
+ <li>ec2onrails:db:create</li>
196
+ <li>ec2onrails:db:drop</li>
197
+ <li>ec2onrails:db:recreate</li>
198
+ <li>ec2onrails:db:set_root_password</li>
199
+ </ul>
200
+
201
+
202
+ <ul>
203
+ <li>ec2onrails:ami_ids
204
+ - Shows the <span class="caps">AMI</span> id&#8217;s of the images that match the current version of the gem.</li>
205
+ </ul>
206
+
207
+
208
+ <ul>
209
+ <li>ec2onrails:setup
210
+ - This is a convenience task to get a new instance completely set up in one
211
+ step, everything except deploying the app.</li>
212
+ </ul>
213
+
214
+
215
+ <ul>
216
+ <li>ec2onrails:restore_db_and_deploy
217
+ - Another convenience task to recreate the db, restore data to it from an s3
218
+ bucket and deploy the app, useful to set up a staging server.</li>
219
+ </ul>
220
+
221
+
222
+ <h2>Saving your own customized version of the image.</h2>
223
+
224
+
225
+ I&#8217;m trying to make the image configurable enough that you won&#8217;t need to do this, but
226
+ if you want to save a customized version of the image, there is a script to do it:
227
+ <code>/usr/local/ec2onrails/bin/rebundle.sh</code>. It takes a long time and there
228
+ are long periods with no output so you might want to hit a key once in a while
229
+ (or set &#8220;ServerAliveInterval 60&#8221; in your ssh_config file) to avoid being disconnected
230
+ while it&#8217;s running.
231
+
232
+ <p>It expects a directory, /mnt/aws-config, that contains a config file and your <span class="caps">AWS</span>
233
+ access identifiers. The contents of the directory are the following three files:</p>
234
+
235
+
236
+ <ul>
237
+ <li>cert-XXXX.pem and pk-XXXX.pem. These are the X.509 certificate and private key files from your Amazon access key identifiers.</li>
238
+ <li>A file named config. It&#8217;s contents should look like the following:</li>
239
+ </ul>
240
+
241
+
242
+ <pre>
243
+ AWS_ACCOUNT_ID=1234-1234-1234
244
+ KEY_FILE_NAME=pk-XXXX.pem
245
+ CERT_FILE_NAME=cert-XXXX.pem
246
+ AWS_ACCESS_KEY_ID=ABC0123
247
+ AWS_SECRET_ACCESS_KEY=abc0123abc0123abc0123
248
+ BUCKET_BASE_NAME=a-string-identifier
249
+ </pre>
250
+
251
+ <h2>Building the image</h2>
252
+
253
+
254
+ <p>Building the image is not required, most people will simply use the prebuilt public
255
+ image, but there is also a Rake build script that builds the image, and optionally bundles
256
+ and uploads it to S3.
257
+ It should run on any Linux system, including one of the stock Fedora-based Amazon public <span class="caps">AMI</span>&#8217;s
258
+ (it is tested on <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=994&#38;categoryID=101">Amazon&#8217;s <span class="caps">FC6</span> x86_64 image</a>).</p>
259
+
260
+
261
+ <h2>Mailing lists</h2>
262
+
263
+
264
+ <p>There are two Google groups, one for
265
+ <a href="http://groups.google.com/group/ec2-on-rails-announce">announcements</a>
266
+ and one for
267
+ <a href="http://groups.google.com/group/ec2-on-rails-discuss">discussion</a>.</p>
268
+
269
+
270
+ <h2>Comments</h2>
271
+
272
+
273
+ <p>Comments are welcome. Send an email to <a href="http://pauldowman.com/contact/">Paul Dowman</a>
274
+ or to the <a href="http://groups.google.com/group/ec2-on-rails-discuss">Google group</a>.
275
+ If you find bugs please file them
276
+ <a href="http://rubyforge.org/tracker/?atid=17558&#38;group_id=4552&#38;func=browse">here</a>
277
+ or send me an <a href="http://pauldowman.com/contact/">email</a>.</p>
278
+
279
+
280
+ <h2>Change log</h2>
281
+
282
+
283
+ <p>Also see the <a href="http://rubyforge.org/tracker/?atid=17558&#38;group_id=4552&#38;func=browse">list of open issues</a>.</p>
284
+
285
+
286
+ <h4>0.9.4, ami-ecc12485 (32-bit) and ami-efc12486 (64-bit)</h4>
287
+
288
+
289
+ 7 Oct, 2007
290
+ <ul>
291
+ <li>This is another test release, still not intended to be production-ready until it&#8217;s tested more thoroughly. Look for version 1.0.</li>
292
+ <li><em>The rebundling doesn&#8217;t seem to be working.</em> I&#8217;ll fix that in a new version. Details <a href="http://rubyforge.org/tracker/?func=detail&#38;aid=15047&#38;group_id=4552&#38;atid=17558">here</a></li>
293
+ <li>Ubuntu 7.10/Gutsy</li>
294
+ <li>Experimental multiple instance support.
295
+ <ul>
296
+ <li><strong>Mongrel &#38; MySQL now listen on all ports.</strong> Be sure your firewall settings are correct, and set a MySQL root password.</li>
297
+ </ul>
298
+ </li>
299
+ <li>RDoc and RI not generated for installed gems.</li>
300
+ <li>No longer upgrades packages &#38; gems on ec2onrails:server:setup task.</li>
301
+ <li>32-bit and 64-bit images.</li>
302
+ <li><span class="caps">EC2 AMI</span> tools version 2007-08-29.</li>
303
+ <li><span class="caps">NTP</span> removed, it&#8217;s no longer needed under Xen.</li>
304
+ <li>MySQL data dir dirs now under /mnt.</li>
305
+ <li>syslog now logs to /mnt/log.</li>
306
+ <li>Build now cleans apt cache, image is now 1/2 the size.</li>
307
+ </ul>
308
+
309
+
310
+ <h4>0.9.3, ami-a3f91cca</h4>
311
+
312
+
313
+ 23 Oct, 2007
314
+ <ul>
315
+ <li>This is another test release, still not intended to be production-ready until it&#8217;s tested more thoroughly. Look for version 1.0.</li>
316
+ <li>There is now a rubygem available with Capistrano tasks.</li>
317
+ <li>&#8220;admin&#8221; user added, server admin cap tasks run as this user</li>
318
+ <li>MySQL settings tweaked to reflect large amount of <span class="caps">RAM</span> available on <span class="caps">EC2</span> instances.</li>
319
+ <li><a href="issues">http://code.google.com/p/ec2-on-rails/issues/list?can=1&#38;q=label%3AFixed-in-0_9_3</a> fixed in this release</li>
320
+ </ul>
321
+
322
+
323
+ <h4>0.9.2, ami-0cf61365</h4>
324
+
325
+
326
+ 13 Sept, 2007
327
+ <ul>
328
+ <li>This is another test release, still not intended to be production-ready until it&#8217;s tested more thoroughly. Look for version 1.0.</li>
329
+ <li><a href="issues">http://code.google.com/p/ec2-on-rails/issues/list?can=1&#38;q=label%3AFixed-in-0_9_2</a> fixed in this release</li>
330
+ </ul>
331
+
332
+
333
+ <h4>0.9.1, ami-99f712f0</h4>
334
+
335
+
336
+ 11 Sept, 2007
337
+ <ul>
338
+ <li>This is another test release, still not intended to be production-ready until it&#8217;s tested more thoroughly. Look for version 1.0.</li>
339
+ <li>Fixed permissions on /var/lib/dhcp3</li>
340
+ <li><a href="issues">http://code.google.com/p/ec2-on-rails/issues/list?can=1&#38;q=label%3AFixed-in-0_9_1</a> fixed in this release</li>
341
+ </ul>
342
+
343
+
344
+ <h4>0.9.0, ami-bdf411d4</h4>
345
+
346
+
347
+ 7 Sept 2007
348
+ <ul>
349
+ <li>First release built with new rake build script, this is a test release, not intended to be production-ready until it&#8217;s tested more thoroughly.</li>
350
+ <li>Amazon <span class="caps">EC2 API</span> tools (java-based) no longer installed by default because they&#8217;re not used on most servers. They&#8217;re needed only for registering a rebundled image so there&#8217;s now a script to install them: /usr/local/ec2-on-rails/install_ec2_api_tools.sh. The ruby-based <span class="caps">EC2</span> image tools are still installed.</li>
351
+ <li>Removed <a href="Java">http://packages.ubuntu.com/feisty/libs/sun-java6-jre</a> and it&#8217;s massive list of dependencies because it was only needed for the <span class="caps">EC2 API</span> tools. This saved a huge amount of space.</li>
352
+ <li>Removed ImageMagick, RMagick and hpricot due to popular demand. There will soon be cap2 tasks to customize which packages and gems are installed.</li>
353
+ </ul>
354
+
355
+
356
+ <h4>0.8.1, ami-b79a7fde</h4>
357
+
358
+
359
+ 29 July 2007
360
+ <ul>
361
+ <li>Fixed S3 backup cron job.</li>
362
+ <li>Added script to restore data from S3 (/usr/local/aws/bin/restore_app_db.rb). This is useful when setting up a staging server to test your deployment, you can have it set up with a copy of your production data to test your migrations.</li>
363
+ <li>Rewrite rule now allows images/css on maintenance page</li>
364
+ <li>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).</li>
365
+ <li>Added ImageMagick, RMagick and hpricot due to popular demand.</li>
366
+ </ul>
367
+
368
+
369
+ <h4>0.8.0, ami-4e907527</h4>
370
+
371
+
372
+ 20 June 2007
373
+ <ul>
374
+ <li>Initial release.</li>
375
+ </ul>
63
376
 
64
377
 
65
378
  <h2>How to submit patches</h2>
@@ -75,19 +388,18 @@
75
388
 
76
389
 
77
390
  <p>This code is free to use under the terms of the <span class="caps">GPL</span> v2.</p>
78
-
79
-
80
- <h2>Contact</h2>
81
-
82
-
83
- <p>Comments are welcome. Send an email to <a href="http://pauldowman.com/contact">Paul Dowman</a> or to the <a href="http://groups.google.com/group/ec2-on-rails">forum</a></p>
84
391
  <p class="coda">
85
- <a href="http://pauldowman.com/contact/">Paul Dowman</a>, 6th October 2007<br>
392
+ <a href="http://pauldowman.com/contact/">Paul Dowman</a>, 25th October 2007<br>
86
393
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
87
394
  </p>
88
395
  </div>
89
396
 
90
- <!-- insert site tracking codes here, like Google Urchin -->
397
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
398
+ </script>
399
+ <script type="text/javascript">
400
+ _uacct = "UA-2759652-1";
401
+ urchinTracker();
402
+ </script>
91
403
 
92
404
  </body>
93
405
  </html>
data/website/index.txt CHANGED
@@ -1,27 +1,266 @@
1
1
  h1. EC2 on Rails
2
2
 
3
- h2. This page will be updated soon!
4
3
 
4
+ h2. Deploy a Ruby on Rails app on EC2 in five minutes
5
5
 
6
- h2. What
6
+ EC2 on Rails is an Ubuntu Linux server image for
7
+ "Amazon's EC2 hosting service":http://www.amazon.com/b/ref=sc_fe_l_2/102-6342260-7987311?ie=UTF8&node=201590011&no=3435361
8
+ that's ready to run a standard Ruby on Rails application with little or no customization.
9
+ It's a Ruby on Rails "virtual appliance":http://en.wikipedia.org/wiki/Virtual_appliance.
7
10
 
11
+ If you have an EC2 account and a public keypair you're five minutes away from deploying
12
+ your Rails app.
8
13
 
9
- h2. Installing
14
+ _Deploying a simple rails app is simple, and complex customization (if required) is possible._
10
15
 
11
- <pre syntax="ruby">sudo gem install ec2onrails</pre>
16
+ Features of the EC2 image:
12
17
 
13
- h2. The basics
18
+ * Ready to deploy a Rails app with little or no configuration of the server required.
19
+ * Automatic backup of MySQL database to S3.
20
+ * Capistrano tasks to customize the server image, archive and restore the database to/from S3, and more (available as a rubygem).
21
+ * Mongrel_cluster behind Apache 2.2, configured according to
22
+ "Coda Hale's excellent guide":http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
23
+ with /etc/init.d startup script
24
+ * Ruby on Rails 1.2.5
25
+ * Ruby 1.8.6
26
+ * MySQL 5
27
+ * Ubuntu 7.10 "Gutsy" with "Xen versions of standard libs":http://wiki.xensource.com/xenwiki/XenSpecificGlibc ("libc6-xen":http://packages.ubuntu.com/feisty/libs/libc6-xen package).
28
+ * Amazon AMI tools installed
29
+ * A script to rebundle a customized version of the image in one step if required
30
+ * MySQL and Apache configured to write logs to /mnt/log so you don't fill up EC2's small root filesystem
31
+ * 32-bit and 64-bit images available (supports all instance types, small to extra large).
32
+ * Created using a publicly available (GPL) build file.
33
+ * Multiple instance support (though it's still experimental, not fully tested yet).
14
34
 
15
35
 
16
- h2. Demonstration of usage
36
+ h2. Using the image
17
37
 
38
+ This documentation will be improved soon, for now hopefully this covers the basics.
18
39
 
40
+ h4. 1. Install the gem
19
41
 
20
- h2. Forum
42
+ <pre>sudo gem install ec2onrails</pre>
21
43
 
22
- "Announcements":http://groups.google.com/group/ec2-on-rails-announce
44
+ h4. 2. Add the config files to your Rails app
23
45
 
24
- "Discussion":http://groups.google.com/group/ec2-on-rails-discuss
46
+ Put "Capfile":http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/Capfile
47
+ in the root of your rails folder, and put
48
+ "deploy.rb":http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/deploy.rb
49
+ and
50
+ "s3.yml":http://ec2onrails.rubyforge.org/svn/trunk/documentation/examples/s3.yml
51
+ in the config folder.
52
+
53
+ Be sure to customize those files and read the comments.
54
+
55
+ Also, if you're using a separate instance for the database, use the hostname "db_primary"
56
+ in your database.yml file. After running "cap ec2onrails:server:set_roles" it will resolve
57
+ to the instance defined in your Capistrano "db" role.
58
+
59
+ h4. 4. Start up one or more instances of the image.
60
+
61
+ Soon there will be a Capistrano task to do this for you. In the meantime read the
62
+ "running an instance section":http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html
63
+ in Amazon's getting started guide.
64
+
65
+ The image id's of the current images are:
66
+ * 32-bit: *ami-ecc12485*.
67
+ * 64-bit: *ami-efc12486*.
68
+
69
+ (Please read the change log below for release notes. NOTE: multiple
70
+ instance support isn't fully tested yet, look for version 1.0 soon!)
71
+
72
+ As is "standard for public AMI's":http://docs.amazonwebservices.com/AWSEC2/2007-08-29/DeveloperGuide/public-ami-guidelines.html,
73
+ password-based logins are disabled. You log in with your own
74
+ "public/private keypair":http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html.
75
+
76
+ Most basic things can be configured automatically by the Capistrano tasks, but if you want to
77
+ you can login by ssh as a user named "admin" (has sudo ability) or as "app" (the user
78
+ that the app runs as, does not have sudo ability). The Capistrano tasks automatically
79
+ use the app user use to deploy the app, and the admin user for server admin tasks
80
+ that require sudo.
81
+
82
+ Double-check "your firewall settings":http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/running-an-instance.html.
83
+ Be sure that you haven't allowed public access to any ports other than TCP 22 and TCP 80.
84
+ If you're using multiple instances, be sure to allow them network access to each other.
85
+
86
+
87
+ h4. 5. Deploy the app with Capistrano
88
+
89
+ <pre>
90
+ cap ec2onrails:setup
91
+ cap deploy:migrations
92
+ </pre>
93
+
94
+ Yes, it's that easy! The setup task will set the server's timezone, install any
95
+ gems and Ubuntu packages that you specified in the config file, and
96
+ create your production database.
97
+
98
+ That's it, you're done.
99
+
100
+ h2. Capistrano tasks
101
+
102
+ I'll post full documentation for the Capistrano tasks soon, in the meantime here's a brief summary:
103
+
104
+ Server config tasks. These run as the admin user. You can specify lists of
105
+ gems and Ubuntu packages to be installed. The deploy_files task uploads
106
+ files to the server (they will be owned by root). It's intended mainly for
107
+ customized config files for new packages installed via the install_packages
108
+ task.
109
+ * ec2onrails:server:deploy_files
110
+ * ec2onrails:server:set_timezone
111
+ * ec2onrails:server:upgrade_gems
112
+ * ec2onrails:server:upgrade_packages
113
+ * ec2onrails:server:install_gems
114
+ * ec2onrails:server:install_packages
115
+ * ec2onrails:server:upgrade_and_install_all
116
+ * ec2onrails:server:restart_services
117
+ * ec2onrails:server:set_roles
118
+ - Customizes each instance for it's role(s) (as defined in your Capistrano deploy.rb file).
119
+ For now this just makes sure that only the appropriate services (Apache, Mongrel, and/or MySQL)
120
+ are running. Eventually this will customize settings for the running services also. Note that
121
+ an instance can have more than one role. If there's only one instance it will have all roles.
122
+
123
+ Database management tasks: archive and restore can operate on any specified S3 bucket.
124
+ For example, I use this to restore the current production data (from my actual production backup
125
+ bucket) onto a staging server that has the current production version of my
126
+ app. I then deploy the new version which tests migrations exactly as they'll
127
+ run on the production server.
128
+ * ec2onrails:db:archive
129
+ * ec2onrails:db:restore
130
+ * ec2onrails:db:create
131
+ * ec2onrails:db:drop
132
+ * ec2onrails:db:recreate
133
+ * ec2onrails:db:set_root_password
134
+
135
+ * ec2onrails:ami_ids
136
+ - Shows the AMI id's of the images that match the current version of the gem.
137
+
138
+ * ec2onrails:setup
139
+ - This is a convenience task to get a new instance completely set up in one
140
+ step, everything except deploying the app.
141
+
142
+ * ec2onrails:restore_db_and_deploy
143
+ - Another convenience task to recreate the db, restore data to it from an s3
144
+ bucket and deploy the app, useful to set up a staging server.
145
+
146
+
147
+ h2. Saving your own customized version of the image.
148
+
149
+ I'm trying to make the image configurable enough that you won't need to do this, but
150
+ if you want to save a customized version of the image, there is a script to do it:
151
+ <code>/usr/local/ec2onrails/bin/rebundle.sh</code>. It takes a long time and there
152
+ are long periods with no output so you might want to hit a key once in a while
153
+ (or set "ServerAliveInterval 60" in your ssh_config file) to avoid being disconnected
154
+ while it's running.
155
+
156
+ It expects a directory, /mnt/aws-config, that contains a config file and your AWS
157
+ access identifiers. The contents of the directory are the following three files:
158
+
159
+ * cert-XXXX.pem and pk-XXXX.pem. These are the X.509 certificate and private key files from your Amazon access key identifiers.
160
+ * A file named config. It's contents should look like the following:
161
+
162
+ <pre>
163
+ AWS_ACCOUNT_ID=1234-1234-1234
164
+ KEY_FILE_NAME=pk-XXXX.pem
165
+ CERT_FILE_NAME=cert-XXXX.pem
166
+ AWS_ACCESS_KEY_ID=ABC0123
167
+ AWS_SECRET_ACCESS_KEY=abc0123abc0123abc0123
168
+ BUCKET_BASE_NAME=a-string-identifier
169
+ </pre>
170
+
171
+
172
+ h2. Building the image
173
+
174
+ Building the image is not required, most people will simply use the prebuilt public
175
+ image, but there is also a Rake build script that builds the image, and optionally bundles
176
+ and uploads it to S3.
177
+ It should run on any Linux system, including one of the stock Fedora-based Amazon public AMI's
178
+ (it is tested on "Amazon's FC6 x86_64 image":http://developer.amazonwebservices.com/connect/entry.jspa?externalID=994&categoryID=101).
179
+
180
+
181
+ h2. Mailing lists
182
+
183
+ There are two Google groups, one for
184
+ "announcements":http://groups.google.com/group/ec2-on-rails-announce
185
+ and one for
186
+ "discussion":http://groups.google.com/group/ec2-on-rails-discuss.
187
+
188
+
189
+ h2. Comments
190
+
191
+ Comments are welcome. Send an email to "Paul Dowman":http://pauldowman.com/contact/
192
+ or to the "Google group":http://groups.google.com/group/ec2-on-rails-discuss.
193
+ If you find bugs please file them
194
+ "here":http://rubyforge.org/tracker/?atid=17558&group_id=4552&func=browse
195
+ or send me an "email":http://pauldowman.com/contact/.
196
+
197
+
198
+ h2. Change log
199
+
200
+ Also see the "list of open issues":http://rubyforge.org/tracker/?atid=17558&group_id=4552&func=browse.
201
+
202
+
203
+ h4. 0.9.4, ami-ecc12485 (32-bit) and ami-efc12486 (64-bit)
204
+
205
+ 7 Oct, 2007
206
+ * This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
207
+ * _The rebundling doesn't seem to be working._ I'll fix that in a new version. Details "here":http://rubyforge.org/tracker/?func=detail&aid=15047&group_id=4552&atid=17558
208
+ * Ubuntu 7.10/Gutsy
209
+ * Experimental multiple instance support.
210
+ ** *Mongrel & MySQL now listen on all ports.* Be sure your firewall settings are correct, and set a MySQL root password.
211
+ * RDoc and RI not generated for installed gems.
212
+ * No longer upgrades packages & gems on ec2onrails:server:setup task.
213
+ * 32-bit and 64-bit images.
214
+ * EC2 AMI tools version 2007-08-29.
215
+ * NTP removed, it's no longer needed under Xen.
216
+ * MySQL data dir dirs now under /mnt.
217
+ * syslog now logs to /mnt/log.
218
+ * Build now cleans apt cache, image is now 1/2 the size.
219
+
220
+
221
+ h4. 0.9.3, ami-a3f91cca
222
+
223
+ 23 Oct, 2007
224
+ * This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
225
+ * There is now a rubygem available with Capistrano tasks.
226
+ * "admin" user added, server admin cap tasks run as this user
227
+ * MySQL settings tweaked to reflect large amount of RAM available on EC2 instances.
228
+ * "http://code.google.com/p/ec2-on-rails/issues/list?can=1&q=label%3AFixed-in-0_9_3":issues fixed in this release
229
+
230
+ h4. 0.9.2, ami-0cf61365
231
+
232
+ 13 Sept, 2007
233
+ * This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
234
+ * "http://code.google.com/p/ec2-on-rails/issues/list?can=1&q=label%3AFixed-in-0_9_2":issues fixed in this release
235
+
236
+ h4. 0.9.1, ami-99f712f0
237
+
238
+ 11 Sept, 2007
239
+ * This is another test release, still not intended to be production-ready until it's tested more thoroughly. Look for version 1.0.
240
+ * Fixed permissions on /var/lib/dhcp3
241
+ * "http://code.google.com/p/ec2-on-rails/issues/list?can=1&q=label%3AFixed-in-0_9_1":issues fixed in this release
242
+
243
+ h4. 0.9.0, ami-bdf411d4
244
+
245
+ 7 Sept 2007
246
+ * First release built with new rake build script, this is a test release, not intended to be production-ready until it's tested more thoroughly.
247
+ * Amazon EC2 API tools (java-based) no longer installed by default because they're not used on most servers. They're needed only for registering a rebundled image so there's now a script to install them: /usr/local/ec2-on-rails/install_ec2_api_tools.sh. The ruby-based EC2 image tools are still installed.
248
+ * 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.
249
+ * Removed ImageMagick, RMagick and hpricot due to popular demand. There will soon be cap2 tasks to customize which packages and gems are installed.
250
+
251
+ h4. 0.8.1, ami-b79a7fde
252
+
253
+ 29 July 2007
254
+ * Fixed S3 backup cron job.
255
+ * Added script to restore data from S3 (/usr/local/aws/bin/restore_app_db.rb). This is useful when setting up a staging server to test your deployment, you can have it set up with a copy of your production data to test your migrations.
256
+ * Rewrite rule now allows images/css on maintenance page
257
+ * 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).
258
+ * Added ImageMagick, RMagick and hpricot due to popular demand.
259
+
260
+ h4. 0.8.0, ami-4e907527
261
+
262
+ 20 June 2007
263
+ * Initial release.
25
264
 
26
265
 
27
266
  h2. How to submit patches
@@ -30,11 +269,7 @@ Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/
30
269
 
31
270
  The trunk repository is <code>svn://rubyforge.org/var/svn/ec2onrails/trunk</code> for anonymous access.
32
271
 
272
+
33
273
  h2. License
34
274
 
35
275
  This code is free to use under the terms of the GPL v2.
36
-
37
- h2. Contact
38
-
39
- Comments are welcome. Send an email to "Paul Dowman":http://pauldowman.com/contact or to the "forum":http://groups.google.com/group/ec2-on-rails
40
-
@@ -1,5 +1,5 @@
1
1
  body {
2
- background-color: #E1D1F1;
2
+ background-color: white;
3
3
  font-family: "Georgia", sans-serif;
4
4
  font-size: 16px;
5
5
  line-height: 1.6em;
@@ -17,14 +17,19 @@ h1 {
17
17
  letter-spacing: -0.1ex;
18
18
  margin: 5px;
19
19
  }
20
+ h4 {
21
+ margin-bottom: 0;
22
+ }
23
+ ul {
24
+ margin-top: 0;
25
+ }
20
26
  li {
21
27
  padding: 0;
22
28
  margin: 0;
23
29
  list-style-type: square;
24
30
  }
25
31
  a {
26
- color: #5E5AFF;
27
- background-color: #DAC;
32
+ color: #00266F;
28
33
  font-weight: normal;
29
34
  text-decoration: underline;
30
35
  }
@@ -45,7 +50,7 @@ blockquote {
45
50
  }
46
51
  .coda {
47
52
  text-align: right;
48
- color: #77f;
53
+ color: #444;
49
54
  font-size: smaller;
50
55
  }
51
56
 
@@ -101,8 +106,8 @@ pre, code {
101
106
  text-align: right;
102
107
  font-family: sans-serif;
103
108
  font-weight: normal;
104
- background-color: #B3ABFF;
105
- color: #141331;
109
+ background-color: #7CBBFF;
110
+ color: #7CBBFF;
106
111
  padding: 15px 20px 10px 20px;
107
112
  margin: 0 auto;
108
113
  margin-top: 15px;
@@ -120,7 +125,7 @@ pre, code {
120
125
  #version p {
121
126
  text-decoration: none;
122
127
  color: #141331;
123
- background-color: #B3ABFF;
128
+ background-color: #7CBBFF;
124
129
  margin: 0;
125
130
  padding: 0;
126
131
  }
@@ -128,7 +133,7 @@ pre, code {
128
133
  #version a {
129
134
  text-decoration: none;
130
135
  color: #141331;
131
- background-color: #B3ABFF;
136
+ background-color: #7CBBFF;
132
137
  }
133
138
 
134
139
  .clickable {
@@ -42,7 +42,12 @@
42
42
  </p>
43
43
  </div>
44
44
 
45
- <!-- insert site tracking codes here, like Google Urchin -->
45
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
46
+ </script>
47
+ <script type="text/javascript">
48
+ _uacct = "UA-2759652-1";
49
+ urchinTracker();
50
+ </script>
46
51
 
47
52
  </body>
48
53
  </html>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ec2onrails
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.3
7
- date: 2007-10-06 00:00:00 -04:00
6
+ version: 0.9.4
7
+ date: 2007-10-25 00:00:00 -04:00
8
8
  summary: Client-side libraries (Capistrano tasks) for managing and deploying to EC2 on Rails servers.
9
9
  require_paths:
10
10
  - lib