Mailinglist Archive: opensuse-buildservice (332 mails)

< Previous Next >
Re: [opensuse-buildservice] issue with BS from scratch
  • From: "Hans-Peter Jansen" <hpj@xxxxxxxxx>
  • Date: Thu, 22 Jul 2010 23:06:13 +0200
  • Message-id: <201007222306.13352.hpj@xxxxxxxxx>
Dear Adrian,

thanks for listening.

I really hate to bother you with such sillyness, but getting my own BS
running outweighs my reservations ATM.. ;-)

On Thursday 22 July 2010, 17:24:31 Adrian Schröter wrote:
On Thursday 22 July 2010 16:52:18 Hans-Peter Jansen wrote:

# netstat -anp | grep ':5252'
#

Digging deeper: cat /srv/obs/log/rep_server.log

2010-07-22 15:08:43: AJAX: bs_repserver started
2010-07-22 15:08:43: bs_repserver started on port 6262

Ahh, it's listening on 6262 now. Fixing /etc/sysconfig/obs-worker...

that is a non default port

Hrmpf. Although I reinstalled everything, I've got a dangling
obs-server-1.0.0-4.4 package hanging around (that had this default).
It didn't got replaced, because of a zypper lock on createrepo (because 0.9
had some issues, that I only remember vagely) :-(. My fault. Fixed it up.

These pkgs are running now:
obs-api-2.0.4-3.1
obs-common-2.0.1-1.1
obs-server-2.0.4-3.1
obs-utils-2.0.4-3.1
obs-worker-2.0.4-3.1

[...]

you try to connect to the webui with osc, not to the api.

use something like

http://$server:81

as apiurl

Please find a respective documentation fix attached.

The curl command now responds with:
<?xml version="1.0" encoding="UTF-8"?>
<status code="ok">
<summary>Ok</summary>
<details></details>
</status>

which looks sane.

Unfortunately, I'm still stuck in 6. While the apisrv instruction seems
deprecated now, it fails with and without it in the same way:

osc -A http://localhost:81 meta prj openSUSE:Tools -e
# it loads the openSUSE:Tools project file correctly, I just moved one
repository section above the
<!-- remove this comment to enable one or more build targets
line, and wrote it, harvesting:

Sending meta data...
BuildService API error: project_save_error (400)
error saving project: unable to walk on path 'openSUSE:11.1/standard'
Try again? ([y/N]):

Tracing shows, that it tries to access some path in the api hierarchy:
28085 stat64("/srv/www/obs/api/public/source/openSUSE:Tools/_meta",
0xbff24d78) = -1 ENOENT (No such file or directory)
28085 stat64("/srv/www/obs/api/public/source/openSUSE:Tools/_meta.html",
0xbff24d78) = -1 ENOENT (No such file or direct

that do not exist before responding, but that's all.

I was able to hunt it down to:

def find_by_project_and_repo_name( project, repo )

in api/app/models/repository.rb, but my ability to decipher ruby ended
there. Sorry.

Pete
--- dist/README.SETUP.orig 2010-07-22 16:04:56.402325817 +0200
+++ dist/README.SETUP 2010-07-22 22:36:20.345671248 +0200
@@ -149,20 +149,21 @@ password = foobar
3.2 Setup and configure lighttpd for the api and webui
======================================================

-Now we need the webserver configuration of the api (and webui).
-A default configuration for accessing via
-http://127.0.42.1 and http://127.0.42.2 gets automatically installed
-into /etc/lighttpd/vhosts.d/obs.conf
+Now we need to configure the webserver. By default, you can reach the
+familiar web user interface on port 80 (e.g: http://localhost), the api
+on port 81 (e.g. http://localhost:81), and the repos on port 82 (once
+some packages are built).

-If you need other hostnames, edit the file /etc/lighttpd/vhosts.d/obs.conf:
+If you need to change the default hostnames and/or ports, edit the file
+/etc/lighttpd/vhosts.d/obs.conf E.g.:

$HTTP["host"] =~ "buildserver.my.domain.example.org" {
...
}


-To enable these vhosts, make sure to uncomment the following in the
-'custom includes' section at the bottom of
+Nevertheless, make sure to uncomment the following lines in
+the 'custom includes' section at the bottom of
/etc/lighttpd/lighttpd.conf:


@@ -204,9 +205,9 @@ enabled by uncommenting the correspondin
3.2.1 Change /srv/www/obs/webui/config/environments/production.rb
===========================================================================

-If you changed the hostnames/ips of the api away from 127.0.42.x, you
-need to configure also
-/srv/www/obs/webui/config/environments/production.rb (2 entries).
+If you change the hostnames/ips of the api, you need to adjust
+FRONTEND_HOST, FRONTEND_PORT and DOWNLOAD_URL accordingly in
+/srv/www/obs/webui/config/environments/production.rb


3.2.2 Change /srv/www/obs/api/config/environments/production.rb
@@ -243,7 +244,7 @@ the following command:

# curl -0 --user "Admin:opensuse" -X PUT \
-T /usr/share/doc/packages/obs-api/openSUSE.org.xml \
- http://127.0.42.2/source/openSUSE.org/_meta
+ http://localhost:81/source/openSUSE.org/_meta


4.2 import base distributions into the backend
@@ -275,25 +276,14 @@ the following steps:

By default you can access the api using any browser with the URL

- http://127.0.42.2
+ http://localhost:81

The web interface is accessible via

- http://127.0.42.1
+ http://localhost

The default user is "Admin" with the password "opensuse".

-5.1 Changing the default URLs
-=============================
-
-To change the default URLs of the api, configure the lighttpd vhosts
-accordingly. Edit '/etc/lighttpd/vhosts.d/obs.conf' and add the new virtual
-hostnames.
-
-Then change the FRONTEND_HOST variable in
-/srv/www/obs/webui/config/environments/production.rb
-to also point to the new api URL.
-
6. Using osc with your local build service:
===========================================

@@ -317,10 +307,10 @@ your ~/.oscrc to something like this:
#apisrv = https://api.opensuse.org

# our local build service api:
-apisrv = http://127.0.42.2
+apisrv = http://localhost:81

# local default admin account
-[http://127.0.42.2]
+[http://localhost:81]
user = Admin
pass = opensuse

@@ -341,19 +331,19 @@ following commands offer you a template
file. In the self- explanatory xml, only enable the 10.2 distro on
i586:

- osc -A http://127.0.42.2 meta prj openSUSE:Tools -e
+ osc -A http://localhost:81 meta prj openSUSE:Tools -e

-check whether that worked on http://127.0.42.1/project/list_all
+check whether that worked on http://localhost/project/list_all

- osc -A http://127.0.42.2 meta pkg openSUSE:Tools obs-server -e
+ osc -A http://localhost:81 meta pkg openSUSE:Tools obs-server -e

check whether that worked on
-http://127.0.42.1/project/show?project=openSUSE%3ATools
+http://localhost/project/show?project=openSUSE%3ATools

Now prepare for a check-in. This will do a checkout and locally build
using the packages from your local buildserver:

- OSCOPT="-A http://127.0.42.2"; ./distribute
+ OSCOPT="-A http://localhost:81"; ./distribute

now do a check-in into the build server:

@@ -364,7 +354,7 @@ now do a check-in into the build server:
The rebuild will automatically be triggered. Monitor the build status
here:

- http://127.0.42.1/project/monitor?project=openSUSE%3ATools
+ http://localhost/project/monitor?project=openSUSE%3ATools

6.2. Run and Stop the Service
=============================
@@ -406,7 +396,7 @@ at boot.

The following service are optional:
* obswarden
- It checks if build hosts are dieing and cleans up hanging builds
+ It checks if build hosts are dying and cleans up hanging builds
* obssigner
It is used to sign packages via the obs-sign daemon. You need to configure
it in BSConfig.pm before you can use it.
@@ -434,8 +424,8 @@ opensuse-buildservice@xxxxxxxxxxxx
=====================

* OBS in the production mode uses memcached optionally.
- You can install and enable it as a aservice:
- # zypper in memchached
+ You can install and enable it as a service:
+ # zypper in memcached
# rcmemcached start

* logs are located in various directories.
< Previous Next >
Follow Ups