Editing OpenSuse Build Service/Installation

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
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
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
-
 
-
== Networking Overview ==
 
-
 
-
The Front End (FE) machine provides two major services:
 
-
* the webui on build.obs and
 
-
* the API on apo.obs;
 
-
It is also a useful holding point for the download service on download.obs
 
-
 
-
The Back End (BE) machine provides the backend services including the schedulers, source server and repo server. The repo server (used by the workers to get required rpms) also doubles as the download server via a reverse-proxy on the FE.
 
-
 
-
<source lang="bash">
 
-
10.1.1.1        host.obs.maemo.org
 
-
10.1.1.10      fe.obs.maemo.org build.obs.maemo.org api.obs.maemo.org download.obs.maemo.org
 
-
10.1.1.11      be.obs.maemo.org src.obs.maemo.org repo.obs.maemo.org
 
-
10.1.1.51      w1.obs.maemo.org
 
-
10.1.1.52      w2.obs.maemo.org
 
-
10.1.1.53      w3.obs.maemo.org
 
-
10.1.1.54      w4.obs.maemo.org
 
-
10.1.1.55      w5.obs.maemo.org
 
-
10.1.1.56      w6.obs.maemo.org
 
-
10.1.1.57      w7.obs.maemo.org
 
-
10.1.1.58      w8.obs.maemo.org
 
-
10.1.1.59      w9.obs.maemo.org
 
-
10.1.1.60      w10.obs.maemo.org
 
-
10.1.1.61      w11.obs.maemo.org
 
-
10.1.1.62      w12.obs.maemo.org
 
-
</source>
 
-
 
-
<hr>
 
== Creating Xen VMs ==
== Creating Xen VMs ==
Line 47: Line 18:
</source>
</source>
-
Create some Xen volumes
+
Create some xen volumes
<source lang='bash'>
<source lang='bash'>
lvcreate -L 10G VG_data -n fe_root
lvcreate -L 10G VG_data -n fe_root
 +
mkfs -text3 /dev/VG_data/fe_root
lvcreate -L 2G  VG_data -n fe_swap
lvcreate -L 2G  VG_data -n fe_swap
mkswap /dev/VG_data/fe_swap
mkswap /dev/VG_data/fe_swap
lvcreate -L 10G VG_data -n be_root
lvcreate -L 10G VG_data -n be_root
 +
mkfs -text3 /dev/VG_data/be_root
lvcreate -L 2G  VG_data -n be_swap
lvcreate -L 2G  VG_data -n be_swap
mkswap /dev/VG_data/be_swap
mkswap /dev/VG_data/be_swap
lvcreate -L 10G VG_data -n w1_root
lvcreate -L 10G VG_data -n w1_root
 +
mkfs -text3 /dev/VG_data/w1_root
lvcreate -L 2G  VG_data -n w1_swap
lvcreate -L 2G  VG_data -n w1_swap
mkswap /dev/VG_data/w1_swap
mkswap /dev/VG_data/w1_swap
</source>
</source>
-
Prepare an openSUSE minimal image:
+
Prpeare an opensuse minimal image:
<source lang='bash'>
<source lang='bash'>
-
ROOTFS=/data/11.2min/image-root
 
mkdir /data/11.2min
mkdir /data/11.2min
-
kiwi --prepare suse-11.2-JeOS --root $ROOTFS --add-profile xenFlavour --add-package less --add-package iputils
+
kiwi --prepare suse-11.2-JeOS --root /data/11.2min/image-root --add-profile xenFlavour
</source>
</source>
Update the config & modules:
Update the config & modules:
<source lang='bash'>
<source lang='bash'>
-
ROOTFS=/data/11.2min/image-root
+
cp -a /lib/modules/2.6.31.12-0.2-xen /data/11.2min/image-root/lib/modules/
-
cp -a /lib/modules/2.6.31.12-0.2-xen $ROOTFS/lib/modules/
+
 
 +
echo default 10.1.1.1 > /data/11.2min/image-root/etc/sysconfig/network/routes
 +
