Meego Wiki
Views

Build Infrastructure/Sysadmin Distro/OBS setup openSUSE114

From MeeGo wiki
< Build Infrastructure | Sysadmin Distro(Difference between revisions)
Jump to: navigation, search
(Added a missing plugin (it might be valid for 12.1 only!))
 
(34 intermediate revisions not shown)
Line 1: Line 1:
 +
Please check http://gitorious.org/opensuse/build-service/blobs/master/dist/README.SETUP
 +
for the latest setup instructions!
<p>
<p>
-
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.
+
These steps show how to setup Open Build Service (OBS) on an openSuSE 11.4 installation. The OBS installation will consist of a main OBS server and an OBS worker. This document describes how to setup an evaluation/test setup and is not meant as production setup.
</p>
</p>
<p>
<p>
-
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.
+
Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.
</p>
</p>
<p>
<p>
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.
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.
-
</p>
 
-
<p>
 
-
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.
 
</p>
</p>
<h2>Add Repositories</h2>
<h2>Add Repositories</h2>
-
First, we have to add the openSUSE:Tools repository to zypper for qemu-svn and other updated tools.
+
First, we have to add the openSUSE:Tools repository to both OBS server and OBS worker:
<code>
<code>
-
       cd /etc/zypp/repos.d/;
+
       # zypper addrepo http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.4/openSUSE:Tools.repo
-
      wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/openSUSE:Tools.repo
+
       # zypper refresh
-
       zypper ref
+
</code>
</code>
-
Accept the trust key.
+
When zypper asks, accept the trust key.
 +
<h2>Setup OBS Server</h2>
-
<h2>Setup the Client</h2>
+
<h3>Install the Server packages</h3>
-
<h3>Install the Client Packages</h3>
+
-
*For obs worker:
 
<code>
<code>
-
       zypper in obs-worker qemu-svn mount-static bash-static
+
       # zypper install obs-server obs-signd obs-utils createrepo nfs-client obs-api memcached lighttpd lighttpd-mod_magnet qemu
</code>
</code>
-
<h3>Point To The Server</h3>
+
If you installed a minimal openSUSE installation then python packages may conflict with the minimal configuration package patterns-openSUSE-minimal_base. This package can be safely removed if it causes dependency problems.
-
<p>
+
-
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server. (The example server is 192.168.1.1)
+
-
</p>
+
-
<code>
+
-
      # vi /etc/sysconfig/obs-worker
+
-
      OBS_SRC_SERVER="192.168.1.1:5352"
+
-
      OBS_REPO_SERVERS="192.168.1.1:5252"
+
-
</code>
+
-
<h3>Start the Client</h3>
+
<h3>MySQL Setup</h3>
-
<p>Start the worker service
+
-
</p>
+
-
<code>
+
-
      chkconfig --add obsworker
+
-
      rcobsworker start
+
-
</code>
+
-
<h2>Setup the server</h2>
+
Start daemon by default:
-
<h3>Install the Server packages</h3>
 
-
 
-
*For server:
 
<code>
<code>
-
       zypper in obs-server obs-signer obs-utils createrepo nfs-client obs-api memcached lighttpd
+
       # chkconfig --add mysql
 +
      # rcmysql start
</code>
</code>
-
<h3>MySQL Setup</h3>
+
Secure the installation:
-
Start daemon by default:
+
-
<code>
+
-
      chkconfig --add mysql
+
-
      rcmysql start
+
-
</code>
+
-
Secure the installation
 
<code>
<code>
-
       /usr/bin/mysql_secure_installation
+
       # /usr/bin/mysql_secure_installation
</code>
</code>
Create the databases:
Create the databases:
 +
<code>
<code>
-
      mysql -u root -p
+
    # mysql -u root -p
-
      mysql> create database api_production;
+
    mysql> create database api_production;
-
      mysql> create database webui_production;
+
    mysql> create database webui_production;
</code>
</code>
-
Add the obs user for these databases (substitute the correct password in):
+
Add the obs user for these databases (substitute ********** with your password):
<code>
<code>
-
       GRANT all privileges
+
       mysql> GRANT all privileges
-
            ON api_production.*  
+
            ON api_production.*  
-
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
+
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
-
       GRANT all privileges
+
       mysql> GRANT all privileges
-
            ON webui_production.*  
+
            ON webui_production.*  
-
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
+
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
-
       FLUSH PRIVILEGES;
+
       mysql> FLUSH PRIVILEGES;
 +
      mysql> quit
</code>
</code>
-
Now, configure OBS to use MySQL, first the API server.
+
Now, configure OBS to use MySQL. First the API server:
<code>
<code>
-
       vi /srv/www/obs/api/config/database.yml
