<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.meego.com/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.meego.com/index.php?title=Special:Contributions/Liam&amp;feed=atom&amp;limit=50&amp;target=Liam&amp;year=&amp;month=</id>
		<title>MeeGo wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.meego.com/index.php?title=Special:Contributions/Liam&amp;feed=atom&amp;limit=50&amp;target=Liam&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Special:Contributions/Liam"/>
		<updated>2013-05-21T04:57:04Z</updated>
		<subtitle>From MeeGo wiki</subtitle>
		<generator>MediaWiki 1.16.2</generator>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-30T13:46:15Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is enough to build packages, but there are security concerns of running just qemu for builds.  You can setup the build machines to use either KVM or Xen.  Chose one and follow the instructions below.  Most people use KVM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within YaST2 Control Center, there is a &amp;lt;b&amp;gt;Virtualization&amp;lt;/b&amp;gt; option on the left which makes available an &amp;lt;b&amp;gt;Install Hypervisor and Tools&amp;lt;/b&amp;gt; option on the right.  Install the tools and setup a bridge ethernet device.  Be suer to change the default route to use br0.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;KVM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast -i kvm virt-manager&lt;br /&gt;
       # chkconfig libvirtd on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot.  If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--kvm&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Xen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot the machine and be sure to select the Xen kernel in the grub menu. If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--xen&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Start the lighttpd server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       rclighttpd start       &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-29T18:33:24Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is enough to build packages, but there are security concerns of running just qemu for builds.  You can setup the build machines to use either KVM or Xen.  Chose one and follow the instructions below.  Most people use KVM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;KVM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast -i kvm virt-manager&lt;br /&gt;
       # chkconfig libvirtd on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot.  If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--kvm&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Xen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within YaST2 Control Center, there is a &amp;lt;b&amp;gt;Virtualization&amp;lt;/b&amp;gt; option on the left which makes available an &amp;lt;b&amp;gt;Install Hypervisor and Tools&amp;lt;/b&amp;gt; option on the right.  Install the tools and reboot the machine.  Be sure to select the Xen kernel in the grub menu. If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--xen&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Start the lighttpd server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       rclighttpd start       &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-29T18:01:39Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is enough to build packages, but there are security concerns of running just qemu for builds.  You can setup the build machines to use either KVM or Xen.  Chose one and follow the instructions below.  Most people use KVM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;KVM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # zypper in kvm virt-manager&lt;br /&gt;
       # chkconfig libvirtd on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot.  If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--kvm&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Xen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within YaST2 Control Center, there is a &amp;lt;b&amp;gt;Virtualization&amp;lt;/b&amp;gt; option on the left which makes available an &amp;lt;b&amp;gt;Install Hypervisor and Tools&amp;lt;/b&amp;gt; option on the right.  Install the tools and reboot the machine.  Be sure to select the Xen kernel in the grub menu. If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--xen&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Start the lighttpd server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       rclighttpd start       &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-29T14:47:07Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is enough to build packages, but there are security concerns of running just qemu for builds.  You can setup the build machines to use either KVM or Xen.  Chose one and follow the instructions below.  Most people use KVM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;KVM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       yast -i kvm virt-manager&lt;br /&gt;
       chkconfig libvirtd on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot.  If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--kvm&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Xen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only install KVM or Xen, not both.  Only one will be used at a time.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within YaST2 Control Center, there is a &amp;lt;b&amp;gt;Virtualization&amp;lt;/b&amp;gt; option on the left which makes available an &amp;lt;b&amp;gt;Install Hypervisor and Tools&amp;lt;/b&amp;gt; option on the right.  Install the tools and reboot the machine.  Be sure to select the Xen kernel in the grub menu. If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--xen&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Start the lighttpd server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       rclighttpd start       &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-29T14:44:53Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is enough to build packages, but there are security concerns of running just qemu for builds.  You can setup the build machines to use either KVM or Xen.  Chose one and follow the instructions below.  Most people use KVM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;KVM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       yast -i kvm virt-manager&lt;br /&gt;
       chkconfig libvirtd on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Reboot.  If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--kvm&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Xen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # yast2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within YaST2 Control Center, there is a &amp;lt;b&amp;gt;Virtualization&amp;lt;/b&amp;gt; option on the left which makes available an &amp;lt;b&amp;gt;Install Hypervisor and Tools&amp;lt;/b&amp;gt; option on the right.  Install the tools and reboot the machine.  Be sure to select the Xen kernel in the grub menu. If you run &amp;lt;b&amp;gt;ps aux|grep bs_worker&amp;lt;/b&amp;gt;, the worker should now have a &amp;lt;i&amp;gt;--xen&amp;lt;/i&amp;gt; option within the command.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Start the lighttpd server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       rclighttpd start       &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-22T19:47:23Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this setup page, the &amp;lt;local API URL&amp;gt; is http://192.168.1.1:81.  Continuing on with the previous example, the &amp;lt;repository name&amp;gt; would be Trunk again.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-22T19:14:10Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-22T19:13:20Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from [http://meego.gitorious.org/meego-developer-tools/obs-project-config the git tree] or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-22T19:12:41Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The prj and prjconf settings are available from &amp;lt;a href=&amp;quot;http://meego.gitorious.org/meego-developer-tools/obs-project-config&amp;quot;&amp;gt;the git tree&amp;lt;/a&amp;gt; or directly from the OBS server:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To clone Trunk off MeeGo's api server: &amp;lt;remote API URL&amp;gt; is http://api.meego.com and &amp;lt;repositor name&amp;gt; is Trunk, for example.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-17T16:48:23Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner obsapidelayed obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-16T21:36:29Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-devel mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro</id>
		<title>Build Infrastructure/Sysadmin Distro</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro"/>
				<updated>2010-06-16T19:27:40Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These pages are in preparation - contributions welcome on the discussion page&lt;br /&gt;