echo NETCONFIG_DNS_POLICY=\"\" >> /data/11.2min/image-root/etc/sysconfig/network/config
 +
echo nameserver 8.8.8.8 > /data/11.2min/image-root/etc/resolv.conf
-
echo default 10.1.1.1 > $ROOTFS/etc/sysconfig/network/routes
 
-
echo NETCONFIG_DNS_POLICY=\"\" >> $ROOTFS/etc/sysconfig/network/config
 
-
echo nameserver 8.8.8.8 > $ROOTFS/etc/resolv.conf
 
-
echo default 10.1.1.1 > $ROOTFS/etc/sysconfig/network/routes
 
-
cat << EOF >$ROOTFS/etc/sysconfig/network/ifcfg-eth0
 
-
BOOTPROTO='static'
 
-
BROADCAST=''
 
-
STARTMODE='onboot'
 
-
EOF
 
-
echo /dev/xvda1 swap swap defaults 0 0 >> $ROOTFS/etc/fstab
 
</source>
</source>
Line 89: Line 55:
Copy to each of the VM root disks
Copy to each of the VM root disks
<source lang='bash'>
<source lang='bash'>
-
mkfs -text3 /dev/VG_data/fe_root
 
mount /dev/VG_data/fe_root /mnt/lvm
mount /dev/VG_data/fe_root /mnt/lvm
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
-
echo fe.obs.maemo.org > /mnt/lvm/etc/HOSTNAME
 
-
echo "IPADDR='10.1.1.10/24'" >> /mnt/lvm/etc/sysconfig/network/ifcfg-eth0
 
umount /mnt/lvm
umount /mnt/lvm
-
mkfs -text3 /dev/VG_data/be_root
 
mount /dev/VG_data/be_root /mnt/lvm
mount /dev/VG_data/be_root /mnt/lvm
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
-
echo be.obs.maemo.org > /mnt/lvm/etc/HOSTNAME
 
-
echo "IPADDR='10.1.1.11/24'" >> /mnt/lvm/etc/sysconfig/network/ifcfg-eth0
 
umount /mnt/lvm
umount /mnt/lvm
-
mkfs -text3 /dev/VG_data/w1_root
 
mount /dev/VG_data/w1_root /mnt/lvm
mount /dev/VG_data/w1_root /mnt/lvm
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
rsync -HAXa /data/11.2min/image-root/ /mnt/lvm/
-
echo w1.obs.maemo.org > /mnt/lvm/etc/HOSTNAME
 
-
echo "IPADDR='10.1.1.51/24'" >> /mnt/lvm/etc/sysconfig/network/ifcfg-eth0
 
umount /mnt/lvm
umount /mnt/lvm
</source>
</source>
Line 113: Line 70:
Configure some Xen VM configs
Configure some Xen VM configs
<source lang='bash'>
<source lang='bash'>
-
name='fe'
+
name='be'
-
disk=['phy:/dev/VG_data/fe_root,xvda2,w', 'phy:/dev/VG_data/fe_swap,xvda1,w']
+
disk=['phy:/dev/VG_data/be_root,xvda2,w', 'phy:/dev/VG_data/be_swap,xvda1,w']
-
vif=['mac=0D:16:3E:40:B5:FE']
+
vif=['mac=00:16:3E:E3:D4:9C']
 +
 
 +
root='/dev/xvda2 ro'
memory='1024'
memory='1024'
-
root='/dev/xvda2 ro'
 
kernel='/boot/vmlinuz-2.6.31.12-0.2-xen'
kernel='/boot/vmlinuz-2.6.31.12-0.2-xen'
ramdisk='/boot/initrd-2.6.31.12-0.2-xen'
ramdisk='/boot/initrd-2.6.31.12-0.2-xen'
-
extra='clocksource=jiffies console=hvc0 xencons=tty'
 
on_poweroff='destroy'
on_poweroff='destroy'
on_reboot='restart'
on_reboot='restart'
on_crash='restart'
on_crash='restart'
-
</source>
 
