deprec 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,13 @@
1
1
  == git
2
2
 
3
+ == 2.0.12 (June 24, 2009)
4
+
5
+ * Updated chef recipes
6
+
7
+ == 2.0.11 (June 19, 2009)
8
+
9
+ * Security update: ruby-1.8.7-p174
10
+
3
11
  == 2.0.10 (June 14, 2009)
4
12
 
5
13
  * Added CouchDB
@@ -111,7 +111,7 @@ Capistrano::Configuration.instance(:must_exist).load do
111
111
  end
112
112
 
113
113
  task :symlink_apache_vhost, :roles => :app do
114
- sudo "ln -sf #{deploy_to}/mongrel/apache_vhost.conf #{apache_vhost_dir}/#{application}.conf"
114
+ sudo "ln -sf #{deploy_to}/mongrel/apache_vhost.conf #{apache_vhost_dir}/#{application}"
115
115
  end
116
116
 
117
117
  task :symlink_nginx_vhost, :roles => :app do
@@ -3,21 +3,37 @@ Capistrano::Configuration.instance(:must_exist).load do
3
3
  namespace :deprec do
4
4
  namespace :chef do
5
5
 
6
+ set(:server_fqdn) { Capistrano::CLI.ui.ask 'Enter Chef server hostname' }
7
+ set(:recipes) { "chef::#{install_type}" }
8
+
9
+ default(:install_type) do
10
+ Capistrano::CLI.ui.choose do |menu|
11
+ %w(client server).each {|c| menu.choice(c)}
12
+ menu.header = "Select Chef version to install"
13
+ end
14
+ end
15
+
6
16
  desc "Install Chef"
7
17
  task :install do
18
+ config # Do this first so we can ensure we have any user input
8
19
  install_deps
9
- sudo "gem sources -a http://gems.opscode.com"
10
- sudo "gem install ohai chef --no-rdoc --no-ri"
11
- config
12
- sudo "sudo chef-solo -c /etc/chef/solo.rb -j /etc/chef/solo/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz"
20
+ run_solo
21
+ top.deprec.apache.restart if install_type == 'server'
22
+ end
23
+
24
+ desc "Run chef-solo to setup on server"
25
+ task :run_solo do
26
+ sudo 'chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz'
13
27
  end
14
28
 
15
29
  # Install dependencies for Chef
16
30
  task :install_deps, :roles => :chef do
17
- top.deprec.couchdb.install
18
- # top.deprec.ruby.install # XXX can we put this back in?
19
- apt.install( {:base => %w(ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb)}, :stable )
31
+ top.deprec.couchdb.install if install_type == 'server'
32
+ # apt.install( {:base => %w(ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb)}, :stable )
33
+ top.deprec.ruby.install
20
34
  top.deprec.rubygems.install
35
+ sudo "gem sources -a http://gems.opscode.com"
36
+ sudo "gem install ohai chef --no-rdoc --no-ri"
21
37
  end
22
38
 
23
39
  SYSTEM_CONFIG_FILES[:chef] = [
@@ -27,8 +43,8 @@ Capistrano::Configuration.instance(:must_exist).load do
27
43
  :mode => 0644,
28
44
  :owner => 'root:root'},
29
45
 