+
       # vi /srv/www/obs/api/config/database.yml
-
      #change the production section
+
       production:
       production:
         adapter: mysql
         adapter: mysql
Line 102: Line 78:
         password: ************
         password: ************
</code>
</code>
-
And setup the webui to use MySQL...
+
 
 +
And setup the webui to use MySQL:
 +
 
<code>
<code>
-
       vi /srv/www/obs/webui/config/database.yml
+
       # vi /srv/www/obs/webui/config/database.yml
-
      #change the production section
+
       production:
       production:
         adapter: mysql
         adapter: mysql
Line 113: Line 90:
</code>
</code>
-
Populate the database
+
Populate the database:
 +
 
<code>
<code>
-
       cd /srv/www/obs/api/
+
       # cd /srv/www/obs/api/
-
       RAILS_ENV="production" rake db:migrate
+
       # RAILS_ENV="production" rake db:setup
-
+
       # cd /srv/www/obs/webui/
-
       cd /srv/www/obs/webui/
+
       # RAILS_ENV="production" rake db:setup
-
       RAILS_ENV="production" rake db:migrate
+
</code>
</code>
 +
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.
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.
<h3>Setup lighttpd for webui</h3>
<h3>Setup lighttpd for webui</h3>
-
Setup the regular webui on 80, api on 81, and 82 is the repository.
 
-
<code>
 
-
      vi /etc/lighttpd/vhosts.d/obs.conf
 
-
      $SERVER["socket"] == ":80" {
 
-
        rails_app  = "webui"
 
-
        rails_root  = "/srv/www/obs/webui"
 
-
        rails_procs = 3
 
-
        # production/development are typical values here
 
-
        rails_mode  = "production"
 
-
        log_root = "/srv/www/obs/webui/log"
 
-
        include "vhosts.d/rails.inc"
 
-
      }
 
-
      $SERVER["socket"] == ":81" {
 
-
        rails_app  = "api"
 
-
        rails_root  = "/srv/www/obs/api"
 
-
        rails_procs = 3
 
-
        # production/development are typical values here
 
-
        rails_mode  = "production"
 
-
        log_root = "/srv/www/obs/api/log"
 
-
 
-
        include "vhosts.d/rails.inc"
 
-
      }
 
-
      $SERVER["socket"] == ":82" {
 
-
        server.name = "192.168.1.1"
 
-
        server.document-root = "/srv/obs/repos/"
 
-
        dir-listing.activate = "enable"
 
-
      }
 
 +
Make sure vhosts are enabled by uncommenting the following line:
 +
 +
<code>
 +
      # vi /etc/lighttpd/lighttpd.conf
 +
      include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
</code>
</code>
 +
 +
The installed /etc/lighttpd/vhosts.d/obs.conf should be usable for this setup but it can be changed later on.
 +
<p>
<p>
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:
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:
Line 183: Line 142:
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:
You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:
</p>
</p>
 +
<code>
<code>
       # vi /srv/www/obs/webui/config/environments/production.rb
       # vi /srv/www/obs/webui/config/environments/production.rb
Line 206: Line 166:
</p>
</p>
<code>
<code>
-
       chkconfig --add memcached
+
       # chkconfig --add memcached
-
       chkconfig --add lighttpd
+
       # chkconfig --add lighttpd
-
       chkconfig --add obsapidelayed
+
       # chkconfig --add obsapidelayed
-
       chkconfig --add obswebuidelayed
+
       # chkconfig --add obswebuidelayed
</code>
</code>
Line 216: Line 176:
</p>
</p>
<code>
<code>
-
       chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}
+
       # chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}
</code>
</code>
Line 225: Line 185:
<code>
<code>
 +
      # vi /usr/lib/obs/server/BSConfig.pm
       my $hostname = '192.168.1.1';
       my $hostname = '192.168.1.1';
</code>
</code>
Line 233: Line 194:
<code>
<code>
 +
      # vi /usr/lib/obs/server/BSConfig.pm
       our $repodownload = "http://$hostname:82/";
       our $repodownload = "http://$hostname:82/";
 +
</code>
 +
 +
OBS API custom logger seems to need a small fix to get going:
 +
 +
<code>
 +
--- /srv/www/obs/api/lib/custom_logger.rb-orig  2011-08-12 03:12:25.195998605 +0200
 +
+++ /srv/www/obs/api/lib/custom_logger.rb      2011-08-12 03:41:34.277000004 +0200
 +
@@ -4,9 +4,11 @@ class NiceLogger < Logger
 +
 
 +
    def format_message(severity, timestamp, progname, msg)
 +
      out=""
 +