-
And start them:
+
extra='clocksource=jiffies console=hvc0 xencons=tty'
-
<source lang='bash'>
+
-
xm create /etc/xen/fe.cfg
+
-
xm create /etc/xen/be.cfg
+
-
xm create /etc/xen/w1.cfg
+
</source>
</source>
-
== Interim config ==
+
* host 10.1.1.1
-
<source lang='bash'>
+
* fe 10.1.1.10
-
zypper in wget less iputils terminfo emacs
+
* be 10.1.1.11
-
</source>
+
* w1 10.1.1.12
-
 
+
-
== Installing the Backend ==
+
-
On this host we need also to setup openSUSE Tools repository:
 
<source lang='bash'>
<source lang='bash'>
-
cd /etc/zypp/repos.d/;
+
/etc/init.d/network restart
-
wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo
+
zypper refresh
-
zypper ref
+
-
# Accept the trust key
+
</source>
</source>
-
Install:
+
<hr>
-
<source lang='bash'>
+
<hr>
-
zypper in obs-server obs-signer obs-utils createrepo dpkg nfs-client
+
<hr>
-
# obs-server brings these other packages as dependency. This is just for you to notice which packages are needed for Backend installation
+
<hr>
-
# createrepo & dpkg are only recommends
+
<hr>
-
# NFS client is needed as we use an NFS share for host/BE interchange
+
-
</source>
+
-
Configure Scheduler architectures
+
-
<source lang='bash'>
+
-
vi /etc/sysconfig/obs-server
+
-
OBS_SCHEDULER_ARCHITECTURES="i586 armv5el armv7el“
+
-
</source>
+
-
/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 shared to users.
+
== Installing the Frontend (WebUI and API) ==
-
<source lang='bash'>
+
-
vi /usr/lib/obs/server/BSConfig.pm
+
-
#add
+
-
$hostname="be.obs.maemo.org";
+
-
 
+
-
our $srcserver = "http://src.obs.maemo.org:5352";
+
-
our $reposerver = "http://repo.obs.maemo.org:5252";
+
-
our $repodownload = "http://$hostname/repositories";
+
-
</source>
+
-
 
+
-
Configure services as daemons
+
-
<source lang='bash'>
+
-
chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner
+
-
 
+
-
#Check them
+
-
chkconfig -l obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher
+
-
</source>
+
-
Start Services
+
-
<source lang='bash'>
+
-
  rcobsrepserver start
+
-
  rcobssrcserver start
+
-
  rcobsscheduler start
+
-
  rcobsdispatcher start
+
-
  rcobspublisher  start
+
-
</source>
+
-
For version 1.7 there are a new services. You can start them as well:
+
-
* '''obswarden'''
+
-
  It checks if build hosts are dying and cleans up hanging builds
+
-
* '''obssigner'''
+
-
  It is used to sign packages via the obs-sign daemon. You need to configure
+
-
  it in BSConfig.pm before you can use it.
+
-
* '''obsservice'''
+
-
  This 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.
+
-
 
