isaac-deprec 1.99.30 → 1.99.32

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.
@@ -1,30 +1,31 @@
1
1
  # Copyright 2006-2008 by Mike Bailey. All rights reserved.
2
2
  Capistrano::Configuration.instance(:must_exist).load do
3
3
 
4
+ set :ree_version, "ruby-enterprise-1.8.6-20090113"
5
+ set :ree_install_dir, "/opt/ree"
6
+ set :ree_filename, "#{ree_version}.tar.gz"
7
+
4
8
  namespace :deprec do
5
9
  namespace :ree do
6
10
 
7
- set :ree_version, "ruby-enterprise-1.8.6-20081217"
8
- set :ree_install_dir, "/opt/#{ree_version}"
9
- set :ree_filename, "#{ree_version}.tar.gz"
10
-
11
11
  SRC_PACKAGES[:ree] = {
12
- :md5sum => "8d04b48e33a485280b86d6cdb156eebe #{ree_filename}",
13
- :url => "http://github.com/isaac/rubyenterpriseedition/raw/release/#{ree_filename}",
12
+ :filename => ree_filename,
13
+ :md5sum => "e8d796a5bae0ec1029a88ba95c5d901d #{ree_filename}",
14
+ :url => "http://rubyforge.org/frs/download.php/50087/#{ree_filename}",
14
15
  :unpack => "tar xzvf #{ree_filename};",
15
16
  :configure => '',
16
17
  :make => '',
17
18
  :install => "./installer --auto #{ree_install_dir}"
18
19
  }
19
-
20
+
20
21
  task :install do
21
22
  install_deps
22
- deprec2.download_src(SRC_PACKAGES[:ree], ree_install_dir)
23
- deprec2.install_from_src(SRC_PACKAGES[:ree], ree_install_dir)
23
+ deprec2.download_src(SRC_PACKAGES[:ree], src_dir)
24
+ deprec2.install_from_src(SRC_PACKAGES[:ree], src_dir)
24
25
  end
25
26
 
26
27
  task :install_deps do
27
- apt.install({:base => %w(zlib1g-dev libssl-dev libmysqlclient15-dev libreadline5-dev)}, :stable)
28
+ apt.install({:base => %w(libssl-dev libmysqlclient15-dev libreadline5-dev)}, :stable)
28
29
  end
29
30
 
30
31
  end
@@ -5,18 +5,9 @@ Capistrano::Configuration.instance(:must_exist).load do
5
5
  namespace :ruby do
6
6
 
7
7
  SRC_PACKAGES[:ruby] = {
8
- :filename => 'ruby-1.8.6-p287.tar.gz',
9
- :md5sum => "f6cd51001534ced5375339707a757556 ruby-1.8.6-p287.tar.gz",
10
- :dir => 'ruby-1.8.6-p287',
11
- :url => "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.gz",
12
- :unpack => "tar zxf ruby-1.8.6-p287.tar.gz;",
13
- :configure => %w(
14
- ./configure
15
- --with-readline-dir=/usr/local
16
- ;
17
- ).reject{|arg| arg.match '#'}.join(' '),
18
- :make => 'make;',
19
- :install => 'make install;'
8
+ :md5sum => "5e5b7189674b3a7f69401284f6a7a36d ruby-1.8.7-p72.tar.gz",
9
+ :url => "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz",
10
+ :configure => "./configure --with-readline-dir=/usr/local;"
20
11
  }
21
12
 
22
13
  task :install do
@@ -59,7 +50,7 @@ Capistrano::Configuration.instance(:must_exist).load do
59
50
  task :install_deps do
60
51
  end
61
52
 
62
- end
53
+ end
54
+
63
55
  end
64
-
65
56
  end
@@ -27,12 +27,31 @@ Capistrano::Configuration.instance(:must_exist).load do
27
27
 
28
28
  end
29
29
 
30
- desc "Install some handy network utils"
30
+ desc "Install some useful network utils"
31
31
  task :net do
32
- apps = %w(lynx nmap netcat mailx mutt telnet vim-full dnsutils rsync)
32
+ apps = %w(lynx nmap netcat telnet dnsutils rsync curl wget)
33
33
  apt.install( {:base => apps}, :stable )
34
34
  end
35
35
 
