slingshot 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/slingshot/recipes.rb +4 -1
- data/lib/slingshot/server_setup.rb +17 -27
- data/lib/slingshot/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/slingshot/recipes.rb
CHANGED
@@ -78,6 +78,10 @@ set :crontab_email, "root@localhost"
|
|
78
78
|
|
79
79
|
set :mongrel_cluster_configuration_dir, "/etc/mongrel_cluster"
|
80
80
|
|
81
|
+
# set this to true to ensure that the apache config file gets loaded first
|
82
|
+
# we build 00_application.conf to ensure it is first in the load path
|
83
|
+
set :primary_web_configuration_loaded_first, false
|
84
|
+
|
81
85
|
# =============================================================================
|
82
86
|
# RAILS APPLICATION CONFIGURATION TASKS
|
83
87
|
# =============================================================================
|
@@ -109,7 +113,6 @@ task :after_setup do
|
|
109
113
|
mongrel_configuration_setup
|
110
114
|
database_configuration_setup
|
111
115
|
apache_configuration_setup
|
112
|
-
apache_redirects_setup
|
113
116
|
crontab_configuration_setup
|
114
117
|
|
115
118
|
end
|
@@ -65,7 +65,7 @@ task :yum_update_system do
|
|
65
65
|
retry
|
66
66
|
end
|
67
67
|
|
68
|
-
run "yum -y install curl lynx gcc mysql mysql-server mysql-devel postfix subversion mod_dav_svn monit rdiff-backup zlib zlib-devel openssl openssl-devel ImageMagick ImageMagick-devel ntp"
|
68
|
+
run "yum -y install curl lynx gcc make mysql mysql-server mysql-devel postfix subversion mod_dav_svn monit rdiff-backup zlib zlib-devel openssl openssl-devel ImageMagick ImageMagick-devel ntp ncurses-devel"
|
69
69
|
end
|
70
70
|
|
71
71
|
desc "Add default users"
|
@@ -379,9 +379,22 @@ EOF
|
|
379
379
|
downgrade-1.0 force-response-1.0
|
380
380
|
</IfModule>
|
381
381
|
</VirtualHost>
|
382
|
+
|
382
383
|
EOF
|
383
384
|
end
|
384
385
|
|
386
|
+
if redirect_www_requests
|
387
|
+
apache2_rails_conf +=<<-EOF
|
388
|
+
<VirtualHost *:80>
|
389
|
+
ServerName #{domain_name}
|
390
|
+
ServerAlias www.#{domain_name}
|
391
|
+
ServerAdmin support@#{domain_name}
|
392
|
+
RedirectPermanent / "http://www.#{domain_name}/"
|
393
|
+
</VirtualHost>
|
394
|
+
|
395
|
+
EOF
|
396
|
+
end
|
397
|
+
|
385
398
|
apache2_rails_conf +=<<-EOF
|
386
399
|
<Proxy balancer://#{application}_mongrel_cluster>
|
387
400
|
EOF
|
@@ -412,8 +425,8 @@ EOF
|
|
412
425
|
apache2_rails_configuration = render :template => apache2_rails_conf
|
413
426
|
|
414
427
|
apache2_rails_common = render :template => <<-EOF
|
415
|
-
ServerName #{
|
416
|
-
ServerAlias www.#{
|
428
|
+
ServerName #{domain_name}
|
429
|
+
ServerAlias www.#{domain_name}
|
417
430
|
DocumentRoot #{deploy_to}/current/public
|
418
431
|
|
419
432
|
<Directory "#{deploy_to}/current/public">
|
@@ -464,34 +477,11 @@ EOF
|
|
464
477
|
|
465
478
|
# if apache is setup to read /etc/rails/*.conf these will get read as configuration files
|
466
479
|
# see prerequisites above for more info
|
467
|
-
sudo "ln -nfs #{deploy_to}/#{shared_dir}/system/#{application}.conf #{apache_conf_home}/#{application}.conf"
|
480
|
+
sudo "ln -nfs #{deploy_to}/#{shared_dir}/system/#{application}.conf #{apache_conf_home}/#{primary_web_configuration_loaded_first ? "00_" : ""}#{application}.conf"
|
468
481
|
sudo "ln -nfs #{deploy_to}/#{shared_dir}/system/#{application}.common #{apache_conf_home}/#{application}.common"
|
469
482
|
|
470
483
|
end
|
471
484
|
|
472
|
-
desc "Apache Redirects for ensuring www.servername.com answers"
|
473
|
-
task :apache_redirects_setup do
|
474
|
-
|
475
|
-
if redirect_www_requests
|
476
|
-
redirect_apache2_rails_conf = <<-EOF
|
477
|
-
<VirtualHost *:80>
|
478
|
-
ServerName #{domain_name}
|
479
|
-
ServerAlias www.#{domain_name}
|
480
|
-
ServerAdmin support@#{domain_name}
|
481
|
-
RedirectPermanent / "http://www.#{domain_name}/"
|
482
|
-
</VirtualHost>
|
483
|
-
|
484
|
-
EOF
|
485
|
-
|
486
|
-
redirect_apache2_rails_configuration = render :template => redirect_apache2_rails_conf
|
487
|
-
|
488
|
-
put redirect_apache2_rails_configuration, "#{deploy_to}/#{shared_dir}/system/redirects.conf"
|
489
|
-
|
490
|
-
# since apache is setup to read /etc/rails/*.conf these will get read as configuration files
|
491
|
-
sudo "ln -nfs #{deploy_to}/#{shared_dir}/system/redirects.conf #{apache_conf_home}/redirects.conf"
|
492
|
-
end
|
493
|
-
end
|
494
|
-
|
495
485
|
desc "Setup crontab Configuration"
|
496
486
|
task :crontab_configuration_setup do
|
497
487
|
|
data/lib/slingshot/version.rb
CHANGED
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.
|
36
|
+
<a href="http://rubyforge.org/projects/slingshot" class="numbers">1.1.2</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
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.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.1.2
|
7
|
+
date: 2007-11-03 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
|