rails_pwnerer 0.6.64 → 0.6.65

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/CHANGELOG +2 -0
  2. data/LICENSE +0 -0
  3. data/Manifest +51 -49
  4. data/README +0 -0
  5. data/RUBYFORGE +0 -0
  6. data/Rakefile +7 -11
  7. data/ext/rpwn_setup_notice/extconf.rb +24 -16
  8. data/lib/{pwnage → rails_pwnerer}/app/cluster_config.rb +17 -17
  9. data/lib/{pwnage → rails_pwnerer}/app/config.rb +14 -14
  10. data/lib/{pwnage → rails_pwnerer}/app/db/mysql.rb +9 -9
  11. data/lib/{pwnage → rails_pwnerer}/app/files.rb +13 -13
  12. data/lib/{pwnage → rails_pwnerer}/app/gems.rb +3 -3
  13. data/lib/{pwnage → rails_pwnerer}/app/main.rb +4 -4
  14. data/lib/{pwnage → rails_pwnerer}/app/nginx_config.rb +7 -7
  15. data/lib/{pwnage → rails_pwnerer}/app/scripts.rb +4 -4
  16. data/lib/{pwnage → rails_pwnerer}/app/vcs/git.rb +9 -9
  17. data/lib/{pwnage → rails_pwnerer}/app/vcs/perforce.rb +11 -11
  18. data/lib/{pwnage → rails_pwnerer}/app/vcs/svn.rb +9 -9
  19. data/lib/{pwnage → rails_pwnerer}/base/atomics.rb +1 -1
  20. data/lib/{pwnage → rails_pwnerer}/base/cpus.rb +1 -1
  21. data/lib/{pwnage → rails_pwnerer}/base/dirs.rb +1 -1
  22. data/lib/{pwnage → rails_pwnerer}/base/gems.rb +2 -2
  23. data/lib/{pwnage → rails_pwnerer}/base/hostname.rb +1 -1
  24. data/lib/{pwnage → rails_pwnerer}/base/input.rb +1 -1
  25. data/lib/rails_pwnerer/base/packages.rb +272 -0
  26. data/lib/{pwnage → rails_pwnerer}/base/process.rb +1 -1
  27. data/lib/{pwnage → rails_pwnerer}/base/rails.rb +1 -1
  28. data/lib/{pwnage → rails_pwnerer}/base/startup.rb +1 -1
  29. data/lib/{pwnage → rails_pwnerer}/base.rb +1 -1
  30. data/lib/{pwnage → rails_pwnerer}/config/app.rb +1 -1
  31. data/lib/{pwnage → rails_pwnerer}/config/frontends.rb +1 -1
  32. data/lib/rails_pwnerer/config/main.rb +3 -0
  33. data/lib/{pwnage → rails_pwnerer}/config/paths.rb +1 -1
  34. data/lib/{pwnage → rails_pwnerer}/config/ports.rb +1 -1
  35. data/lib/{pwnage → rails_pwnerer}/config/repository.rb +7 -7
  36. data/lib/rails_pwnerer/ctl_executor.rb +19 -0
  37. data/lib/{pwnage → rails_pwnerer}/dev_executor.rb +2 -2
  38. data/lib/{pwnage → rails_pwnerer}/executor.rb +17 -17
  39. data/lib/{pwnage → rails_pwnerer}/scaffolds/config.rb +7 -7
  40. data/lib/{pwnage → rails_pwnerer}/scaffolds/dir_permissions.rb +4 -4
  41. data/lib/{pwnage → rails_pwnerer}/scaffolds/dirs.rb +3 -3
  42. data/lib/{pwnage → rails_pwnerer}/scaffolds/gems.rb +2 -2
  43. data/lib/{pwnage → rails_pwnerer}/scaffolds/hook_daemon.rb +2 -2
  44. data/lib/{pwnage → rails_pwnerer}/scaffolds/hook_dyndns.rb +3 -3
  45. data/lib/{pwnage → rails_pwnerer}/scaffolds/mysql_config.rb +2 -2
  46. data/lib/rails_pwnerer/scaffolds/packages.rb +118 -0
  47. data/lib/{pwnage → rails_pwnerer}/scaffolds/rubygems.rb +2 -2
  48. data/lib/{pwnage → rails_pwnerer}/scaffolds/sshd.rb +2 -2
  49. data/lib/{pwnage → rails_pwnerer}/util/kill_process_set.rb +1 -1
  50. data/lib/rails_pwnerer/util/main.rb +5 -0
  51. data/lib/rails_pwnerer.rb +52 -52
  52. data/rails_pwnerer.gemspec +17 -7
  53. data/test/base_package_test.rb +126 -0
  54. data/test/helper.rb +25 -0
  55. metadata +151 -107
  56. data/lib/pwnage/base/packages.rb +0 -159
  57. data/lib/pwnage/config/main.rb +0 -3
  58. data/lib/pwnage/ctl_executor.rb +0 -19
  59. data/lib/pwnage/scaffolds/packages.rb +0 -110
  60. data/lib/pwnage/util/main.rb +0 -5
