OpenSuse Build Service/Installation

= Maemo OBS Cluster Installation Notes =

Introduction
Maemo OBS Clusters are divided into 3 instances:
 * Frontend – Containing Webclient, OBS API, Mysql server
 * Backend/Repository Server – Where OBS-Server, dispatcher, scheduler and repository server are installed
 * Workers – Installation of obs-worker package

This Installation Notes covers OBS installation and setup for version 1.7. You can always refer to latest documentation also available on-line: http://gitorious.org/opensuse/build-service/blobs/raw/master/dist/README.SETUP

Creating Xen VMs
Based on http://en.opensuse.org/Build_Service/KIWI/Cookbook

Create somne xen volumes

Prpeare an opensuse minimal image:

Copy to each of the VM root disks

Configure some Xen VM configs

Installing the Frontend (WebUI and API)
Start with a minimal Suse install and then add Tools repository where OBS 1.7 is available.

Install obs-api (It's going to install lighttpd webserver by dependency for you).

Setup Mysql

Mysql server needs to be installed and configured to start as deamon Setup a secure installation, if it's the first time starting mysql The frontend instance holds 2 applications, the api and the webui. Each one need a database created Add obs user to handle these databases Configure your MySQL user and password in the "production:" section of the api config: Do the same for the webui. It's configured, by default to use sqlite, but since we're configuring the cluster for production environment, let's bind it to mysql:

Populate the database You can check the migration was successful verifying the “migrated” message at the end of each statement.

Setup and configure lighttpd for the api and webui

You need to setup the correct hostnames to where webui, api and repo server are going to point to

To enable these vhosts, make sure to uncomment the following in the 'custom includes' section at the bottom of /etc/lighttpd/lighttpd.conf: Also, the modules "mod_magnet", "mod_rewrite" and fastcgi need to be enabled by uncommenting the corresponding lines in /etc/lighttpd/modules.conf: You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names: Do the same for /srv/www/obs/api/config/environments/production.rb. As soon your backend is not on the same machine as the api (frontend), change the following: Make sure TCP port 5352 is open on the firewall. Restart lighttpd

ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):

Installing the Backend
On this host we need also to setup openSuse Tools repository:

Install: Configure Scheduler architectures

/usr/lib/obs/server/BSConfig.pm needs to point to correct server names corresponding to source server, where workers are going to download the source, and the repository server, where RPM repos are going to be shered to users.

Configure services as deamons Start Services For version 1.7 there are a new services. You can start them as well: It checks if build hosts are dieing and cleans up hanging builds It is used to sign packages via the obs-sign daemon. You need to configure it in BSConfig.pm before you can use it. The is the source service daemon. OBS 1.7 just comes with a download service so far. This feature is considered to be experimental so far, but can be already extended with own services.
 * obswarden
 * obssigner
 * obsservice

Install Lighttpd

lighttpd also needs to be available on backend server. This is required to provide directory listing on the repositories available on this server when an http/s request to maemo-repo is made through web ui.

Create a new file under /etc/lighttpd/vhosts.d/. It can be obs.conf as well, and add:

To enable vhosts, remember to uncomment the following in the 'custom includes':

Start lighttpd

Installing the Workers
The other 14 hosts on the cluster are reserved to be used as workers, where package builds are going to place.

The same openSuse Tools repository addition must be done for each worker.

Install worker:

Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server.

Each worker has 16 CPUs, so 16 workers need to be started.

uses curl to download the worker source code from backend server, therefore, for curl to work properly with the proxy setup on worker you must edit .curlrc (under users home dir) and set --noproxy "europe.nokia.com" in order to bypass proxy settings.

Start the worker service: