Skip to content
This repository
Newer
Older
100644 136 lines (117 sloc) 3.89 kb
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
1 # = Rudy configuration
2 #
3
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
4 # ----------------------------------------------------------- DEFAULTS --------
5 # These values are used as defaults for their respective global settings. All
6 # non-boolean values are expected to be Symbols.
7 #
8 defaults do
9 zone :'eu-west-1b'
10 environment :rye
11 color true # Terminal colors? true/false
12 yes false # Auto-confirm? true/false
13 end
14
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
15 # --------------------------------------------------------- MACHINES --------
16 # The machines block describes the 'physical' characteristics of your machines.
17 machines do
18
19 zone :'us-east-1b' do
20 ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
21 bucket 'rudy-ami-us'
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
22 end
23 zone :'eu-west-1b' do
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
24 ami 'ami-1dbd9569' # rudy-ami-eu/debian-5.0-32-ruby-r1
25 bucket 'rudy-ami-eu'
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
26 end
27
28 hostname :rudy # One of: :default, :rudy, 'your-name'
29
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
30 env :rye do
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
31 user :root # User to connect as
32 size 'm1.small' # EC2 machine type for all machines
33 end
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
34
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
35 end
36
37
38 # ----------------------------------------------------------- COMMANDS --------
39 # The commands block defines shell commands that can be used in routines. The
40 # ones defined here are added to the default list defined by Rye::Cmd (Rudy
41 # executes all SSH commands via Rye).
42 #
43 # Usage:
44 #
45 # allow COMMAND-NAME
46 # allow COMMAND-NAME, '/path/2/COMMAND'
47 # allow COMMAND-NAME, '/path/2/COMMAND', 'default argument', 'another arg'
48 #
49 commands do
50 allow :apt_get, "apt-get", :y, :q
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
51 allow :gem18_install, "/usr/bin/gem1.8", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
52 allow :gem18_sources, "/usr/bin/gem1.8", "sources"
53 allow :gem19_install, "/usr/local/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
54 allow :gem19_sources, "/usr/local/bin/gem", "sources"
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
55 allow :update_rubygems
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
56 allow :ruby18, "/usr/bin/ruby1.8"
57 allow :ruby19, "/usr/local/bin/ruby"
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
58 allow :ssh_keygen, 'ssh-keygen'
59 allow :rm
60 end
61
62 # ----------------------------------------------------------- ROUTINES --------
63 # The routines block describes the repeatable processes for each machine group.
64 # To run a routine, specify its name on the command-line: rudy startup
65 routines do
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
66
67 env :rye do
68 startup do
69 after :installdeps, :authorize
70 after :runtest
71 end
72 end
73
74 runtest do
75 remote :root do
76 ruby18 :r, 'rubygems', 'rye/bin/try'
77 ruby19 'rye/bin/try'
78 end
79 end
80
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
81 authorize do
82 remote :root do
83 rm :f, '/root/.ssh/id_rsa'
84 ssh_keygen :q, :f, '/root/.ssh/id_rsa', :N, ''
85 rye 'authorize_local'
86 end
87 end
88
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
89 installdeps do
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
90 local do
91 rake 'package'
92 end
93 remote :root do
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
94 gem18_install "rye", "delano-rye"
95 gem19_install "rye", 'delano-rye'
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
96 disable_safe_mode
97 rm :r, :f, 'rye*'
98 file_upload 'pkg/rye-*gz'
99 tar :z, :x, :f, 'rye-*gz'
100 rm 'rye-*gz'
101 mv 'rye-*', 'rye'
102 cd 'rye'
103 end
104 end
105
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
106 # NOTE: sysupdate only needs to be run for the bare instances.
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
107 sysupdate do
108 remote :root do
109 apt_get "update"
110 apt_get "install", "build-essential", "git-core"
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
111 apt_get "install", "libssl-dev", "libreadline5-dev", "zlib1g-dev"
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
112 apt_get "install", "ruby1.8-dev", "rubygems"
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
113 gem18_install 'rubygems-update' # for 1.8
114 update_rubygems # for 1.8
115 gem18_sources :a, "http://gems.github.com"
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
116 end
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
117 after :install_ruby19
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
118 end
119
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
120 install_ruby19 do
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
121 remote :root do
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
122 wget :q, 'ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz'
123 tar :z, :x, :f, 'ruby-1.9.1-p129.tar.gz'
124 cd 'ruby-1.9.1-p129'
125 configure
126 make
127 make 'install'
128 apt_get "install", "rubygems1.9"
129 gem19_sources :a, "http://gems.github.com"
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
130 end
131 end
6fcf720c »
2009-06-21 Install and try tests for Ruby 1.8 and 1.9
132
85d332d7 »
2009-06-21 Added Rudyfile for remote 'clean-machine' tests
133 end
134
135
Something went wrong with that request. Please try again.