[api] make test suite silent again
[opensuse:build-service.git] / INSTALL
1 ===========================
2 Installation and Deployment
3 ===========================
4
5 This document explains how to setup the Open Build Service for development or
6 deployment.
7
8
9 Prerequisites
10 =============
11
12 Before you can start developing for the Open Build Service or deploying
13 it, you have to fetch some additional dependencies in the repository. Please
14 issue the following commands in your shell:
15
16  $ git submodule init
17  $ git submodule update
18  $ git pull origin master
19
20
21 Software dependencies
22 =====================
23
24 The various parts of the Open Build Service are implemented in different
25 languages. Therefore it has quite some additional dependencies. Also, it allows
26 to configure the database backend (e.g. you can even use SQLite3 for
27 development / testing and MySQL for production).
28
29 - Perl version 5.12.1 or later
30 - MySQL version 5.1.46 or later and / or SQLite3 version 3.6.23 or later
31 - Ruby version 1.8.7 and Ruby on Rails version 2.3.8 (exact versions)
32
33 To get all the dependencies and useful additional tools for openSUSE-11.3,
34 please issue the following commands as root user in your shell:
35
36  $ zypper addrepo --name "openSUSE-11.3 Tool" \
37     http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.3/ \
38     opensuse-tools
39  $ zypper refresh
40  $ zypper install devel_rpm_build osc mysql-community-server sqlite3 \
41                   perl perl-Net-Domain perl-Net-SSLeay perl-BSSolv \
42                   perl-GD perl-Socket-MsgHdr \
43                   ruby ruby-mysql rubygems rubygem-sqlite3 rubygem-rails-2_3 \
44                   rubygem-delayed_job rubygem-gruff rubygem-nokogiri \
45                   rubygem-sqlite3 rubygem-daemons rubygem-ci_reporter \
46                   rubygem-exception_notification rubygem-erubis rubygem-rails_xss \
47                   rubygem-ci_reporter rubygem-webrat rubygem-rack-test
48
49 Deployment with RPM packages
50 ============================
51
52 Please have a look at the following file on how to set up a complete Build
53 Service instance from RPM packages: dist/README.SETUP
54
55
56 Deployment by hand
57 ==================
58
59 The Open Build Service is flexible enough to support several deployment scenarios.
60 These scenarios are described in the following (with increasing complexity).
61
62
63 Option 1: Only use the webui
64 ----------------------------
65
66 If you want to work only on the Rails web frontend (webui) or running your own
67 webui instance, there is no need to have an own backend server running. It is
68 sufficient to start the webui with its default values. For that to work you
69 have to change into its subdirectory and create the initial config like this:
70
71  $ cd src/webui
72  $ cp config/database.yml.example config/database.yml
73  $ cp config/options.yml.example config/options.yml
74  $ rake db:setup
75
76 Afterwards you can simply start the webui like this:
77
78  $ ./script/server
79
80 Open up your favorite browser and enter the address http://127.0.0.1:3000/
81 and you should see your own Open Build Service webui instance. Thats it, actually.
82
83 To speed things up a bit, you can install a local memory cache like this (as
84 root in a terminal):
85
86  $ zypper in memcached
87  $ rcmemcached start
88  $ insserv memcached
89
90 You can also use Capistrano to deploy the web interface on production machines:
91
92  $ cap deploy:update        - Updates the sources on the server and changes the
93                               current symlink
94  $ cap deploy:migrate       - Runs database migrations
95  $ cap deploy               - Updates and restarts the server
96  $ cap deploy:pending       - or
97  $ cap deploy:pending:diff  - will show upcoming changes
98  $ cap deploy:rollback      - To get back to the previous version:
99
100 Additional information on how to set up your local development instance and how
101 to contribute can be found in the openSUSE wiki:
102
103     http://en.opensuse.org/openSUSE:Build_Service_Installation_Tutorial
104
105
106 Option 2: Setup a complete Open Build Service
107 ----------------------------------------
108
109 In addition to the steps described above, please refer to the file
110 src/backend/README. Afterwards, you have to configure your webui instance to
111 use your local api instance. Have a look at the documentation in the respective
112 files under src/webui/config/environments.