36
+ desc "Install some useful mail utils"
37
+ task :mail do
38
+ apps = %w(mailx mutt)
39
+ apt.install( {:base => apps}, :stable )
40
+ end
41
+
42
+ desc "Install some useful utils"
43
+ task :other do
44
+ apps = %w(vim-full)
45
+ apt.install( {:base => apps}, :stable )
46
+ end
47
+
48
+ desc "Install handy utils"
49
+ task :handy do
50
+ net
51
+ mail
52
+ other
53
+ end
54
+
36
55
  end
37
56
  end
38
57
  end
@@ -22,9 +22,6 @@ Capistrano::Configuration.instance(:must_exist).load do
22
22
  namespace :deprec do
23
23
  namespace :wordpress do
24
24
 
25
- # We're using the lambda because we want wordpress_install_dir to
26
- # pick up on the value for :application if it's overridden in deploy.rb
27
- #
28
25
  SRC_PACKAGES[:wordpress] =
29
26
  {
30
27
  :url => "http://wordpress.org/latest.tar.gz",
@@ -88,7 +85,7 @@ Capistrano::Configuration.instance(:must_exist).load do
88
85
  task :create_database, :roles => lambda { db_host } do
89
86
  run <<-EOF
90
87
  mysql -u root -e 'create database #{DB_NAME}'
91
- mysql -u root -e 'grant all on sct_blog.* to '#{DB_USER}'@'%' identified by '#{DB_PASSWORD}'
88
+ mysql -u root -e 'grant all on #{DB_NAME}.* to '#{DB_USER}'@'%' identified by '#{DB_PASSWORD}'
92
89
  mysql -u root -e 'flush privileges'
93
90
  EOF
94
91
  end
@@ -96,4 +93,4 @@ Capistrano::Configuration.instance(:must_exist).load do
96
93
  end
97
94
  end
98
95
 
99
- end
96
+ end
@@ -12,66 +12,63 @@ Capistrano::Configuration.instance(:must_exist).load do
12
12
 
13
13
  # ref: http://www.eadz.co.nz/blog/article/xen-gutsy.html
14
14
 
15
+ desc "Install Xen"
16
+ task :install, :roles => :dom0 do
17
+ install_deps
18
+ disable_apparmour
19
+ disable_tls
20
+ enable_hardy_domu
21
+ initial_config
22
+ end
23
+
24
+ task :install_deps, :roles => :dom0 do
25
+ # for amd64 version of ubuntu 7.10
26
+ apt.install( {:base => %w(linux-image-xen bridge-utils libxen3.1 python-xen-3.1 xen-docs-3.1 xen-hypervisor-3.1 xen-ioemu-3.1 xen-tools xen-utils-3.1 lvm2)}, :stable )
27
+ # alternatively, for x86 version of ubuntu:
28
+ # apt-get install ubuntu-xen-server libc6-xen lvm2
29
+ end
30
+
31
+ task :disable_apparmour, :roles => :dom0 do
32
+ sudo '/etc/init.d/apparmor stop'
33
+ sudo 'update-rc.d -f apparmor remove'
34
+ end
35
+
36
+ task :disable_tls, :roles => :dom0 do
37
+ sudo 'mv /lib/tls /lib/tls.disabled'
38
+ end
39
+
15
40
  SYSTEM_CONFIG_FILES[:xen] = [
16
41
 
17
42
  {:template => "xend-config.sxp.erb",
18
43
  :path => '/etc/xen/xend-config.sxp',
19
44
  :mode => 0644,
20
45
  :owner => 'root:root'},
21
-
22
- {:template => "xen-tools.conf.erb",
23
- :path => '/etc/xen-tools/xen-tools.conf',
24
- :mode => 0644,
25
- :owner => 'root:root'},
26
-
27
- {:template => "xm.tmpl.erb",
28
- :path => '/etc/xen-tools/xm.tmpl',
29
- :mode => 0644,
30
- :owner => 'root:root'},
31
46
 
32
47
  {:template => "xendomains.erb",
33
48
  :path => '/etc/default/xendomains',
34
49
  :mode => 0755,
35
50
  :owner => 'root:root'},
36
51
 
37
- # This one is a bugfix for gutsy
38
- {:template => "15-disable-hwclock",
39
- :path => '/usr/lib/xen-tools/gutsy.d/15-disable-hwclock',
40
- :mode => 0755,
41
- :owner => 'root:root'},
42
-
43
- # This one is a bugfix for gutsy: domU -> domU networking is screwy
44
- # http://lists.xensource.com/archives/html/xen-users/2006-05/msg00818.html
45
- {:template => "40-setup-networking",
46
- :path => '/usr/lib/xen-tools/gutsy.d/40-setup-networking',
52
+ # This gives you a second network bridge on second ethernet device
53
+ {:template => "network-bridge-wrapper",
54
+ :path => '/etc/xen/scripts/network-bridge-wrapper',
47
55
  :mode => 0755,
48
56
  :owner => 'root:root'},
49
57
 
50
- # So is this - xendomains fails to shut down domains on system shutdown
58
+ # Bugfix for gutsy - xendomains fails to shut down domains on system shutdown
51
59
  {:template => "xend-init.erb",
52
60
  :path => '/etc/init.d/xend',
53
61
  :mode => 0755,
54
- :owner => 'root:root'},
55
-
56
- # This gives you a second network bridge on second ethernet device
57
- {:template => "network-bridge-wrapper",
58
- :path => '/etc/xen/scripts/network-bridge-wrapper',
59
- :mode => 0755,
60
62
  :owner => 'root:root'}
61
63
 
62
64
  ]
63
65
 
64
- desc "Install Xen"
65
- task :install, :roles => :dom0 do
66
- install_deps
67
- enable_hardy_domu
68
- end
69
-
70
- task :install_deps, :roles => :dom0 do
71
- # for amd64 version of ubuntu 7.10
72
- apt.install( {:base => %w(linux-image-xen bridge-utils libxen3.1 python-xen-3.1 xen-docs-3.1 xen-hypervisor-3.1 xen-ioemu-3.1 xen-tools xen-utils-3.1 lvm2)}, :stable )
73
- # alternatively, for x86 version of ubuntu:
74
- # apt-get install ubuntu-xen-server libc6-xen
66
+ desc "Push Xen config files to server"
67
+ task :initial_config, :roles => :dom0 do
68
+ # Non-standard! We're pushing these straight out
69
+ SYSTEM_CONFIG_FILES[:xen].each do |file|
70
+ deprec2.render_template(:xen, file.merge(:remote => true))
71
+ end
75
72
  end
76
73
 
77
74
  desc "Generate configuration file(s) for Xen from template(s)"
@@ -132,7 +129,6 @@ Capistrano::Configuration.instance(:must_exist).load do
132
129
  build_slice_from_tarball
133
130
  end
134
131
 
135
-
136
132
  task :copy_disk do
137
133
  mnt_dir = "/mnt/#{xen_slice}-disk"
138
134
  tarball = "/tmp/#{xen_slice}-disk.tar"
@@ -187,8 +183,9 @@ Capistrano::Configuration.instance(:must_exist).load do
187
183
  sudo "rmdir #{mnt_dir}", :hosts => xen_new_host
188
184
  end
189
185
 
190
- desc "Enable hardy heron domU's on gutsy dom0"
186
+ desc "Enable hardy heron domU's on gutsy dom0. (Note required on hardy)"
191
187
  task :enable_hardy_domu, :roles => :dom0 do
188
+ # Note, hardy keeps debootrap in /usr/share/debootstrap/scripts/
192
189
  # create debootstrap symlink
193
190
  sudo "ln -sf /usr/lib/debootstrap/scripts/gutsy /usr/lib/debootstrap/scripts/hardy"
194
191
  # link xen-tools hooks
@@ -200,6 +197,7 @@ Capistrano::Configuration.instance(:must_exist).load do
200
197
  end
201
198
 
202
199
  end
200
+
203
201
  end
204
202
  end
205
203
 
@@ -25,13 +25,6 @@
25
25
 
26
26
  </dl>
27
27
 
28
- <dl>
29
- <p>Installation options</p>
30
- <% SRC_PACKAGES[:apache].each do |key, val| %>
31
- <dt><%= key %></dt>
32
- <dd><%= val %></dd>
33
- <% end %>
34
- </dl>
35
28
  </div>
36
29
  </body>
37
30
  </html>
@@ -1,10 +1,10 @@
1
1
  ---
2
- user: <%= mongrel_user %>
3
- group: <%= mongrel_group %>
2
+ user: <%= app_user %>
3
+ group: <%= app_group %>
4
4
  cwd: <%= current_path %>
5
5
  log_file: <%= mongrel_log_dir %>/mongrel.log
6
6
  port: "<%= mongrel_port.to_s %>"
7
7
  environment: <%= mongrel_environment %>
8
8
  address: <%= mongrel_address %>
9
9
  pid_file: <%= mongrel_pid_dir %>/mongrel.pid
10
- servers: <%= mongrel_servers.to_s %>
10
+ servers: <%= mongrel_servers.to_s %>
@@ -1,10 +1,21 @@
1
- <VirtualHost *:80>
2
- ServerName <%= domain %>
3
- DocumentRoot "<%= passenger_document_root %>"
4
- RailsEnv <%= rails_env %>
5
- RailsAllowModRewrite <%= passenger_rails_allow_mod_rewrite %>
6
- <directory "<%= passenger_document_root %>">
7
- Order allow,deny
8
- Allow from all
9
- </directory>
10
- </VirtualHost>
1
+ # Don't cause the server to break if Passenger module not loaded
2
+ <IfModule passenger_module>
3
+ <VirtualHost *:80>
4
+ ServerName <%= domain %>
5
+ DocumentRoot "<%= passenger_document_root %>"
6
+ RailsEnv <%= rails_env %>
7
+ # RailsAllowModRewrite <%= passenger_rails_allow_mod_rewrite %>
8
+ #
9
+ # Check for maintenance file and redirect all requests
10
+ RewriteEngine On
11
+ RewriteCond %{REQUEST_URI} !\.(css|jpg|png|gif)$
12
+ RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
13
+ RewriteCond %{SCRIPT_FILENAME} !maintenance.html
14
+ RewriteRule ^.*$ /system/maintenance.html [L]
15
+ <Directory "<%= passenger_document_root %>">
16
+ Order allow,deny
17
+ Allow from all
18
+ </Directory>
19
+ </VirtualHost>
20
+ </IfModule>
21
+
@@ -17,7 +17,7 @@
17
17
  # ssh_config(5) man page.
18
18
 
19
19
  Host *
20
- # ForwardAgent no
20
+ ForwardAgent yes
21
21
  # ForwardX11 no
22
22
  # ForwardX11Trusted yes
23
23
  # RhostsRSAAuthentication no
@@ -60,7 +60,7 @@
60
60
  #(xend-tcp-xmlrpc-server no)
61
61
  #(xend-unix-xmlrpc-server yes)
62
62
  #(xend-relocation-server no)
63
- (xend-relocation-server yes)
63
+ (xend-relocation-server no)
64
64
 
65
65
  #(xend-unix-path /var/lib/xend/xend-socket)
66
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isaac-deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.30
4
+ version: 1.99.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bailey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-19 00:00:00 -08:00
12
+ date: 2009-01-04 00:00:00 -08:00
13
13
  default_executable: depify
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -1,20 +0,0 @@
1
- # http://www.modrails.com/documentation/Users%20guide.html#_configuring_phusion_passenger
2
-
3
- LoadModule passenger_module <%= passenger_install_dir %>/ext/apache2/mod_passenger.so
4
- PassengerRoot <%= passenger_install_dir %>
5
- PassengerLogLevel <%= passenger_log_level %>
6
- PassengerRuby /usr/local/bin/ruby
7
- PassengerUserSwitching <%= passenger_user_switching %>
8
- PassengerDefaultUser <%= passenger_default_user %>
9
- PassengerMaxPoolSize <%= passenger_max_pool_size %>
10
- PassengerMaxInstancesPerApp <%= passenger_max_instances_per_app %>
11
- PassengerPoolIdleTime <%= passenger_pool_idle_time %>
12
-
13
- # Ruby on Rails Options
14
-
15
- RailsAutoDetect <%= passenger_rails_autodetect %>
16
- RailsSpawnMethod <%= passenger_rails_spawn_method %>
17
-
18
- <IfModule passenger_module>
19
- NameVirtualHost *:80
20
- </IfModule>
@@ -1,40 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # This script disables the hardware clock.
4
- #
5
- # Steve
6
- # --
7
- # http://www.steve.org.uk/
8
-
9
-
10
- prefix=$1
11
-
12
-
13
- #
14
- # Source our common functions
15
- #
16
- if [ -e /usr/lib/xen-tools/common.sh ]; then
17
- . /usr/lib/xen-tools/common.sh
18
- else
19
- . ./hooks/common.sh
20
- fi
21
-
22
-
23
- #
24
- # Log our start
25
- #
26
- logMessage Script $0 starting
27
-
28
-
29
- #
30
- # Disable the startup scripts from all runlevels.
31
- #
32
- chroot ${prefix} /usr/sbin/update-rc.d -f hwclock.sh remove
33
- chroot ${prefix} /usr/sbin/update-rc.d -f hwclockfirst.sh remove
34
- rm -f ${prefix}/etc/init.d/hwclock.sh ${prefix}/etc/init.d/hwclockfirst.sh ${prefix}/etc/udev/rules.d/85-hwclock.rules
35
-
36
- #
37
- # Log our finish
38
- #
39
- logMessage Script $0 finished.
40
-
@@ -1,145 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # This script sets up the /etc/network/interface file for the new
4
- # image.
5
- #
6
- # Steve
7
- # --
8
- # http://www.steve.org.uk/
9
-
10
-
11
- prefix=$1
12
-
13
- #
14
- # Source our common functions
15
- #
16
- if [ -e /usr/lib/xen-tools/common.sh ]; then
17
- . /usr/lib/xen-tools/common.sh
18
- else
19
- . ./hooks/common.sh
20
- fi
21
-
22
-
23
- #
24
- # Log our start
25
- #
26
- logMessage Script $0 starting
27
-
28
-
29
- #
30
- # Make sure we have an /etc/network directory.
31
- #
32
- mkdir -p ${prefix}/etc/network
33
-
34
-
35
- #
36
- # A function to setup DHCP for our new image.
37
- #
38
- setupDynamicNetworking ()
39
- {
40
- #
41
- # The host is using DHCP.
42
- #
43
- cat <<E_O_DHCP > ${prefix}/etc/network/interfaces
44
- # This file describes the network interfaces available on your system
45
- # and how to activate them. For more information, see interfaces(5).
46
-
47
- # The loopback network interface
48
- auto lo
49
- iface lo inet loopback
50
-
51
- # The primary network interface
52
- auto eth0
53
- iface eth0 inet dhcp
54
- post-up ethtool -K eth0 tx off
55
-
56
- #
57
- # The commented out line above will disable TCP checksumming which
58
- # might resolve problems for some users. It is disabled by default
59
- #
60
- E_O_DHCP
61
- }
62
-
63
-
64
-
65
- #
66
- # A function to setup static IP addresses for our new image.
67
- #
68
- setupStaticNetworking ()
69
- {
70
- #
71
- # broadcast address?
72
- #
73
- bcast='';
74
- if [ ! -z "${broadcast}" ]; then
75
- bcast=" broadcast ${broadcast}"
76
- fi
77
-
78
- #
79
- # We have a static IP address
80
- #
81
- cat <<E_O_STATIC >${prefix}/etc/network/interfaces
82
- # This file describes the network interfaces available on your system
83
- # and how to activate them. For more information, see interfaces(5).
84
-
85
- # The loopback network interface
86
- auto lo
87
- iface lo inet loopback
88
-
89
- # The primary network interface
90
- auto eth0
91
- iface eth0 inet static
92
- address ${ip1}
93
- gateway ${gateway}
94
- netmask ${netmask}
95
- ${bcast}
96
- post-up ethtool -K eth0 tx off
97
-
98
- #
99
- # The commented out line above will disable TCP checksumming which
100
- # might resolve problems for some users. It is disabled by default
101
- #
102
- E_O_STATIC
103
-
104
- interface=1
105
- count=2
106
-
107
- while [ "${count}" -le "${ip_count}" ]; do
108
-
109
- value=\$ip${count}
110
- value=`eval echo $value`
111
-
112
- logMessage Adding etho:${interface}
113
-
114
- cat <<E_O_STATIC >>${prefix}/etc/network/interfaces
115
- auto eth0:${interface}
116
- iface eth0:${interface} inet static
117
- address ${value}
118
- netmask ${netmask}
119
- post-up ethtool -K eth0 tx off
120
- E_O_STATIC
121
- count=`expr $count + 1`
122
- interface=`expr $interface + 1`
123
- done
124
- }
125
-
126
-
127
-
128
-
129
- #
130
- # Call the relevant function
131
- #
132
- if [ -z "${dhcp}" ]; then
133
- logMessage "Setting up static networking"
134
- setupStaticNetworking
135
-
136
- else
137
- logMessage "Setting up DHCP networking"
138
- setupDynamicNetworking
139
- fi
140
-
141
-
142
- #
143
- # Log our finish
144
- #
145
- logMessage Script $0 finished