slingshot 1.1.0 → 1.1.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.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.1.1 2007-08-17
2
+
3
+ * few minor tweaks relating to directory creation on startup
4
+
1
5
  == 1.1.0 2007-07-13
2
6
 
3
7
  * updated to work with CentOS 5
@@ -82,27 +82,25 @@ set :mongrel_cluster_configuration_dir, "/etc/mongrel_cluster"
82
82
  # RAILS APPLICATION CONFIGURATION TASKS
83
83
  # =============================================================================
84
84
 
85
- # desc "Tasks to execute before initial setup"
86
- # task :before_setup do
87
- # sudo "mkdir -p #{File.dirname(deploy_to)}"
88
- # sudo "chown -R #{user}:#{group} #{File.dirname(deploy_to)}"
89
- #
90
- # sudo "mkdir -p #{mongrel_cluster_configuration_dir}"
91
- # sudo "mkdir -p #{rails_apache_configuration_dir}"
92
- # end
85
+ desc "Tasks to execute before initial setup"
86
+ task :before_setup do
87
+
88
+ # make shared system dir to hold config files
89
+ run "mkdir -p #{deploy_to}/#{shared_dir}/system"
90
+
91
+ run "mkdir -p #{mongrel_cluster_configuration_dir}"
92
+ run "mkdir -p #{apache_conf_home}"
93
+ end
93
94
 
94
95
  desc "Tasks to execute after initial setup"
95
96
  task :after_setup do
96
97
 
97
- # make shared config dir to hold config files
98
- # run "mkdir -p #{deploy_to}/#{shared_dir}/config"
99
-
100
98
  # make a shared tmp dir for sessions
101
- # run "mkdir -p #{deploy_to}/#{shared_dir}/tmp"
102
- # run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/cache"
103
- # run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/sessions"
104
- # run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/sockets"
105
- # run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/pids"
99
+ run "mkdir -p #{deploy_to}/#{shared_dir}/tmp"
100
+ run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/cache"
101
+ run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/sessions"
102
+ run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/sockets"
103
+ run "mkdir -p #{deploy_to}/#{shared_dir}/tmp/pids"
106
104
 
107
105
  # create any other shared dirs
108
106
  # run "mkdir -p #{deploy_to}/#{shared_dir}/db"
@@ -14,9 +14,9 @@ set :apache2, "httpd-2.2.4"
14
14
  set :apache2_url, "http://www.apache.org/dist/httpd/#{apache2}.tar.gz"
15
15
  set :readline_lib, "readline-5.1"
16
16
  set :readline_lib_url, "ftp://ftp.gnu.org/gnu/readline/#{readline_lib}.tar.gz"
17
- set :ruby, "ruby-1.8.5-p2"
18
- set :ruby_url, "http://ftp.ruby-lang.org/pub/ruby/1.8/#{ruby}.tar.gz"
19
- set :ruby_gems, "rubygems-0.9.2"
17
+ set :ruby, "ruby-1.8.6"
18
+ set :ruby_url, "ftp://ftp.ruby-lang.org/pub/ruby/#{ruby}.tar.gz"
19
+ set :ruby_gems, "rubygems-0.9.4"
20
20
  set :ruby_gems_url, "http://rubyforge.iasi.roedu.net/files/rubygems/#{ruby_gems}.tgz"
21
21
 
22
22
  desc "The Slingshot Setup Script"
@@ -138,6 +138,11 @@ task :create_startup_files_and_entries do
138
138
  run "/sbin/chkconfig --level 345 mongrel_cluster on"
139
139
  run "mkdir -p /etc/mongrel_cluster"
140
140
  run "chown -R #{deploy_username} /etc/mongrel_cluster"
141
+ run "mkdir -p /var/run/mongrel_cluster"
142
+ run "chown -R #{deploy_username} /var/run/mongrel_cluster"
143
+
144
+ run "mkdir -p #{File.dirname(deploy_to)}"
145
+ run "chown -R #{deploy_username}:#{group} #{File.dirname(deploy_to)}"
141
146
 
