public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/thewoolleyman/rails.git
rails / ci / ci_setup_notes.txt
100644 76 lines (62 sloc) 2.687 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Notes on Rails Continuous Integration Server Setup Notes
 
* Set up ci user:
# log in as root
$ adduser ci
enter user info and password
$ visudo
# give ci user same sudo rights as root
 
* Disable root login:
# log in as ci
$ sudo vi /etc/shadow
# overwrite and disable encrypted root password to disable root login:
root:*:14001:0:99999:7:::
 
* Change Hostname:
$ sudo vi /etc/hostname
change to 'ci'
$ sudo vi /etc/hosts
replace old hostname with 'ci'
# reboot to use new hostname (and test reboot)
$ sudo shutdown -r now
 
* Update aptitude
$ sudo aptitude update
 
* Install postfix
$ sudo aptitude install postfix
# pick 'Internet Site'
# type hostname
 
* Use cinabox to perform rest of ruby/ccrb setup
 
* Install/setup nginx
$ sudo aptitude install nginx
$ sudo vi /etc/nginx/sites-available/default
# comment two lines and add one to proxy to ccrb:
# root /var/www/nginx-default;
# index index.html index.htm;
                proxy_pass http://127.0.0.1:3333;
$ sudo /etc/init.d/nginx start
 
 
* (temp until ci files in thewoolleyman branch are checked into rails repo):
  * Check out ci branch w/git to ~/workspace/rails_thewoolleyman: http://github.com/thewoolleyman/rails/tree/ci
  $ ln -s /home/ci/workspace/rails_thewoolleyman/ci/site_config.rb /home/ci/.cruise/site_config.rb
  $ ln -s /home/ci/workspace/rails_thewoolleyman/ci/cruise_config.rb /home/ci/.cruise/projects/rails/cruise_config.rb
  $ ln -s /home/ci/workspace/rails_thewoolleyman/ci/rails_build.rb /home/ci/.cruise/projects/rails/rails_build.rb
  $ ln -s /home/ci/workspace/rails_thewoolleyman/ci/geminstaller.yml /home/ci/.cruise/projects/rails/geminstaller.yml
  $ sudo gem install geminstaller
  $ sudo geminstaller --config /home/ci/.cruise/projects/rails/geminstaller.yml
 
* Install build-essential package (to build native gems)
$ sudo aptitude install build-essential
 
* Set up mysql
$ sudo aptitude install mysql-server-5.0 libmysqlclient-dev
# no password for mysql root user
# add mysql gem to geminstaller.yml
# run 'sudo geminstaller' from dir containing geminstaller.yml
 
* Create ActiveRecord test databases for mysql
$ mysql -uroot -e 'grant all on *.* to rails@localhost;'
$ mysql -urails -e 'create database activerecord_unittest;'
$ mysql -urails -e 'create database activerecord_unittest2;'
 
* setup sqlite
$ sudo aptitude install sqlite sqlite3 libsqlite-dev libsqlite3-dev
# add sqlite-ruby/sqlite3-ruby gems to geminstaller, run it
 
* setup postgres
$ sudo aptitude install postgresql postgresql-server-dev-8.3
# add postgres gem to geminstaller, run it
# cd to activerecord dir
$ sudo su - postgres -c 'createuser -s ci'
$ rake postgresql:build_databases