+
-
'''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.
+
-
 
+
-
<source lang='bash'>
+
-
zypper in lighttpd
+
-
</source>
+
-
 
+
-
Create a new file under /etc/lighttpd/vhosts.d/. It can be obs.conf as well, and add:
+
-
<source lang='bash'>
+
-
vi /etc/lighttpd/vhosts.d/obs.conf
+
-
 
+
-
$HTTP["host"] =~ "repo.obs.maemo.org" {
+
-
  server.name = "repo.obs.maemo.org"
+
-
 
+
-
  server.document-root = "/srv/obs/repos/"
+
-
  dir-listing.activate = "enable"
+
-
}
+
-
</source>
+
-
 
+
-
To enable vhosts, remember to '''uncomment''' the following in the 'custom includes':
+
-
 
+
-
<source lang='bash'>
+
-
vi /etc/lighttpd/lighttpd.conf
+
-
##
+
-
  ## custom includes like vhosts.
+
-
  ##
+
-
  #include "conf.d/config.conf"
+
-
  # following line uncommented as per
+
-
  # /usr/share/doc/packages/obs-api/README.SETUP
+
-
  include_shell "cat vhosts.d/*.conf" 
+
-
</source>
+
-
 
+
-
Start lighttpd
+
-
<source lang='bash'>
+
-
#first add it as deamon
+
-
chkconfig --add lighttpd
+
-
rclighttpd start
+
-
</source>
+
-
 
+
-
== Installing the FrontEnd (WebUI and API) ==
+
-
Start with a minimal SUSE install and then add Tools repository where OBS 1.7 is available.
+
Start with a minimal Suse install and then add Tools repository where OBS 1.7 is available.
<source lang='bash'>
<source lang='bash'>
cd /etc/zypp/repos.d/;
cd /etc/zypp/repos.d/;
Line 252: Line 115:
Install obs-api (It's going to install lighttpd webserver by dependency for you).
Install obs-api (It's going to install lighttpd webserver by dependency for you).
<source lang='bash'>
<source lang='bash'>
-
zypper in obs-api memcached
+
zypper in obs-api
</source>
</source>
-
'''Setup MySQL'''
+
'''Setup Mysql'''
-
MySQL server needs to be installed and configured to start as daemon
+
Mysql server needs to be installed and configured to start as deamon
<source lang='bash'>
<source lang='bash'>
chkconfig --add mysql
chkconfig --add mysql
rcmysql start
rcmysql start
</source>
</source>
-
Setup a secure installation, if it's the first time starting MySQL
+
Setup a secure installation, if it's the first time starting mysql
<source lang='bash'>
<source lang='bash'>
/usr/bin/mysql_secure_installation
/usr/bin/mysql_secure_installation
</source>
</source>
-
The frontend instance holds 2 applications, the API and the webui. Each one need a database created
+
The frontend instance holds 2 applications, the api and the webui. Each one need a database created
<source lang='bash'>
<source lang='bash'>
mysql -u root -p
mysql -u root -p
Line 282: Line 145:
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
</source>
</source>
-
Configure your MySQL user and password in the "production:" section of the API config:  
+
Configure your MySQL user and password in the "production:" section of the api config:  
<source lang='bash'>
<source lang='bash'>
vi /srv/www/obs/api/config/database.yml
vi /srv/www/obs/api/config/database.yml
Line 292: Line 155:
   password: ************
   password: ************
</source>
</source>
-
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:
+
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:
<source lang='bash'>
<source lang='bash'>
Line 313: Line 176:
You can check the migration was successful verifying the “migrated” message at the end of each statement.
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'''
+
'''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
+
You need to setup the correct hostnames to where webui, api and repo server are going to point to
<source lang='bash'>
<source lang='bash'>
vi /etc/lighttpd/vhosts.d/obs.conf
vi /etc/lighttpd/vhosts.d/obs.conf
-
$HTTP["host"] =~ "build" {
+
#webui (first section)
-
  rails_app  = "webui"
+
$HTTP["host"] =~ "build.maemo.org" {
-
  rails_root  = "/srv/www/obs/webui"
+
...
-
  rails_procs = 3
+
-
  # production/development are typical values here
+
-
  rails_mode  = "production"
+
-
  log_root = "/srv/www/obs/webui/log"
+
#api (second section)
 +
$HTTP["host"] =~ "api.maemo.org" {
 +
-
  include "vhosts.d/rails.inc"
+
#comment out whole the last section (3rd)
-
}
+
#It's going to be configured no Backend enabling the repository listing there
-
$HTTP["host"] =~ "api" {
+
</source>
-
  rails_app  = "api"
+
-
  rails_root  = "/srv/www/obs/api"
+
-
  rails_procs = 3
+
-
  # production/development are typical values here
+
-
  rails_mode  = "production"
+
-
 
+
-
  log_root = "/srv/www/obs/api/log"
+
-
 
+
-
  include "vhosts.d/rails.inc"
+
-
}
+
-
$HTTP["host"] =~ "download" {
+
-
# This should point to an rsync populated download repo
+
-
#  server.name = "download.obs.maemo.org"
+
-
#  server.document-root = "/srv/obs/repos/"
+
-
 
+
-
  proxy.server = ( "" => ( (
+
-
        "host" => "10.1.1.11",
+
-
        "port" => 80
+
-
      ))
+
-
  )
+
-
}
+
-
/source>
+
To enable these vhosts, make sure to '''uncomment''' the following in the 'custom includes' section at the bottom of /etc/lighttpd/lighttpd.conf:
To enable these vhosts, make sure to '''uncomment''' the following in the 'custom includes' section at the bottom of /etc/lighttpd/lighttpd.conf:
Line 364: Line 204:
   include_shell "cat vhosts.d/*.conf"   
   include_shell "cat vhosts.d/*.conf"   
</source>
</source>
-
Also, the modules "mod_magnet", "mod_rewrite" and FastCGI need to be enabled by uncommenting the corresponding lines in /etc/lighttpd/modules.conf:
+
Also, the modules "mod_magnet", "mod_rewrite" and fastcgi need to be enabled by uncommenting the corresponding lines in /etc/lighttpd/modules.conf:
<source lang='bash'>
<source lang='bash'>
vi /etc/lighttpd/modules.conf
vi /etc/lighttpd/modules.conf
Line 391: Line 231:
<source lang='bash'>
<source lang='bash'>
vi /srv/www/obs/webui/config/environments/production.rb
vi /srv/www/obs/webui/config/environments/production.rb
-
FRONTEND_HOST = "api.obs.maemo.org"
+
FRONTEND_HOST = "api.maemo.org"
-
FRONTEND_PORT = 80
+
-
EXTERNAL_FRONTEND_HOST = "api.obs.maemo.org"
+
-
BUGZILLA_HOST = "http://bugs.maemo.org/"
+
-
DOWNLOAD_URL = "http://downloads.obs.maemo.org"
+
</source>
</source>
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:
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:
<source lang='bash'>
<source lang='bash'>
vi /srv/www/obs/api/config/environments/production.rb
vi /srv/www/obs/api/config/environments/production.rb
-
SOURCE_HOST = "src.obs.maemo.org"
+
SOURCE_HOST = "obs-be.maemo.org"
SOURCE_PORT = 5352
SOURCE_PORT = 5352
</source>
</source>
Make sure TCP port 5352 is open on the firewall.
Make sure TCP port 5352 is open on the firewall.
-
Ensure lighttpd and obs ui helpers start:
+
Restart lighttpd
<source lang='bash'>
<source lang='bash'>
-
chkconfig --add memcached
+
#first add it as deamon
chkconfig --add lighttpd
chkconfig --add lighttpd
-
chkconfig --add obsapidelayed
 
-
chkconfig --add obswebuidelayed
 
-
 
-
rcmemcached start
 
rclighttpd start
rclighttpd start
-
rcobsapidelayed start
 
-
rcobswebuidelayed start
 
</source>
</source>
-
ligthttpd user and group need to be the owner of api and webui dirs (as well as log and tmp):
+
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):
<source lang='bash'>
<source lang='bash'>
-
chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}
+
chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}/{log,tmp}
</source>
</source>
-
== Installing the Workers ==
+
== Installing the Backend ==
-
The other 14 hosts on the cluster are reserved to be used as workers, where package builds are going to place.
+
On this host we need also to setup openSuse Tools repository:
-
 
+
-
The same openSUSE Tools repository addition must be done for each worker.
+
<source lang='bash'>
<source lang='bash'>
cd /etc/zypp/repos.d/;
cd /etc/zypp/repos.d/;
Line 434: Line 262:
</source>
</source>
-
Install worker:
+
Install:
<source lang='bash'>
<source lang='bash'>
-
zypper in obs-worker quemu-svn mount-static bash-static
+
zypper in obs-server obs-signer obs-utils
 +
# obs-server brings these other packages as dependency. This is just for you to notice which packages are needed for Backend installation
</source>
</source>
-
(mount-static and bash-static are needed on the worker for rpm cross-compile to work)
+
Configure Scheduler architectures
-
 
+
-
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server.
+
<source lang='bash'>
<source lang='bash'>
-
vi /etc/sysconfig/obs-worker
+
vi /etc/sysconfig/obs-server
-
OBS_SRC_SERVER="src.obs.maemo.org:5352"
+
OBS_SCHEDULER_ARCHITECTURES="i586 armv7el“
-
OBS_REPO_SERVERS="repo.obs.maemo.org:5252"
+
-
OBS_VM_TYPE="none"
+
</source>
</source>
-
Each worker has 16 CPUs, so 16 workers need to be started.
+
/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.
-
 
+
-
Start the worker service:
+
<source lang='bash'>
<source lang='bash'>
-
chkconfig --add obsworker
+
vi /usr/lib/obs/server/BSConfig.pm
 +
#change
 +
my $hostname = "obs-be.maemo.org";
-
rcobsworker start
+
our $srcserver = "http://obs-srcsrv.maemo.org:5352";
 +
our $reposerver = "http://obs-repo.maemo.org:5252";
</source>
</source>
-
== Tuning ==
+
Configure services as deamons
-
The lighttpd config was reduced to 3 api/webui child processes from 5.
+
<source lang='bash'>
 +
chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher
-
== Revise VG setup ==
+
#Check them
 +
chkconfig -l obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher
 +
</source>
 +
Start Services
 +
<source lang='bash'>
 +
  rcobsrepserver start
 +
  rcobssrcserver start
 +
  rcobsscheduler start
 +
  rcobsdispatcher start
 +
  rcobspublisher  start
 +
</source>
 +
For version 1.7 there are a new services. You can start them as well:
 +
* '''obswarden'''
 +
  It checks if build hosts are dieing and cleans up hanging builds
 +
* '''obssigner'''
 +
  It is used to sign packages via the obs-sign daemon. You need to configure
 +
  it in BSConfig.pm before you can use it.
 +
* '''obsservice'''
 +
  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.
-
pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part1
+
'''Install Lighttpd'''
-
pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part2
+
-
pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part3
+
-
pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part4
+
-
Now create the OBS VG for the host Xen worker:
+
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.
-
vgcreate OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part1
+
-
vgextend OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part2
+
 +
<source lang='bash'>
 +
zypper in lighttpd
 +
</source>
-
lvcreate -L 20G -n cache OBS
+
Create a new file under /etc/lighttpd/vhosts.d/. It can be obs.conf as well, and add:
-
mkfs -text4 /dev/OBS/cache
+
<source lang='bash'>
 +
vi /etc/lighttpd/vhosts.d/obs.conf
-
for i in 1 2 3 4 5 6 7 8 9 10
+
$HTTP["host"] =~ "obs-repo.maemo.org" {
-
do
+
  server.name = "obs-repo.maemo.org"
-
  lvcreate -L 4G -n worker_root$i OBS
+
-
  mkfs -text4 /dev/OBS/worker_root$i
+
-
  lvcreate -L 1G -n worker_swap$i OBS
+
-
  mkswap -f /dev/OBS/worker_swap$i
+
-
done
+
-
Note in 1.7.3 obsstoragesetup makes /OBS.worker/root1/root but obsworker looks for /OBS.worker/root_1/root (root1 vs root_1)
+
  server.document-root = "/srv/obs/repos/"
 +
  dir-listing.activate = "enable"
 +
}
 +
</source>
 +
To enable vhosts, remember to '''uncomment''' the following in the 'custom includes':
-
Also ensure the host has :
+
<source lang='bash'>
-
obs-worker (1.7.3)
+
vi /etc/lighttpd/lighttpd.conf
-
  qemu-svn
+
##
 +
  ## custom includes like vhosts.
 +
  ##
 +
  #include "conf.d/config.conf"
 +
  # following line uncommented as per
 +
  # /usr/share/doc/packages/obs-api/README.SETUP
 +
  include_shell "cat vhosts.d/*.conf"  
 +
</source>
-
In order to run arm binaries in the Xen chroot we need to ensure the initrd inserts binfmt_misc
+
Start lighttpd
-
in /etc/sysconfig/kernel, set
+
<source lang='bash'>
-
  DOMU_INITRD_MODULES="xennet xenblk binfmt_misc
+
#first add it as deamon
-
then
+
chkconfig --add lighttpd
-
mkinitrd -k vmlinuz-2.6.31.12-0.2-xen -i initrd-2.6.31.12-0.2-xen-binfmt -B
+
rclighttpd start
 +
</source>
-
On the backend machine edit /usr/lib/build/xen.conf to use the correct initrd
+
== Installing the Workers ==
-
== Remove Power/PPC from monitor page==
+
The other 14 hosts on the cluster are reserved to be used as workers, where package builds are going to place.
-
We don't target PPC, so best remove it from the build monitor page:
+
The same openSuse Tools repository addition must be done for each worker.
 +
<source lang='bash'>
 +
cd /etc/zypp/repos.d/;
 +
wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo
 +
zypper ref
 +
# Accept the trust key
 +
</source>
-
On FE in webui/app/views/monitor/_plots.rhtml
+
Install worker:
 +
<source lang='bash'>
 +
zypper in obs-worker
 +
</source>
-
Use html comments to disable the Power line:
+
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server.
 +
<source lang='bash'>
 +
vi /etc/sysconfig/obs-worker
 +
OBS_SRC_SERVER="srcsrv.maemo.org:5352"
 +
OBS_REPO_SERVERS="obs-repo.maemo.org:5252"
 +
</source>
-
<pre><!--<%= render :partial => 'graphs_arch', :locals => { :title => "Power", :prefix => 'ppc_' } %>--></pre>
+
Each worker has 16 CPUs, so 16 workers need to be started.
-
On FE webui/config/environment.rb
+
<source lang='bash'>rcobsworker</source> 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.
-
Change the MONITOR_IMAGEMAP section to:
+
Start the worker service:
 +
<source lang='bash'>
 +
chkconfig --add obsworker
-
<pre>MONITOR_IMAGEMAP = {.
+
rcobsworker start
-
      'pc_waiting' => [
+
</source>
-
        ["i586", 'waiting_i586'],
+
-
        ["x86_64", 'waiting_x86_64'] ],
+
-
      'pc_blocked' => [
+
-
        ["i586", 'blocked_i586' ],
+
-
        ["x86_64", 'blocked_x86_64'] ],
+
-
      'pc_workers' => [
+
-
        ["idle", 'idle_x86_64' ],
+
-
        ['building', 'building_x86_64' ] ],
+
-
#      'ppc_waiting' => [
+
-
#        ["ppc", 'waiting_ppc'],
+
-
#        ["ppc64", 'waiting_ppc64'] ],
+
-
#      'ppc_blocked' => [
+
-
#        ["ppc", 'blocked_ppc' ],
+
-
#        ["ppc64", 'blocked_ppc64'] ],
+
-
#      'ppc_workers' => [
+
-
#        ["idle", 'idle_ppc64' ],
+
-
#        ['building', 'building_ppc64' ] ],
+
-
      'arm_waiting' => [
+
-
        ["armv5", 'waiting_armv5el'],
+
-
        ["armv7", 'waiting_armv7el'] ],
+
-
      'arm_blocked' => [
+
-
        ["armv5", 'blocked_armv5el' ],
+
-
        ["armv7", 'blocked_armv7el'] ],
+
-
      'arm_workers' => [
+
-
        ["idle", 'idle_armv7el' ],
+
-
        ['building', 'building_armv7el' ] ],
+
-
    }
+
-
 
+
-
</pre>
+
-
[[Category:OpenSuse build service]]
+

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)