142
147
  # run "mkdir -p /etc/rails"
143
148
  # run "chown deploy -R /etc/rails"
@@ -305,8 +310,8 @@ EOF
305
310
  # run "cp #{File.basename(apache2_start_script)} /etc/init.d/apache2"
306
311
  put apache2_start_script, "/etc/init.d/apache2"
307
312
  run "chmod +x /etc/init.d/apache2"
308
- run "/etc/init.d/apache2 start"
309
- run "/sbin/chkconfig apache2 on"
313
+ # run "/etc/init.d/apache2 start"
314
+ # run "/sbin/chkconfig apache2 on"
310
315
  end
311
316
 
312
317
  desc "Setup monit daemon monitoring"
@@ -2,7 +2,7 @@ module Slingshot #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Slingshot</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/slingshot"; return false'>
35
35
  Get Version
36
- <a href="http://rubyforge.org/projects/slingshot" class="numbers">1.1.0</a>
36
+ <a href="http://rubyforge.org/projects/slingshot" class="numbers">1.1.1</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
 
@@ -98,18 +98,22 @@ to (capify) our application:</p>
98
98
 
99
99
  <pre syntax="ruby">cap -A /path/to/my/rails/app</pre>
100
100
 
101
- <p>Next, open up the config/deploy.rb, and require the slingshot gem:</p>
101
+ <p>Next, open up the config/deploy.rb, and require the mongrel cluster and
102
+ slingshot gems:</p>
102
103
 
103
104
 
104
- <pre syntax="ruby">require 'slingshot'</pre>
105
+ <pre syntax="ruby">
106
+ require 'mongrel_cluster/recipes'
107
+ require 'slingshot'
108
+ </pre>
105
109
 
106
110
  <p>We now need to configure a few variables, simply add these to the
107
111
  config/deploy.rb:</p>
108
112
 
109
113
 
110
114
  <pre syntax="ruby">
111
- set :application, "application"
112
- set :repository, "http://svn.yourhost.com/#{application}/trunk"
115
+ set :application, "application"
116
+ set :repository, "http://svn.yourhost.com/#{application}/trunk"
113
117
 
114
118
  set :server_name, 'daytona.slingshothosting.com'
115
119
  set :server_ip, '1.2.3.4'
@@ -118,9 +122,20 @@ set :server_fqdn, 'daytona.slingshothosting.com'
118
122
  set :domain_name, 'yourdomain.com'
119
123
 
120
124
  set :user, 'deploy'
125
+ set :group, 'users'
121
126
  set :password, 'password'
122
127
 
123
128
  set :deploy_to, "/var/www/apps/#{application}"
129
+ set :deploy_username, 'deploy'
130
+ set :deploy_password, 'password'
131
+
132
+ set :svn_username, 'deploy'
133
+ set :svn_password, 'password'
134
+
135
+ set :database_username, 'deploy'
136
+ set :database_password, 'password'
137
+
138
+ set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
124
139
  </pre>
125
140
 
126
141
  <p>You can also optionally set a valid timezone such as <span class="caps">EST</span>, EST5EDT,
@@ -167,6 +182,72 @@ cap restart_web
167
182
  </ul>
168
183
 
169
184
 