&lt;br /&gt;
== The MeeGo VM appliance ==&lt;br /&gt;
... WIP ...&lt;br /&gt;
== How to setup an Build Service locally for testing ==&lt;br /&gt;
The software driving the openSUSE Build Service (OBS) is available for different distributions.&lt;br /&gt;
Take the packages suitable for your distribution of choice hosted at the openSUSE Build Service instance:&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools 1.7.x (current version)]&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/ 1.8  ('MeeGo' release)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the distributions mentioned below we provide setup-howtos:&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS 1.7 on openSUSE 11.2]]&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112|OBS 1.8 on openSUSE 11.2]]&lt;br /&gt;
&lt;br /&gt;
A good source of documentation is the upstream project wiki hosted at [http://wiki.opensuse.org/Portal:Build_Service http://wiki.opensuse.org/Portal:Build_Service]&lt;br /&gt;
&lt;br /&gt;
You can review a bare-metal to operational setup at the [http://wiki.maemo.org/OpenSuse_Build_Service/Installation maemo.org and MeeGo community OBS setup notes]&lt;br /&gt;
&lt;br /&gt;
== Advanced setup topics ==&lt;br /&gt;
== Seamless cross-compilation, cross-toolchain integration ==&lt;br /&gt;
== Whats the metadata (prjconf/prj), attributes, admin-tools for. ==&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
== irc / mailinglists / contact ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro</id>
		<title>Build Infrastructure/Sysadmin Distro</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro"/>
				<updated>2010-06-16T18:54:27Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These pages are in preparation - contributions welcome on the discussion page&lt;br /&gt;
&lt;br /&gt;
== The MeeGo VM appliance ==&lt;br /&gt;
... WIP ...&lt;br /&gt;
== How to setup an Build Service locally for testing ==&lt;br /&gt;
The software driving the openSUSE Build Service (OBS) is available for different distributions.&lt;br /&gt;
Take the packages suitable for your distribution of choice hosted at the openSUSE Build Service instance:&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools 1.7.x (current version)]&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/ 1.8  ('MeeGo' release)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the distributions mentioned below we provide setup-howtos:&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS 1.7 on openSUSE 11.2]]&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS18_setup_openSUSE112|OBS 1.8 on openSUSE 11.2]]&lt;br /&gt;
&lt;br /&gt;
A good source of documentation is the upstream project wiki hosted at [http://wiki.opensuse.org/Portal:Build_Service http://wiki.opensuse.org/Portal:Build_Service]&lt;br /&gt;
&lt;br /&gt;
You can review a bare-metal to operational setup at the [http://wiki.maemo.org/OpenSuse_Build_Service/Installation maemo.org and MeeGo community OBS setup notes]&lt;br /&gt;
&lt;br /&gt;
== Advanced setup topics ==&lt;br /&gt;
== Seamless cross-compilation, cross-toolchain integration ==&lt;br /&gt;
== Whats the metadata (prjconf/prj), attributes, admin-tools for. ==&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
== irc / mailinglists / contact ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro</id>
		<title>Build Infrastructure/Sysadmin Distro</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro"/>
				<updated>2010-06-16T18:52:35Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: /* How to setup an Build Service locally for testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These pages are in preparation - contributions welcome on the discussion page&lt;br /&gt;
&lt;br /&gt;
== The MeeGo VM appliance ==&lt;br /&gt;
... WIP ...&lt;br /&gt;
== How to setup an Build Service locally for testing ==&lt;br /&gt;
The software driving the openSUSE Build Service (OBS) is available for different distributions.&lt;br /&gt;
Take the packages suitable for your distribution of choice hosted at the openSUSE Build Service instance:&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools 1.7.x (current version)]&lt;br /&gt;
* [http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/ 1.8rc3  ('MeeGo' release)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the distributions mentioned below we provide setup-howtos:&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS 1.7 on openSUSE 11.2]]&lt;br /&gt;
* [[Build_Infrastructure/Sysadmin_Distro/OBS18_setup_openSUSE112|OBS 1.8 on openSUSE 11.2]]&lt;br /&gt;
&lt;br /&gt;
A good source of documentation is the upstream project wiki hosted at [http://wiki.opensuse.org/Portal:Build_Service http://wiki.opensuse.org/Portal:Build_Service]&lt;br /&gt;
&lt;br /&gt;
You can review a bare-metal to operational setup at the [http://wiki.maemo.org/OpenSuse_Build_Service/Installation maemo.org and MeeGo community OBS setup notes]&lt;br /&gt;
&lt;br /&gt;
== Advanced setup topics ==&lt;br /&gt;
== Seamless cross-compilation, cross-toolchain integration ==&lt;br /&gt;
== Whats the metadata (prjconf/prj), attributes, admin-tools for. ==&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
== irc / mailinglists / contact ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-16T18:48:36Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools and OpenSUSE:Tools:Meego repository to zypper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/openSUSE_11.2/openSUSE:Tools:MeeGo.repo &lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-16T18:04:23Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is now released. These instructions cover the new 1.8 release.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS1.8 setup openSUSE112</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS1.8_setup_openSUSE112"/>
				<updated>2010-06-16T18:03:32Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: Created page with '&amp;lt;p&amp;gt; These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.8 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
change priority to avoid installing obs 2.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper mr -p 60 openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -r openSUSE_Tools_MeeGo&lt;br /&gt;
      zypper mr -d openSUSE_Tools&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-16T17:24:26Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-16T17:23:49Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Make sure you set the permissions on the api and webui directories.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this doesn't work then try to recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; drop database api_production;&lt;br /&gt;
      mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-16T17:21:22Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Cannot load person data for Admin in application_helper&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is a database issue.  Recreate the databases:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# mysql -u root -p&lt;br /&gt;
mysql&amp;gt; drop database api_production;&lt;br /&gt;
mysql&amp;gt; drop database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rerun the mysql database setup from above and re-run rake.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-16T16:16:12Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Make sure vhosts are enabled by uncommenting the following line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/lighttpd/lighttpd.conf&lt;br /&gt;
       include_shell &amp;quot;cat /etc/lighttpd/vhosts.d/*.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:59:15Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:54:05Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:51:00Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-04T19:50:30Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
Liam is a Linux Developer at [http://www.windriver.com Wind River].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can find him on freenode as jedix&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:48:30Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Setup Installation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:48:09Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo documentation]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:47:56Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo documentation]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:47:42Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[http://wiki.maemo.org/OpenSuse_Build_Service/Installation | Maemo documentation]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T19:47:21Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;h2&amp;gt;External Links&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
[[Maemo documentation | http://wiki.maemo.org/OpenSuse_Build_Service/Installation]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
[[User:Dl9pf | Dl9pf]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T17:35:26Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setting up Cross Compile&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Configure build types&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       # vi /etc/sysconfig/obs-server&lt;br /&gt;
       OBS_SCHEDULER_ARCHITECTURES=&amp;quot;i586 armv5el armv7el“&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T15:05:57Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Troubleshooting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;HTTP Error 500&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T15:05:36Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Troubleshooting&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;HTTP Error 500&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T15:05:12Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Troubleshooting&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;HTTP Error 500&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Check &amp;lt;b&amp;gt;/srv/www/obs/api/config/environments/production.rb&amp;lt;/b&amp;gt;&lt;br /&gt;
 and &amp;lt;b&amp;gt;/srv/www/obs/webui/config/environments/production.rb&amp;lt;/b&amp;gt; for configuration of the &lt;br /&gt;
&amp;lt;b&amp;gt;SOURCE_HOST&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;FRONTEND_HOST&amp;lt;/b&amp;gt;.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T15:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Troubleshooting&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Here are common issues that have been seen and how to resolve them.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;HTTP Error 500&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T14:51:47Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and login to OBS.  Port 80 should be the webui, port 81 should be the api, and port 82 should be the repository directory.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T14:48:03Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Verification&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At this point you should be able to open a browser and go to your server and log into OBS.  Port 80 (the default port) should get you to the webui.  Port 81 should get you to the API login.  The default username/password is Admin/opensuse.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T14:02:03Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.  Currently this document describes how to setup an evaluation/test setup and is not meant as a production setup.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.  Once public access is allowed to the global MeeGo OBS, there will be a link to obtain access.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are cases where vendors may rather have full control of their builds and keep source private due to licensing restrictions, etc.  These instructions are for these special cases.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. These instructions will be updated for the new version as soon as possible.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:45:01Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as a production setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-04T13:43:33Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&lt;br /&gt;
Liam is a Linux Developer at [[http://www.windriver.com Wind River]].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can find him on freenode as jedix&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-04T13:42:33Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Liam is a Linux Developer working at [[http://www.windriver.com Wind River]].&lt;br /&gt;
He goes by the nick jedix on freenode&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:41:17Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam | Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:40:10Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:39:36Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Liam][User:Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:39:12Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Liam User:Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[User:Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114</id>
		<title>Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114"/>
				<updated>2010-06-04T13:38:18Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These steps are to setup Open Build Service 1.7.5 on an openSuSE 11.2 installation.&lt;br /&gt;
It's an evaluation/test setup and not meant as productive setup.&lt;br /&gt;
&lt;br /&gt;
MeeGo will switch to [http://lists.opensuse.org/opensuse-buildservice/2010-05/msg00094.html version 1.8] of the Build Service which is to be released soon. We'll update the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Add Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /etc/zypp/repos.d/;&lt;br /&gt;
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo&lt;br /&gt;
      zypper ref&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the trust key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the Client&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Client Packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For obs worker:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-worker qemu-svn mount-static bash-static&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Point To The Server&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/sysconfig/obs-worker&lt;br /&gt;
      OBS_SRC_SERVER=&amp;quot;192.168.1.1:5352&amp;quot;&lt;br /&gt;
      OBS_REPO_SERVERS=&amp;quot;192.168.1.1:5252&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start the Client&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Start the worker service&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add obsworker&lt;br /&gt;
      rcobsworker start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Setup the server&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Install the Server packages&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For server:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;MySQL Setup&amp;lt;/h3&amp;gt;&lt;br /&gt;
Start daemon by default:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add mysql&lt;br /&gt;
      rcmysql start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Secure the installation&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /usr/bin/mysql_secure_installation&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the databases:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      mysql -u root -p&lt;br /&gt;
      mysql&amp;gt; create database api_production;&lt;br /&gt;
      mysql&amp;gt; create database webui_production;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the obs user for these databases (substitute the correct password in):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON api_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      GRANT all privileges&lt;br /&gt;
            ON webui_production.* &lt;br /&gt;
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';&lt;br /&gt;
      FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, configure OBS to use MySQL, first the API server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/api/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: api_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And setup the webui to use MySQL...&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      vi /srv/www/obs/webui/config/database.yml&lt;br /&gt;
      #change the production section&lt;br /&gt;
      production:&lt;br /&gt;
        adapter: mysql&lt;br /&gt;
        database: webui_production&lt;br /&gt;
        username: obs&lt;br /&gt;
        password: ************&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Populate the database&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      cd /srv/www/obs/api/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
 &lt;br /&gt;
      cd /srv/www/obs/webui/&lt;br /&gt;
      RAILS_ENV=&amp;quot;production&amp;quot; rake db:migrate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If this fails, check /srv/www/obs/api/config/environments/production.rb and /srv/www/obs/webui/config/environments/production.rb for configuration of the SOURCE_HOST and FRONTEND_HOST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Setup lighttpd for webui&amp;lt;/h3&amp;gt;&lt;br /&gt;
Setup the regular webui on 80, api on 81, and 82 is the repository.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       vi /etc/lighttpd/vhosts.d/obs.conf&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:80&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;webui&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/webui&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/webui/log&amp;quot;&lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:81&amp;quot; {&lt;br /&gt;
         rails_app   = &amp;quot;api&amp;quot;&lt;br /&gt;
         rails_root  = &amp;quot;/srv/www/obs/api&amp;quot;&lt;br /&gt;
         rails_procs = 3&lt;br /&gt;
         # production/development are typical values here&lt;br /&gt;
         rails_mode  = &amp;quot;production&amp;quot;&lt;br /&gt;
         log_root = &amp;quot;/srv/www/obs/api/log&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         include &amp;quot;vhosts.d/rails.inc&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
       $SERVER[&amp;quot;socket&amp;quot;] == &amp;quot;:82&amp;quot; {&lt;br /&gt;
         server.name = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
         server.document-root = &amp;quot;/srv/obs/repos/&amp;quot;&lt;br /&gt;
         dir-listing.activate = &amp;quot;enable&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
lighttpd requires some extra modules to be enabled: mod_access, mod_rewrite, mod_magnet, and mod_fastcgi. Do so by editing /etc/lighttpd/modules.conf:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /etc/lighttpd/modules.conf&lt;br /&gt;
    server.modules = (&lt;br /&gt;
      &amp;quot;mod_access&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_alias&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_auth&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_evasive&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_redirect&amp;quot;,&lt;br /&gt;
      &amp;quot;mod_rewrite&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_setenv&amp;quot;,&lt;br /&gt;
    #  &amp;quot;mod_usertrack&amp;quot;,&lt;br /&gt;
    )&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## mod_magnet&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/magnet.conf&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    ##&lt;br /&gt;
    ## FastCGI (mod_fastcgi)&lt;br /&gt;
    ##&lt;br /&gt;
    include &amp;quot;conf.d/fastcgi.conf&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/webui/config/environments/production.rb&lt;br /&gt;
      FRONTEND_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
      FRONTEND_PORT = 81&lt;br /&gt;
      FRONTEND_PROTOCOL = 'http'&lt;br /&gt;
      BUGZILLA_HOST = nil&lt;br /&gt;
      DOWNLOAD_URL = &amp;quot;http://192.168.1.1:82&amp;quot;&lt;br /&gt;
      ICHAIN_MODE = &amp;quot;off&amp;quot;&lt;br /&gt;
      BASE_NAMESPACE = nil&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      # vi /srv/www/obs/api/config/environments/production.rb&lt;br /&gt;
      SOURCE_HOST = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Add the server to start by default.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chkconfig --add memcached&lt;br /&gt;
      chkconfig --add lighttpd&lt;br /&gt;
      chkconfig --add obsapidelayed&lt;br /&gt;
      chkconfig --add obswebuidelayed&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp):&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;BSConfig.pm&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file &amp;lt;i&amp;gt;/usr/lib/obs/server/BSConfig.pm&amp;lt;/i&amp;gt; is used to configure several settings for the Build Service.  One of the major components is setting up the $hostname variable to the correct value.  Currently I have this set to the IP address of the server.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       my $hostname = '192.168.1.1';&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       our $repodownload = &amp;quot;http://$hostname:82/&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Start By Default&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OBS should start automatically, so they should be added to chkconfig to do so:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Cloning Repositories&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;prj and prjconf&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The project settings and the project config is an important part of the project and should be copied to the local project setup.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; &amp;gt; prj.txt&lt;br /&gt;
      osc -A &amp;lt;remote API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; &amp;gt; prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Modify the prj.txt file to name valid users in the userid fields.  Once modified, the settings and configuration can be applied to the local project.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prj &amp;lt;repository name&amp;gt; -F prj.txt&lt;br /&gt;
      osc -A &amp;lt;local API URL&amp;gt; meta prjconf &amp;lt;repository name&amp;gt; -F prjconf.txt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Mirror&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
obs_mirror_project (/usr/sbin/obs_mirror_project) is used to copy an external OBS project.  The script needed to be modified to use build.meego.com as apposed to the hard coded download.opensuse.org site. You need an login to build.meego.com to execute this script.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/sbin/obs_mirror_project &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Rescan Repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the download of the project is complete, you have to rescan the local repository.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/usr/lib/obs/server/bs_admin --rescan-repository &amp;lt;repository name&amp;gt; &amp;lt;type&amp;gt; &amp;lt;arch&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Liam]]&lt;br /&gt;
&lt;br /&gt;
dl9pf&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-03T20:57:37Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Liam is a Linux Developer working at [[http://www.windriver.com Wind River]].&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-03T20:57:21Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Liam is a Linux Developer working at [[http://www.windriver.com &amp;quot;Wind River&amp;quot;]].&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-03T20:56:21Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Liam works for [[http://www.windriver.com &amp;quot;Wind River&amp;quot;]].&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Liam</id>
		<title>User:Liam</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Liam"/>
				<updated>2010-06-03T20:56:01Z</updated>
		
		<summary type="html">&lt;p&gt;Liam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Liam works for [[http://www.windriver.com|&amp;quot;Wind River&amp;quot;]].&lt;/div&gt;</summary>
		<author><name>Liam</name></author>	</entry>

	</feed>