Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

6 Setting Up a Local OBS Instance

This chapter explains how you could setup/Install/test OBS in your system. This chapter is written for those who are not so familiar with Linux and OBS. So in case you are confident to set up OBS, skip this chapter. Following would be explained in this chapter.

  • OBS 1 click install, then manual setup in openSUSE 13.1;

  • OBS 1 click install, then manual setup in SLES11;

  • OBS test run on Microsoft Windows using VMware player;

  • OBS appliance installed manually in a VirtualBox.

Unfortunately, didn't have a chance to install OBS in other Linux distribution yet. The last section will explain your first steps with the new OBS server.

How you could install and purchase openSUSE 13.1 and SLES12 will not be explained in this chapter. VMware player install and purchase also will not be explained. For these topics, you could visit for help:

6.1 Testing OBS on Microsoft Windows Using VMware Player

Those who are not familiar with Linux can run and test OBS. To run and test OBS in Windows, you could use a virtual machine program such as VMware or VirtualBox, etc. This chapter explains, how you can run OBS using VMware player. To check and test with VirtualBox or another virtual machine, check in below.

After you are done installing VMware player on Windows, you need to download the OBS appliance program. You could get OBS appliance file by visiting http://openbuildservice.org/download/other/ and clicking on VirtualBox/VMware Image. After downloading, uncompress with some Windows archiving program that understands the .tar.bz2 file format.

Now, open VMware Player application and select File › Open a Virtual Machine, or you could press CtrlO directly. Open the decompressed virtual machine in Open Virtual Machine dialog box. Click on Play virtual machine icon or hyper link in VMware player.

At the Linux prompt, you can login using "root" as a login name and "opensuse" as a password. Now, OBS local instance should be already loaded and running in your system. To make sure that the OBS Web UI is successfully up and running, open the OBS Web UI.

To access OBS Web user interface, open your web browser and try the address http://vm.ip.address. You can check the virtual machine's IP address by using ifconfig Linux command. Now, you probably could see a screen like the one below in your window:

To login your local OBS instance, you could use default login name as "Admin" and password as "opensuse". Check if you could login properly by clicking Login on your local OBS instance Web UI.

6.2 Installing a Readymade OBS Appliance in a VirtualBox

This method is slightly less easy than the method using the readymade vmdk VMware disk, but it enables you to determine the size of your virtual disks to your convenience. It could also work with a real computer with two disks. It requires some knowledge of command line and partitioning.

  1. Download the OBS appliance installer. Visit: http://www.openbuildservice.org/download (http://www.openbuildservice.org/download) and press the Download the OBS Appliance Installer button. It will start downloading an ISO image.

  2. In VirtualBox, create a virtual machine with:

    • 4 GB memory

    • 1 virtual hard disk of 20 G for / and /var/cache/obs

    • 1 virtual hard disk of 50 G for /srv/obs

    • a virtual CD-ROM driver pointing to the downloaded ISO image

    • network bridging with real Ethernet card

  3. Boot the virtual machine and choose to install the OBS server on the smaller virtual hard disk.

  4. Log into the virtual machine with Login: root and Password: opensuse. If needed, switch to German/French/whatever keyboard: # loadkeys de. Inspect partitioning: # df -h. It shows you that the root partition is small and already almost full (1.6 GB used out of 1.8). Let's prepare the other partitions to get a bit more working space. First, # fdisk /dev/sda and prepare /dev/sda2 to use the remaining space. Second, # fdisk /dev/sdb and prepare /dev/sdb1 to use all the space, with type 8e (Linux LVM):

     # pvcreate /dev/sdb1
     # vgcreate OBS /dev/sdb1
     # lvcreate -n server -L 48G OBS
     # mkfs.ext4 /dev/OBS/server
  5. Reboot, this time onto the hard disk. The CD-ROM might be disconnected, we will not need it anymore. Log in as root user, change keyboard if needed, and format /dev/sda2: # mkfs.ext4 /dev/sda2. Add following entry to /etc/fstab:

    /dev/sda2  /var/cache/obs  ext4  defaults  2 1

    Mount the new partition: # mount /dev/sda2. Get your IP address: # ifconfig.

6.3 First Steps with Your New OBS Server

At this point, one of the methods above should have provided you with a running OBS instance. Let us get our first package building.

  1. From a web browser, access the web interface: https://vm.ip.address/. Accept the self-signed certificate.

  2. In the top right corner of the web interface, there is a Log In option. Use it to log in as: Admin opensuse.

  3. Click on the Configuration button to give your server a name and a description. Click on the Interconnect option. Choose openSUSE as the remote repository where we will pick up the packages of the build environment. Log out of the web interface.

  4. Use Sign Up option to create a regular user account (for example: hmustermann).

  5. As this normal user, click on the Home Project option and create your home project (that would be: "home:hmustermann").

  6. Go to this home project, and click on Create package to create your first package (let's say: "mypackage").

  7. Go back to your home project, and click the Repositories button. Choose to add a new repository and pick openSUSE 13.1 (for example).

  8. Reboot the virtual machine to ensure all projects are rescanned.

  9. From outside the virtual machine and as a normal user, declare in ~/.oscrc your new OBS user:

    [https://vm.ip.address]
    user=hmustermann
    pass=bond007

    then checkout your new package: $ osc -A https://vm.ip.address co home:hmustermann. go to your first package: $ cd home:hmustermann/mypackage. and add some sources there (tarball, spec file, changelog, patches). Check them in, then trigger a remote build:

    $ osc add *
    $ osc commit
    $ osc rebuild
  10. The built packages can be seen at: http://vm.ip.address:82/

Print this page