185
+ <h2>Gem installation</h2>
186
+
187
+
188
+ <p>You can setup additional gems using capistrano. Here are some examples:</p>
189
+
190
+
191
+ <pre syntax="ruby">
192
+ # this command:
193
+ # sudo gem install rails --include-dependencies
194
+ # is:
195
+ gem.install 'rails'
196
+
197
+ # this command:
198
+ # sudo gem install mysql --version $MYSQLGEM_VERSION -- --with-mysql-config
199
+ # is:
200
+ gem.select 'mysql', :version =&gt; '2.7', :platform =&gt; 'ruby', :extra_params =&gt; '-- --with-mysql-config'
201
+
202
+ # can also do a list
203
+ gem.install 'net-ssh capistrano termios rmagick RedCloth BlueCloth'
204
+
205
+ # more examples:
206
+ gem.select 'ferret', :version =&gt; '0.11.3', :platform =&gt; 'ruby'
207
+ gem.select 'Hpricot', :version =&gt; '0.5', :platform =&gt; 'ruby'
208
+ gem.install 'rmagick aws-s3 runt zentest diff-lcs'
209
+
210
+ </pre>
211
+
212
+ <p>You can put these in your own tasks to install gems using capistrano.</p>
213
+
214
+
215
+ <h2>Some Variables you can Override</h2>
216
+
217
+
218
+ <p>If you&#8217;re going to host multiple applications on the same server, there are
219
+ a few variables you&#8217;ll want to override. Most importantly are the mongrel
220
+ starting port and application name.</p>
221
+
222
+
223
+ <p>Here are some more totally optional variables. See the recipes themselves
224
+ for more information.</p>
225
+
226
+
227
+ <pre syntax="ruby">
228
+ # ssl certificates must live in the /path/to/apache/conf/ssl directory
229
+ set :configure_ssl, false # set this to true to use SSL
230
+ set :ssl_certificate_file, "#{server_name}.pem"
231
+ set :ssl_certificate_key_file, "#{server_name}.key"
232
+ set :ssl_ca_certificate_file, 'sf_issuing.crt'
233
+
234
+ # set this to the correct db adapter and settings
235
+ set :database, "mysql"
236
+ set :database_host, "localhost"
237
+
238
+ # saves space by only keeping last 3 when running cleanup
239
+ set :keep_releases, 3
240
+
241
+ # issues svn export instead of checkout
242
+ set :checkout, "export"
243
+
244
+ # number of mongrel servers to start
245
+ set :mongrel_servers, 3
246
+
247
+ # mongrel starting port
248
+ set :mongrel_start_port, 8000
249
+ </pre>
250
+
170
251
  <h2>Help</h2>
171
252
 
172
253
 
@@ -188,7 +269,7 @@ just holler at the Highgroove Studios or Slingshot Hosting team.</p>
188
269
 
189
270
  <p>Comments are welcome. Send an email to <a href="mailto:cbq@highgroove.com">Charles Brian Quinn</a>.</p>
190
271
  <p class="coda">
191
- <a href="mailto:cbq@highgroove.com">Charles Brian Quinn</a>, 2nd July 2007<br>
272
+ <a href="mailto:cbq@highgroove.com">Charles Brian Quinn</a>, 17th August 2007<br>
192
273
  Gem packager/webpage/scripts by <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a><br>
193
274
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
194
275
  </p>
data/website/index.txt CHANGED
@@ -48,16 +48,20 @@ to (capify) our application:
48
48
 
49
49
  <pre syntax="ruby">cap -A /path/to/my/rails/app</pre>
50
50
 
51
- Next, open up the config/deploy.rb, and require the slingshot gem:
51
+ Next, open up the config/deploy.rb, and require the mongrel cluster and
52
+ slingshot gems:
52
53
 
53
- <pre syntax="ruby">require 'slingshot'</pre>
54
+ <pre syntax="ruby">
55
+ require 'mongrel_cluster/recipes'
56
+ require 'slingshot'
57
+ </pre>
54
58
 
55
59
  We now need to configure a few variables, simply add these to the
56
60
  config/deploy.rb:
57
61
 
58
62
  <pre syntax="ruby">
59
- set :application, "application"
60
- set :repository, "http://svn.yourhost.com/#{application}/trunk"
63
+ set :application, "application"
64
+ set :repository, "http://svn.yourhost.com/#{application}/trunk"
61
65
 
62
66
  set :server_name, 'daytona.slingshothosting.com'
63
67
  set :server_ip, '1.2.3.4'