-    while msg[0] == 13 or msg[0] == 10
 +
-      out = out.concat(msg[0])
 +
-      msg = msg[1..-1]
 +
+    if msg.kind_of?(Array)
 +
+      while msg[0] == 13 or msg[0] == 10
 +
+        out = out.concat(msg[0])
 +
+        msg = msg[1..-1]
 +
+      end
 +
      end
 +
   
 +
      out + "[%s|#%5d] %s\n" % [severity[0..0], $$, msg]
</code>
</code>
<h3>Verification</h3>
<h3>Verification</h3>
 +
 +
Start the server.
 +
<code>
 +
# rcmemcached start
 +
# rclighttpd start
 +
# rcobsapidelayed start
 +
# rcobswebuidelayed start
 +
# rcobsrepserver start
 +
# rcobssrcserver start
 +
# rcobsscheduler start
 +
# rcobsdispatcher start
 +
# rcobspublisher start
 +
# rcobswarden start
 +
# rcobssigner start
 +
</code>
 +
<p>
<p>
-
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.
+
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. Admin user should be able to create a new project in the '''List of All Projects -> Create a new project''' and filling in a project name, title and description.
</p>
</p>
 +
<h3>Start By Default</h3>
<h3>Start By Default</h3>
<p>The OBS should start automatically, so they should be added to chkconfig to do so:</p>
<p>The OBS should start automatically, so they should be added to chkconfig to do so:</p>
<code>
<code>
-
      chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner
+
      # chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner
</code>
</code>
 +
<h2>Setup OBS Worker</h2>
 +
 +
<h3>Install the Worker Packages</h3>
 +
 +
<code>
 +
      # zypper install obs-worker
 +
</code>
 +
 +
<h3>Configure OBS Worker</h3>
 +
<p>
 +
Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server which is one of the main OBS server services. In this example the server is 192.168.1.1.
 +
</p>
 +
<code>
 +
      # vi /etc/sysconfig/obs-worker
 +
      OBS_SRC_SERVER="192.168.1.1:5352"
 +
      OBS_REPO_SERVERS="192.168.1.1:5252"
 +
</code>
 +
 +
<h3>Start OBS Worker</h3>
 +
<p>Start the worker service:
 +
</p>
 +
<code>
 +
      chkconfig --add obsworker
 +
      rcobsworker start
 +
</code>
 +
 +
<h2>Setting up Cross Compile</h2>
 +
<h3>Configure build types</h3>
 +
<p>
 +
To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server.  For example, the following will enable ARM builds.
 +
</p>
 +
<code>
 +
      # vi /etc/sysconfig/obs-server
 +
      OBS_SCHEDULER_ARCHITECTURES="i586 armv5el armv7el“
 +
</code>
<h2>Cloning Repositories</h2>
<h2>Cloning Repositories</h2>
Line 279: Line 315:
</code>
</code>
 +
<h2>Troubleshooting</h2>
 +
<p>
 +
Here are common issues that have been seen and how to resolve them.
 +
</p>
 +
<h3>HTTP Error 500</h3>
 +
<p>
 +
Check <b>/srv/www/obs/api/config/environments/production.rb</b>
 +
and <b>/srv/www/obs/webui/config/environments/production.rb</b> for configuration of the
 +
<b>SOURCE_HOST</b> and <b>FRONTEND_HOST</b>.
 +
</p>
 +
<h3>Cannot load person data for Admin in application_helper</h3>
 +
<p>
 +
Make sure you set the permissions on the api and webui directories.
 +
</p>
 +
<code>
 +
      chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}
 +
</code>
 +
<p>
 +
If this doesn't work then try to recreate the databases:
 +
</p>
 +
<code>
 +
      # mysql -u root -p
 +
      mysql> drop database api_production;
 +
      mysql> drop database webui_production;
 +
</code>
 +
<p>
 +
Rerun the mysql database setup from above and re-run rake.
 +
</p>
 +
<h3>404 while trying to see the package repository</h3>
 +
Check, if the <tt>/srv/obs/repos</tt> directory is owned by <tt>obsrun.obsrun</tt> - if not, <tt>chown</tt> it. Failing to do so will prevent publisher from publishing your repositories in repository directory, and when you try accessing them you will get the <tt>404</tt>.
 +
 +
<h3>OBS Web Interface Error:</h3>
 +
When you get the following error:
 +
<code>
 +
OBS Web Interface Error:
 +
Error Details:
 +
 +
Errorcode: unknown
 +
Message: <?xml version="1.0" encoding="UTF-8"?> <status code="unknown"> <summary>uncaught exception: Failed to establish connect
 +
