Not used in zooz, but similar.

== Minimal Suse install using VirtualBox ==

Choose a NET install and select a minimal server, disable firewall.

After install:
{{{
chkconfig --add sshd
chkconfig SuSEfirewall2_init off
chkconfig SuSEfirewall2_setup off

zypper in emacs xorg-x11-fonts
}}}
bug in emacs means you need to run
{{{
SuSEconfig
}}}

At this point you can install 
* OBS Server
* OBS Worker
For testing this can be done on the same machine.

== Install Main OBS Server ==
Start with a minimal Suse install
{{{
cd /etc/zypp/repos.d/;
wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo
zypper ref
}}}
(trust key)
{{{
zypper in obs-api obs-server obs-utils obs-signer osc
}}}

==== Configure ====
emacs /etc/sysconfig/obs-server
and add[[BR]]
{{{
 OBS_SCHEDULER_ARCHITECTURES="i586 armv5el armv7el"
}}}
=== MySQL ===
{{{
rcmysql start
/usr/bin/mysql_secure_installation

mysql -u root -p
create database frontend_production;
create database webclient_production;
CREATE USER obs IDENTIFIED BY 'obs-password';
GRANT all privileges
          ON frontend_production.*
          TO 'obs'@'%', 'obs'@'localhost'
          IDENTIFIED BY password '*C920755AA5544D03B3021F119B5192780FC0F626';
GRANT all privileges
          ON webclient_production.*
          TO 'obs'@'%', 'obs'@'localhost'
          IDENTIFIED BY password '*C920755AA5544D03B3021F119B5192780FC0F626';
}}}
in
  /srv/www/obs/frontend/config/database.yml
  /srv/www/obs/webclient/config/database.yml
  set username / password in production_slave section to obs/obs-password
  and remove the socket line

=== LightHTTPD ===
/etc/lighttpd/modules.conf uncomment:
{{{
  mod_access
  mod_rewrite
  include "conf.d/magnet.conf"
  include "conf.d/fastcgi.conf"
}}}
For a proper setup the virtual hosts must be accessible by name

edit /etc/lighttpd/lighttpd.conf at the end to uncomment
{{{
  include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
}}}
Then configure /etc/lighttpd/vhosts.d/obs.conf
{{{
  $HTTP["host"] =~ "obs-client" {
  rails_app   = "webclient"
  rails_root  = "/srv/www/obs/webclient"
  rails_procs = 5
  # production/development are typical values here
  rails_mode  = "production_slave"

  log_root = "/srv/www/obs/webclient/log"

  include "vhosts.d/rails.inc"
}
$HTTP["host"] =~ "obs-frontend" {
  rails_app   = "frontend"
  rails_root  = "/srv/www/obs/frontend"
  rails_procs = 5
  # production/development are typical values here
  rails_mode  = "production_slave"

  log_root = "/srv/www/obs/frontend/log"

  include "vhosts.d/rails.inc"
}
$HTTP["host"] =~ "obs-download" {
  server.name = "download.my.domain"

  server.document-root = "/srv/obs/repos/"
}
}}}
Then add CNAME/A records to DNS for
	obs-frontend, obs-client, obs-download
=== WebClient ===

Edit /srv/www/obs/webclient/config/environments/production_slave.rb
{{{
FRONTEND_HOST = "obs-frontend"
DOWNLOAD_URL = "http://obs2-download/"
}}}
For a 'standalone' system, change:
{{{
BASE_NAMESPACE = nil
}}}


=== Daemons ===
{{{
chkconfig --add mysql lighttpd obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher

chkconfig -l mysql lighttpd obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher
}}}
Useful daemon commands: to stop/start
{{{
  rclighttpd stop
  rcobspublisher  stop
  rcobsdispatcher stop
  rcobsworker stop
  rcobsscheduler stop
  rcobssrcserver stop
  rcobsrepserver stop
  rcmysql stop

  rcmysql start
  rcobsrepserver start
  rcobssrcserver start
  rcobsscheduler start
  rcobsworker start
  rcobsdispatcher start
  rcobspublisher  start
  rclighttpd start
}}}

== Install OBS Worker ==

{{{
rm -f /etc/zypp/repos.d/openSUSE\ 11.2-0.repo
cd /etc/zypp/repos.d/;
wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo
zypper ref
}}}
(trust key)
{{{
  zypper in obs-worker qemu-svn
}}}
For non-local, edit /etc/sysconfig/obs-worker and set 
{{{
  OBS_SRC_SERVER="obs:6362"
  OBS_REPO_SERVER="obs:6262"
}}}
Note the ports are different...

Then
{{{
  chkconfig --add obsworker
}}}

The worker connects to the obs server on port 6262 and graps all the code needed to run.