@@ -66,9 +70,20 @@ set :server_fqdn, 'daytona.slingshothosting.com'
66
70
  set :domain_name, 'yourdomain.com'
67
71
 
68
72
  set :user, 'deploy'
73
+ set :group, 'users'
69
74
  set :password, 'password'
70
75
 
71
- set :deploy_to, "/var/www/apps/#{application}"
76
+ set :deploy_to, "/var/www/apps/#{application}"
77
+ set :deploy_username, 'deploy'
78
+ set :deploy_password, 'password'
79
+
80
+ set :svn_username, 'deploy'
81
+ set :svn_password, 'password'
82
+
83
+ set :database_username, 'deploy'
84
+ set :database_password, 'password'
85
+
86
+ set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
72
87
  </pre>
73
88
 
74
89
  You can also optionally set a valid timezone such as EST, EST5EDT,
@@ -105,6 +120,67 @@ cap restart_web
105
120
  * TODO: explain some tips n tricks, like the monit setup tasks, etc.
106
121
  * TODO: add the initial steps to setting up a server (cap slingshot_setup, etc.)
107
122
 
123
+ h2. Gem installation
124
+
125
+ You can setup additional gems using capistrano. Here are some examples:
126
+
127
+ <pre syntax="ruby">
128
+ # this command:
129
+ # sudo gem install rails --include-dependencies
130
+ # is:
131
+ gem.install 'rails'
132
+
133
+ # this command:
134
+ # sudo gem install mysql --version $MYSQLGEM_VERSION -- --with-mysql-config
135
+ # is:
136
+ gem.select 'mysql', :version => '2.7', :platform => 'ruby', :extra_params => '-- --with-mysql-config'
137
+
138
+ # can also do a list
139
+ gem.install 'net-ssh capistrano termios rmagick RedCloth BlueCloth'
140
+
141
+ # more examples:
142
+ gem.select 'ferret', :version => '0.11.3', :platform => 'ruby'
143
+ gem.select 'Hpricot', :version => '0.5', :platform => 'ruby'
144
+ gem.install 'rmagick aws-s3 runt zentest diff-lcs'
145
+
146
+ </pre>
147
+
148
+ You can put these in your own tasks to install gems using capistrano.
149
+
150
+
151
+ h2. Some Variables you can Override
152
+
153
+ If you're going to host multiple applications on the same server, there are
154
+ a few variables you'll want to override. Most importantly are the mongrel
155
+ starting port and application name.
156
+
157
+ Here are some more totally optional variables. See the recipes themselves
158
+ for more information.
159
+
160
+ <pre syntax="ruby">
161
+ # ssl certificates must live in the /path/to/apache/conf/ssl directory
162
+ set :configure_ssl, false # set this to true to use SSL
163
+ set :ssl_certificate_file, "#{server_name}.pem"
164
+ set :ssl_certificate_key_file, "#{server_name}.key"
165
+ set :ssl_ca_certificate_file, 'sf_issuing.crt'
166
+
167
+ # set this to the correct db adapter and settings
168
+ set :database, "mysql"
169
+ set :database_host, "localhost"
170
+
171
+ # saves space by only keeping last 3 when running cleanup
172
+ set :keep_releases, 3
173
+
174
+ # issues svn export instead of checkout
175
+ set :checkout, "export"
176
+
177
+ # number of mongrel servers to start
178
+ set :mongrel_servers, 3
179
+
180
+ # mongrel starting port
181
+ set :mongrel_start_port, 8000
182
+ </pre>
183
+
108
184
  h2. Help
109
185
 
110
186
  No snazzy discussion group, forum, or lingr chat room yet, if you need help,
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: slingshot
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.0
7
- date: 2007-07-13 00:00:00 -04:00
6
+ version: 1.1.1
7
+ date: 2007-08-17 00:00:00 -04:00
8
8
  summary: Set of server setup tasks for use with Slingshot Hosting
9
9
  require_paths:
10
10
  - lib