@@ -1,110 +0,0 @@
1
- # installs the required OS (read: Ubuntu / Debian) packages
2
-
3
- class RailsPwnage::Scaffolds::Packages
4
- include RailsPwnage::Base
5
-
6
- # the packages needed to manage the server remotely and install applications
7
- def install_management
8
- # needed to play with the configuration database
9
- install_packages %w(debconf debconf-utils)
10
-
11
- # dpkg-dev allows building from source
12
- # openssh-server allows us to ssh into the box
13
- # build-essential is needed to install some gems
14
- install_packages %w(dpkg-dev openssh-server build-essential)
15
-
16
- # subversion is needed to pull code from SVN repositories
17
- # should work from source, except package author decided to block that
18
- install_packages %w(subversion)
19
-
20
- # rpwn doesn't deal with git yet, but we'd like to offer that, so we'll
21
- # bring in the git infrastructure during scaffolding
22
- install_packages %w(git-core)
23
-
24
- # ddclient does dynamic DNS
25
- # avahi-daemon does mDNS, a.k.a. Bonjour (makes "ping hostname.local" work)
26
- install_packages %w(ddclient avahi-daemon)
27
- end
28
-
29
- # packages that are needed by popular gems
30
- def install_tools
31
- # needed by rmagick which does image processing
32
- install_packages %w(libmagick9-dev libmagickwand-dev)
33
-
34
- # needed by xml parsers
35
- install_packages %w(libxml2-dev libxslt1-dev)
36
-
37
- # needed by curb which does HTTP fetching
38
- install_packages %w(libcurl4-openssl-dev)
39
-
40
- # needed by sqlite-3 ruby gem in tools
41
- install_packages %w(libsqlite3-0 libsqlite3-dev sqlite3), :source => true
42
-
43
- # needed for solr and other java-based services
44
- install_packages %w(openjdk-6-jdk)
45
-
46
- # useful to be able to work with compressed data
47
- install_packages %w(tar zip bzip2 gzip)
48
- end
49
-
50
- # the packages comprising ruby
51
- def install_ruby
52
- # NOTE: Hot wiping ruby anymore, because a lot of stuff depends on it.
53
- # Hoping apt will replace it quietly.
54
- # Wipe the old ruby version (and pray we don't die until we're done,
55
- # otherwise we're on a ruby-less system)
56
-
57
- # remove_packages %w(ruby1.8 libruby1.8) -- this shouldn't be needed anymore
58
-
59
- # install ruby from source
60
- install_packages %w(ruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8 rdoc
61
- libsetup-ruby1.8 ruby-pkg-tools rubygems1.8 rubygems
62
- irb ruby1.8-dev), :source => true
63
- end
64
-
65
- # the packages for a mysql server and development libraries
66
- def install_mysql
67
- # not installing mySQL from source because it's a pain
68
- install_packages %w(mysql-client mysql-server libmysqlclient15-dev)
69
- end
70
-
71
- # The packages for building postgresql clients.
72
- #
73
- # Rails 3 likes having both the mysql and pgsql clients available.
74
- def install_pgsql_client
75
- install_packages %w(postgresql-client libpq-dev)
76
- end
77
-
78
- # the packages for sqlite3
79
- def install_sqlite3
80
- install_packages %w(libsqlite3 libsqlite3-dev sqlite3), :source => true
81
- end
82
-
83
- # the packager for _the_ load balancer (nginx, from Russia with <3)
84
- def install_balancer
85
- remove_packages %w(nginx)
86
-
87
- install_packages %w(nginx), :source => true
88
- end
89
-
90
- # runner
91
- def run
92
- add_package_source 'http://debian.mirrors.tds.net/debian/',
93
- %w(unstable main non-free contrib), :source => true
94
-
95
- update_package_metadata
96
- install_management
97
- install_tools
98
- install_ruby
99
- install_sqlite3
100
- install_balancer
101
- install_mysql
102
- install_pgsql_client
103
- upgrade_all_packages
104
- end
105
-
106
- # standalone runner
107
- def self.go
108
- self.new.run
109
- end
110
- end
@@ -1,5 +0,0 @@
1
- module RailsPwnage::Util
2
- class << self
3
- include RailsPwnage::Base
4
- end
5
- end