</code>
 +
check all the modified OBS configuration files (<tt>.pm</tt> files) for missing semicolons (<tt>;</tt>). The trace should also be visible in <tt>/srv/obs/log/*.log</tt> files.
 +
----
 +
<h2>External Links</h2>
 +
<p>
 +
<ul>
 +
<li>
 +
[http://wiki.maemo.org/OpenSuse_Build_Service/Installation Maemo OBS Installation]
 +
</li>
 +
<li>
 +
[http://wiki.maemo.org/OpenSuse_Build_Service/Fremantle_Setup Maemo Fremantel Setup]
 +
</li>
 +
</ul>
 +
</p>
----
----
[[User:Liam | Liam]]
[[User:Liam | Liam]]
-
dl9pf
+
[[User:Dl9pf | Dl9pf]]
 +
 
 +
[[Category:Build Infrastructure]]

Latest revision as of 09:46, 22 June 2012

Please check http://gitorious.org/opensuse/build-service/blobs/master/dist/README.SETUP
for the latest setup instructions!

These steps show how to setup Open Build Service (OBS) on an openSuSE 11.4 installation. The OBS installation will consist of a main OBS server and an OBS worker. This document describes how to setup an evaluation/test setup and is not meant as production setup.

Most users won't need to install their own OBS and can just use an account on a publicly accessible OBS.

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.

Contents

Add Repositories

First, we have to add the openSUSE:Tools repository to both OBS server and OBS worker:

     # zypper addrepo http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.4/openSUSE:Tools.repo
     # zypper refresh

When zypper asks, accept the trust key.

Setup OBS Server

Install the Server packages

     # zypper install obs-server obs-signd obs-utils createrepo nfs-client obs-api memcached lighttpd lighttpd-mod_magnet qemu

If you installed a minimal openSUSE installation then python packages may conflict with the minimal configuration package patterns-openSUSE-minimal_base. This package can be safely removed if it causes dependency problems.

MySQL Setup

Start daemon by default:

     # chkconfig --add mysql
     # rcmysql start

Secure the installation:

     # /usr/bin/mysql_secure_installation

Create the databases:

    # mysql -u root -p
    mysql> create database api_production;
    mysql> create database webui_production;

Add the obs user for these databases (substitute ********** with your password):

     mysql> GRANT all privileges
            ON api_production.* 
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
     mysql> GRANT all privileges
            ON webui_production.* 
            TO 'obs'@'%', 'obs'@'localhost' IDENTIFIED BY '************';
     mysql> FLUSH PRIVILEGES;
     mysql> quit

Now, configure OBS to use MySQL. First the API server:

     # vi /srv/www/obs/api/config/database.yml
     production:
       adapter: mysql
       database: api_production
       username: obs
       password: ************

And setup the webui to use MySQL:

     # vi /srv/www/obs/webui/config/database.yml
     production:
       adapter: mysql
       database: webui_production
       username: obs
       password: ************

Populate the database:

     # cd /srv/www/obs/api/
     # RAILS_ENV="production"  rake db:setup
     # cd /srv/www/obs/webui/
     # RAILS_ENV="production" rake db:setup

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.

Setup lighttpd for webui

Make sure vhosts are enabled by uncommenting the following line:

      # vi /etc/lighttpd/lighttpd.conf
      include_shell "cat /etc/lighttpd/vhosts.d/*.conf"

The installed /etc/lighttpd/vhosts.d/obs.conf should be usable for this setup but it can be changed later on.

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:

     # vi /etc/lighttpd/modules.conf
   server.modules = (
     "mod_access",
   #  "mod_alias",
   #  "mod_auth",
   #  "mod_evasive",
   #  "mod_redirect",
     "mod_rewrite",
   #  "mod_setenv",
   #  "mod_usertrack",
   )

   ##
   ## mod_magnet
   ##
   include "conf.d/magnet.conf"

   ##
   ## FastCGI (mod_fastcgi)
   ##
   include "conf.d/fastcgi.conf"

You need also to configure /srv/www/obs/webui/config/environments/production.rb to point to correct server names:

     # vi /srv/www/obs/webui/config/environments/production.rb
     FRONTEND_HOST = "192.168.1.1"
     FRONTEND_PORT = 81
     FRONTEND_PROTOCOL = 'http'
     BUGZILLA_HOST = nil
     DOWNLOAD_URL = "http://192.168.1.1:82"
     ICHAIN_MODE = "off"
     BASE_NAMESPACE = nil

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:

     # vi /srv/www/obs/api/config/environments/production.rb
     SOURCE_HOST = "192.168.1.1"

Add the server to start by default.

     # chkconfig --add memcached
     # chkconfig --add lighttpd
     # chkconfig --add obsapidelayed
     # chkconfig --add obswebuidelayed

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

     # chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}

BSConfig.pm

The file /usr/lib/obs/server/BSConfig.pm 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.

      # vi /usr/lib/obs/server/BSConfig.pm
      my $hostname = '192.168.1.1';

The list of directories in /srv/obs/repos/ is the repositories, so I changed the $repodownload:

      # vi /usr/lib/obs/server/BSConfig.pm
      our $repodownload = "http://$hostname:82/";

OBS API custom logger seems to need a small fix to get going:

--- /srv/www/obs/api/lib/custom_logger.rb-orig  2011-08-12 03:12:25.195998605 +0200
+++ /srv/www/obs/api/lib/custom_logger.rb       2011-08-12 03:41:34.277000004 +0200
@@ -4,9 +4,11 @@ class NiceLogger < Logger
 
   def format_message(severity, timestamp, progname, msg)
     out=""
-    while msg[0] == 13 or msg[0] == 10
-      out = out.concat(msg[0])
-      msg = msg[1..-1]
+    if msg.kind_of?(Array)
+      while msg[0] == 13 or msg[0] == 10
+        out = out.concat(msg[0])
+        msg = msg[1..-1]
+      end
     end
    
     out + "[%s|#%5d] %s\n" % [severity[0..0], $$, msg]

Verification

Start the server.

# rcmemcached start
# rclighttpd start
# rcobsapidelayed start
# rcobswebuidelayed start
# rcobsrepserver start
# rcobssrcserver start
# rcobsscheduler start
# rcobsdispatcher start
# rcobspublisher start
# rcobswarden start
# rcobssigner start

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. Admin user should be able to create a new project in the List of All Projects -> Create a new project and filling in a project name, title and description.

Start By Default

The OBS should start automatically, so they should be added to chkconfig to do so:

     # chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner

Setup OBS Worker

Install the Worker Packages

     # zypper install obs-worker

Configure OBS Worker

Edit the file /etc/sysconfig/obs-worker in order to point to correct repository server which is one of the main OBS server services. In this example the server is 192.168.1.1.

     # vi /etc/sysconfig/obs-worker
     OBS_SRC_SERVER="192.168.1.1:5352"
     OBS_REPO_SERVERS="192.168.1.1:5252"

Start OBS Worker

Start the worker service:

     chkconfig --add obsworker
     rcobsworker start

Setting up Cross Compile

Configure build types

To setup cross compile, add the appropriate machine types to /etc/sysconfig/obs-server. For example, the following will enable ARM builds.

      # vi /etc/sysconfig/obs-server
      OBS_SCHEDULER_ARCHITECTURES="i586 armv5el armv7el“

Cloning Repositories

prj and prjconf

The project settings and the project config is an important part of the project and should be copied to the local project setup.

     osc -A <remote API URL> meta prj <repository name> > prj.txt
     osc -A <remote API URL> meta prjconf <repository name> > prjconf.txt

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.

     osc -A <local API URL> meta prj <repository name> -F prj.txt
     osc -A <local API URL> meta prjconf <repository name> -F prjconf.txt

Mirror

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.

/usr/sbin/obs_mirror_project <repository name> <type> <arch>


Rescan Repository

Once the download of the project is complete, you have to rescan the local repository.

/usr/lib/obs/server/bs_admin --rescan-repository <repository name> <type> <arch>

Troubleshooting

Here are common issues that have been seen and how to resolve them.

HTTP Error 500

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.

Cannot load person data for Admin in application_helper

Make sure you set the permissions on the api and webui directories.

     chown -R lighttpd.lighttpd /srv/www/obs/{api,webui}

If this doesn't work then try to recreate the databases:

     # mysql -u root -p
     mysql> drop database api_production;
     mysql> drop database webui_production;

Rerun the mysql database setup from above and re-run rake.

404 while trying to see the package repository

Check, if the /srv/obs/repos directory is owned by obsrun.obsrun - if not, chown it. Failing to do so will prevent publisher from publishing your repositories in repository directory, and when you try accessing them you will get the 404.

OBS Web Interface Error:

When you get the following error:

OBS Web Interface Error:
Error Details:

Errorcode: unknown
Message: <?xml version="1.0" encoding="UTF-8"?> <status code="unknown"> <summary>uncaught exception: Failed to establish connect

check all the modified OBS configuration files (.pm files) for missing semicolons (;). The trace should also be visible in /srv/obs/log/*.log files.


External Links


Liam

Dl9pf

Personal tools