30
- {:template => "chef.json",
31
- :path => '/etc/chef/solo/chef.json',
46
+ {:template => "chef.json.erb",
47
+ :path => '/etc/chef/chef.json',
32
48
  :mode => 0644,
33
49
  :owner => 'root:root'}
34
50
 
@@ -46,36 +62,6 @@ Capistrano::Configuration.instance(:must_exist).load do
46
62
  deprec2.push_configs(:chef, SYSTEM_CONFIG_FILES[:chef])
47
63
  end
48
64
 
49
- # desc "Set Chef to start on boot"
50
- # task :activate, :roles => :chef do
51
- # send(run_method, "update-rc.d chef defaults")
52
- # end
53
- #
54
- # desc "Set Chef to not start on boot"
55
- # task :deactivate, :roles => :chef do
56
- # send(run_method, "update-rc.d -f chef remove")
57
- # end
58
- #
59
- # desc "Start Chef"
60
- # task :start, :roles => :web do
61
- # send(run_method, "/etc/init.d/chef start")
62
- # end
63
- #
64
- # desc "Stop Chef"
65
- # task :stop, :roles => :web do
66
- # send(run_method, "/etc/init.d/chef stop")
67
- # end
68
- #
69
- # desc "Restart Chef"
70
- # task :restart, :roles => :web do
71
- # send(run_method, "/etc/init.d/chef restart")
72
- # end
73
- #
74
- # desc "Reload Chef"
75
- # task :reload, :roles => :web do
76
- # send(run_method, "/etc/init.d/chef force-reload")
77
- # end
78
-
79
65
  end
80
66
 
81
67
  end
@@ -10,8 +10,8 @@ Capistrano::Configuration.instance(:must_exist).load do
10
10
  set :git_root, '/var/git'
11
11
 
12
12
  SRC_PACKAGES[:git] = {
13
- :url => "http://kernel.org/pub/software/scm/git/git-1.6.1.tar.gz",
14
- :md5sum => "1f915929d4f54a2e0449a4a08f093118 git-1.6.1.tar.gz"
13
+ :url => "http://kernel.org/pub/software/scm/git/git-1.6.3.2.tar.gz",
14
+ :md5sum => "c9819ba1ad3edbcf3b5de3116048d59f git-1.6.3.2.tar.gz"
15
15
  }
16
16
 
17
17
  desc "Install git"
@@ -5,8 +5,8 @@ Capistrano::Configuration.instance(:must_exist).load do
5
5
  namespace :mri do
6
6
 
7
7
  SRC_PACKAGES[:mri] = {
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",
8
+ :md5sum => "18dcdfef761a745ac7da45b61776afa5 ruby-1.8.7-p174.tar.gz",
9
+ :url => "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz",
10
10
  :configure => "./configure --with-readline-dir=/usr/local;"
11
11
  }
12
12
 
@@ -17,7 +17,6 @@ Capistrano::Configuration.instance(:must_exist).load do
17
17
  install_deps
18
18
  top.deprec.xentools.install
19
19
  disable_apparmour
20
- disable_tls
21
20
  # enable_hardy_domu Should only be run on gutsy
22
21
  initial_config
23
22
  end
@@ -27,7 +26,8 @@ Capistrano::Configuration.instance(:must_exist).load do
27
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 )
28
27
  # alternatively, for x86 version of ubuntu:
29
28
  # apt-get install ubuntu-xen-server libc6-xen lvm2
30
- apt.install( {:base => %w(ubuntu-xen-server libc6-xen lvm2)}, :stable )
29
+ # apt.install( {:base => %w(ubuntu-xen-server libc6-xen lvm2)}, :stable )
30
+ apt.install( {:base => %w(ubuntu-xen-server lvm2)}, :stable )
31
31
 
32
32
  end
33
33
 
@@ -36,9 +36,9 @@ Capistrano::Configuration.instance(:must_exist).load do
36
36
  sudo 'update-rc.d -f apparmor remove'
37
37
  end
38
38
 
39
- task :disable_tls, :roles => :dom0 do
40
- sudo 'mv /lib/tls /lib/tls.disabled'
41
- end
39
+ # task :disable_tls, :roles => :dom0 do
40
+ # sudo 'mv /lib/tls /lib/tls.disabled'
41
+ # end
42
42
 
