openSUSE:OBS Light Appliances

Jump to: navigation, search


OBS Light client appliance

This is an openSUSE appliance with pre-installed OBS Light client.

Official version

http://susestudio.com/a/e0uuBG/obs-light-obs-client

Devel version

http://susestudio.com/a/e0uuBG/obs-light-obs-client-devel


Software included

Recommendations

  • Give the appliance at least 512MB of memory.
  • If you are using an OBS server appliance, insert an entry which points to its IP address in the file /etc/host of your client appliance. It will simplify the configuration of OBS Light, and will prevent some errors.

Network ports

Port Description
83 MIC generated images repositories
84 Live repositories, where packages locally built by obslight are published
8000 Fakeobs web UI (if obslight-fakeobs is installed)
8001 Fakeobs API (if obslight-fakeobs is installed)
8002 Fakeobs repositories (if obslight-fakeobs is installed)

OBS Light server appliance

While running an OBS Light client appliance is simple and easy and just requires 1GB of RAM allocated to the virtual machine, running an OBS server appliance can be much more demanding. But running the OBS server server appliance on your desktop or laptop (a minimum 4GB of RAM is mandatory) via a virtual machine can be very handy during evaluation tests.

The main advantage is that you do not need a special authorisation from your IT department to start playing but you need to allocate at least 2GB to the appliance and as many CPU cores that you can spare. You need to patch on the OBS server appliance (need to be root) the file /etc/sysconfig/obs-worker to set the variable OBS_WORKER_INSTANCES to 1 (default is zero) to limit the RAM resources required by your appliance during build process. If you plan to build large packages such as Chromium you will need more than 2GB of RAM allocated (actually on my desktop I have 16GB).

You can overcome that limit with the addition of an obsworker appliance on a separate server. OBS Light project provides one pre-configured to work with and OBS Light server appliance.

If you use the Bridge mode, external OBS worker appliance will be detected and used automatically (NAT more would require a complex configuration). The Worker can be running on a more powerful unit and speed the preparation work before for example leaving the office with a complete fully built project on a laptop. You can stop the worker on the laptop by the command rcobsworker stop (need to be root). You can check that your OBS Worker appliance can see your OBS Light Server Appliance with the command slptool findsrvs obs.source_server.

As a general rule using the bridge mode is advisable. Note this is not the default option of VirtualBox. The NAT mode is interesting to run an OBS Light server via a VPN or for unconnected demos. In that case you will need to declare NAT rules in your Virtual Machine Manager redirecting the ports 443, 444 and 82 from your local host to your OBS appliance internal NAT address (with VitualBox under Linux rerouting port bellow 1000 is reserved for root only).

Do not forget to add a host name "obslightserver" in your workstation pointing to the OBS Light server appliance IP address or localhost in the case of a NAT configuration.

Stable

You can download the appliance on SUSE Studio:

http://susestudio.com/a/e0uuBG/obs-obslight-obs-server

Software included

Devel

You can download the appliance on SUSE Studio:

http://susestudio.com/a/e0uuBG/obs-obs-server-opensuse-12-1-devel

Software included

Recommendations

  • Give it at least 2GB of memory.
  • If running in a virtual machine, set network in bridge mode.
  • If you have to use a proxy, the system-wide configuration file is /etc/sysconfig/proxy. Please add "obslightserver" at the beginning of the no_proxy variable. Some users reported that this variable name should be written in lower-case, even if it's upper-case in the template. Our advice is to write it upper and lower case. You also have to tweak $proxy and $noproxy in /usr/lib/obs/server/BSConfig.pm. Then don't forget to reboot.

Network ports

Port Description
80 Simple web page giving you some information about the configuration
82 Live repositories, where packages built by OBS are published
83 MIC generated images repositories
84 Live repositories, where packages locally built by obslight are published
443 OBS web UI
444 OBS API
8000 Fakeobs web UI
8001 Fakeobs API
8002 Fakeobs repositories

How to add swap?

To make your swap in a file, connect as root, and run:

# Swap size in kilobytes
SWAPSIZE=524288
# Location of swap file
SWAPFILE=/swapfile

dd if=/dev/zero of=$SWAPFILE bs=1k count=$SWAPSIZE
chmod 600 $SWAPFILE
mkswap -f $SWAPFILE $SWAPSIZE
swapon -v $SWAPFILE

If you want it to persist after reboot, add the following to /etc/fstab:

/swapfile swap swap defaults 0 0

How to make builds faster: build in RAM

If you have enough RAM (more than 1.5GB per worker), it's a good idea to move your worker cache to a RAM disk. In our OBS appliance, each worker places its cache in /var/cache/obs/worker/root_N (N being the id of the worker). Our advise is to mount a tmpfs filesystem at /var/cache/obs/worker, and add an equivalent amount of swap.

To mount a 16GB tmpfs filesystem at /var/cache/obs/worker, just add the following line in your server's /etc/fstab and reboot:

tmpfs   /var/cache/obs/worker tmpfs defaults,size=16g 0 0

Note that big packages like Tizen's webkit-engine can take up to 14GB of disk space when building, so you shouldn't attribute less than 15GB to your RAM disk.

Run it on the cloud

To be included: OBS on EC2