Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 114 lines (81 sloc) 4.238 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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
===========================
Installation and Deployment
===========================

This document explains how to setup the Open Build Service for development or
deployment.


Prerequisites
=============

Before you can start developing for the Open Build Service or deploying
it, you have to fetch some additional dependencies in the repository. Please
issue the following commands in your shell:

 $ git submodule init
 $ git submodule update
 $ git pull origin master


Software dependencies
=====================

The various parts of the Open Build Service are implemented in different
languages. Therefore it has quite some additional dependencies. Also, it allows
to configure the database backend (e.g. you can even use SQLite3 for
development / testing and MySQL for production).

- Perl version 5.12.1 or later
- MySQL version 5.1.46 or later and / or SQLite3 version 3.6.23 or later
- Ruby version 1.8.7 and Ruby on Rails version 2.3.8 (exact versions)

To get all the dependencies and useful additional tools for openSUSE-11.3,
please issue the following commands as root user in your shell:

 $ zypper addrepo --name "openSUSE-11.3 Tool" \
    http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.3/ \
    opensuse-tools
 $ zypper refresh
 $ zypper install devel_rpm_build osc mysql-community-server sqlite3 \
                  perl perl-Net-Domain perl-Net-SSLeay perl-BSSolv \
                  perl-GD perl-Socket-MsgHdr \
                  ruby ruby-mysql rubygems rubygem-sqlite3 rubygem-rails-2_3 \
                  rubygem-delayed_job rubygem-gruff rubygem-nokogiri \
                  rubygem-sqlite3 rubygem-daemons rubygem-ci_reporter \
                  rubygem-exception_notification rubygem-erubis rubygem-rails_xss \
                  rubygem-ci_reporter rubygem-webrat rubygem-rack-test \
                  rubygem-rdoc rubygem-json rubygem-xmlhash

Deployment with RPM packages
============================

Please have a look at the following file on how to set up a complete Build
Service instance from RPM packages: dist/README.SETUP


Deployment by hand
==================

The Open Build Service is flexible enough to support several deployment scenarios.
These scenarios are described in the following (with increasing complexity).


Option 1: Only use the webui
----------------------------

If you want to work only on the Rails web frontend (webui) or running your own
webui instance, there is no need to have an own backend server running. It is
sufficient to start the webui with its default values. For that to work you
have to change into its subdirectory and create the initial config like this:

 $ cd src/webui
 $ cp config/database.yml.example config/database.yml
 $ cp config/options.yml.example config/options.yml
 $ rake db:setup

Afterwards you can simply start the webui like this:

 $ ./script/server

Open up your favorite browser and enter the address http://127.0.0.1:3000/
and you should see your own Open Build Service webui instance. Thats it, actually.

To speed things up a bit, you can install a local memory cache like this (as
root in a terminal):

 $ zypper in memcached
 $ rcmemcached start
 $ insserv memcached

You can also use Capistrano to deploy the web interface on production machines:

 $ cap deploy:update - Updates the sources on the server and changes the
                              current symlink
 $ cap deploy:migrate - Runs database migrations
 $ cap deploy - Updates and restarts the server
 $ cap deploy:pending - or
 $ cap deploy:pending:diff - will show upcoming changes
 $ cap deploy:rollback - To get back to the previous version:

Additional information on how to set up your local development instance and how
to contribute can be found in the openSUSE wiki:

    http://en.opensuse.org/openSUSE:Build_Service_Installation_Tutorial


Option 2: Setup a complete Open Build Service
----------------------------------------

In addition to the steps described above, please refer to the file
src/backend/README. Afterwards, you have to configure your webui instance to
use your local api instance. Have a look at the documentation in the respective
files under src/webui/config/environments.
Something went wrong with that request. Please try again.