43
43
  SYSTEM_CONFIG_FILES[:xen] = [
44
44
 
@@ -51,7 +51,7 @@ require "#{File.dirname(__FILE__)}/recipes/lvm"
51
51
  require "#{File.dirname(__FILE__)}/recipes/vnstat"
52
52
  require "#{File.dirname(__FILE__)}/recipes/sphinx"
53
53
  require "#{File.dirname(__FILE__)}/recipes/utils"
54
- require "#{File.dirname(__FILE__)}/recipes/apt_mirror"
54
+ # require "#{File.dirname(__FILE__)}/recipes/apt_mirror"
55
55
  # require "#{File.dirname(__FILE__)}/recipes/wordpress" Not working
56
56
  require "#{File.dirname(__FILE__)}/recipes/wpmu"
57
57
  require "#{File.dirname(__FILE__)}/recipes/ar_sendmail"
@@ -0,0 +1 @@
1
+ { "chef": { "server_fqdn": "<%= server_fqdn %>" }, "recipes": "<%= recipes %>" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
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: 2009-06-15 00:00:00 +10:00
12
+ date: 2009-06-24 00:00:00 +10:00
13
13
  default_executable: depify
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -47,7 +47,6 @@ files:
47
47
  - lib/deprec/recipes/aoe.rb
48
48
  - lib/deprec/recipes/app/mongrel.rb
49
49
  - lib/deprec/recipes/app/passenger.rb
50
- - lib/deprec/recipes/apt_mirror.rb
51
50
  - lib/deprec/recipes/ar_sendmail.rb
52
51
  - lib/deprec/recipes/canonical.rb
53
52
  - lib/deprec/recipes/chef.rb
@@ -96,12 +95,9 @@ files:
96
95
  - lib/deprec/templates/aoe/aoe-init
97
96
  - lib/deprec/templates/aoe/fence_aoemask
98
97
  - lib/deprec/templates/apache/namevirtualhosts.conf
99
- - lib/deprec/templates/apt/sources.list
100
- - lib/deprec/templates/apt_mirror/apt-mirror-cron
101
- - lib/deprec/templates/apt_mirror/mirror.list
102
98
  - lib/deprec/templates/ar_sendmail/logrotate.conf.erb
103
99
  - lib/deprec/templates/ar_sendmail/monit.conf.erb
104
- - lib/deprec/templates/chef/chef.json
100
+ - lib/deprec/templates/chef/chef.json.erb
105
101
  - lib/deprec/templates/chef/solo.rb
106
102
  - lib/deprec/templates/ddclient/ddclient.conf.erb
107
103
  - lib/deprec/templates/ddclient/ddclient.erb
@@ -1,98 +0,0 @@
1
- # Copyright 2006-2008 by Mike Bailey. All rights reserved.
2
- Capistrano::Configuration.instance(:must_exist).load do
3
- # ref: http://www.howtoforge.com/local_debian_ubuntu_mirror
4
- namespace :deprec do
5
-
6
- set :apt_mirror_hostname, 'archive.ubuntu.com'
7
- set :apt_releases_to_mirror, %w(gutsy)
8
-
9
- namespace :apt_normal do # XXX Find a better name
10
- # :apt was clashing with the vmbuilder plugin
11
-
12
- SYSTEM_CONFIG_FILES[:apt] = [
13
-
14
- {:template => 'sources.list',
15
- :path => '/etc/apt/sources.list',
16
- :mode => 0755,
17
- :owner => 'root:root'}
18
- ]
19
-
20
- desc <<-DESC
21
- Generate apt config from template. Note that this does not
22
- push the config to the server, it merely generates required
23
- configuration files. These should be kept under source control.
24
- The can be pushed to the server with the :config task.
25
- DESC
26
- task :config_gen do
27
- SYSTEM_CONFIG_FILES[:apt].each do |file|
28
- deprec2.render_template(:apt, file)
29
- end
30
- end
31
-
32
- desc "Push apt_mirror config files to server"
33
- task :config do
34
- deprec2.push_configs(:apt, SYSTEM_CONFIG_FILES[:apt])
35
- end
36
-
37
- end
38
-
39
- namespace :apt_mirror do
40
-
41
- desc "Install apt-mirror"
42
- task :install, :roles => :apt_mirror do
43
- install_deps
44
- SYSTEM_CONFIG_FILES[:apt_mirror].each do |file|
45
- deprec2.render_template(:apt_mirror, file.merge(:remote => true))
46
- end
47
- end
48
-
49
- # install dependencies for apt_mirror
50
- task :install_deps do
51
- apt.install( {:base => %w(apt-mirror apache2 cron)}, :stable )
52
- end
53
-
54
- SYSTEM_CONFIG_FILES[:apt_mirror] = [
55
-
56
- {:template => 'mirror.list',
57
- :path => '/etc/apt/mirror.list',
58
- :mode => 0755,
59
- :owner => 'root:root'},
60
-
61
- {:template => 'apt-mirror-cron',
62
- :path => '/etc/cron.d/apt-mirror',
63
- :mode => 0755,
64
- :owner => 'root:root'}
65
- ]
66
-
67
- desc <<-DESC
68
- Generate apt_mirror config from template. Note that this does not
69
- push the config to the server, it merely generates required
70
- configuration files. These should be kept under source control.
71
- The can be pushed to the server with the :config task.
72
- DESC
73
- task :config_gen do
74
- SYSTEM_CONFIG_FILES[:apt_mirror].each do |file|
75
- deprec2.render_template(:apt_mirror, file)
76
- end
77
- end
78
-
79
- desc "Push apt_mirror config files to server"
80
- task :config, :roles => :apt_mirror do
81
- deprec2.push_configs(:apt_mirror, SYSTEM_CONFIG_FILES[:apt_mirror])
82
- end
83
-
84
- # Create mirror for the first time
85
- #
86
- # su - apt-mirror -c apt-mirror
87
-
88
- # Add cron job to update
89
-
90
- # Symlink for apache
91
- # ln -s /var/spool/apt-mirror/mirror/de.archive.ubuntu.com/ubuntu /var/www/ubuntu
92
-
93
- # Update sources.list on all hosts:
94
- # deb http://192.168.0.100/ubuntu/ gutsy main restricted universe
95
-
96
- end
97
- end
98
- end
@@ -1,18 +0,0 @@
1
- #
2
- # /etc/apt/sources.list
3
- #
4
-
5
-
6
- #
7
- # gutsy
8
- #
9
- deb http://<%= apt_mirror_hostname %>/ubuntu gutsy main restricted universe multiverse
10
- deb http://archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
11
- deb http://security.ubuntu.com/ubuntu gutsy-security main restricted universe
12
-
13
- deb-src http://archive.ubuntu.com/ubuntu gutsy main restricted universe
14
- deb-src http://archive.ubuntu.com/ubuntu gutsy-updates main restricted universe
15
- deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted universe
16
-
17
-
18
-
@@ -1,4 +0,0 @@
1
- #
2
- # Regular cron jobs for the apt-mirror package
3
- #
4
- 0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
@@ -1,33 +0,0 @@
1
- ############# config ##################
2
- #
3
- # set base_path /var/spool/apt-mirror
4
- #
5
- # if you change the base path you must create the directories below with write privlages
6
- #
7
- # set mirror_path $base_path/mirror
8
- # set skel_path $base_path/skel
9
- # set var_path $base_path/var
10
- # set cleanscript $var_path/clean.sh
11
- # set defaultarch <running host architecture>
12
- set nthreads 20
13
- set _tilde 0
14
- #
15
- ############# end config ##############
16
-
17
- <% Array(apt_releases_to_mirror).each do |release| %>
18
- # <%= release %>
19
- deb http://archive.ubuntu.com/ubuntu <%= release %> main restricted universe multiverse
20
- #deb http://archive.ubuntu.com/ubuntu <%= release %>-updates main restricted universe multiverse
21
- #deb http://archive.ubuntu.com/ubuntu <%= release %>-backports main restricted universe multiverse
22
- #deb http://archive.ubuntu.com/ubuntu <%= release %>-security main restricted universe multiverse
23
- #deb http://archive.ubuntu.com/ubuntu <%= release %>-proposed main restricted universe multiverse
24
-
25
- deb-src http://archive.ubuntu.com/ubuntu <%= release %> main restricted universe multiverse
26
- #deb-src http://archive.ubuntu.com/ubuntu <%= release %>-updates main restricted universe multiverse
27
- #deb-src http://archive.ubuntu.com/ubuntu <%= release %>-backports main restricted universe multiverse
28
- #deb-src http://archive.ubuntu.com/ubuntu <%= release %>-security main restricted universe multiverse
29
- #deb-src http://archive.ubuntu.com/ubuntu <%= release %>-proposed main restricted universe multiverse
30
- <% end %>
31
-
32
- clean http://archive.ubuntu.com/ubuntu
33
-
@@ -1 +0,0 @@
1
- { "recipes": "chef::server" }