Skip to content

OBS Appliance

Saray Cabrera Padrón edited this page Jun 20, 2022 · 7 revisions

We are building an OBS appliance so you can run OBS on a couple of platforms. They are the most prominent way people install OBS.

Among the images we build are Hybrid ISOs and images for VMware, VirtualBox, etc. Our appliances are based on openSUSE LEAP 15.1. You can find more information about them on our website.

All these images are built and configured via KIWI. We have one main OBS-Appliance and a couple of OBS-Appliance-* packages that are branched from OBS-Appliance. Each package branch has a slightly adjusted configuration to build the different image types.

That way we keep the differences between our OBS Appliances minimal and also ensure that changes are applied to appliances.

Running the appliance locally with virt-manager

Installation of virt-manager

We will use virt-manager to run the downloaded image. Make sure you have libvirt and virt-manager installed. Make sure the libvirtd.service is up and running. On a machine with openSUSE Tumbleweed you should:

  1. sudo zypper install libvirt virt-manager
  2. sudo systemctl enable libvirtd --now

Make sure your user is part of the libvirt group, otherwise virt-manager needs to be started with root rights, which is usually not a good idea. You can do the following to achieve this:

  1. Check for the existence of the libvirt group -> sudo getent group | grep libvirt
  2. Incase it does not exist -> sudo groupadd --system libvirt
  3. Now add your user to the group -> sudo usermod -a -G libvirt $(whoami)
  4. Restart the libvirtd.service -> sudo systemctl restart libvirtd.service

Download the image you want to test

  1. Navigate to the download subdirectory. It should be one of these:
  2. Download the .qcow2 image:
    • e.g.: curl -s http://download.opensuse.org/repositories/OBS:/Server:/2.10:/Staging/images/obs-server.x86_64-2.10.11-qcow2-Build1.17.qcow2

Import the image with virt-manager

  1. Open virt-manager in your console:
    • virt-manager
  2. Import the image:
    1. Click File | New Virtual Machine | Import existing disk image | Browse Local | Browse.
    2. Select the .qcow2 file you have downloaded.
    3. Choose the operating system: openSUSE Unknown, and click Forward.
    4. In "Memory and CPU settings" stay with the defaults and click Forward.
    5. Click Finish.

You should see a new window with a text console booting a system. It takes a while until you finally see the last output welcoming you to Open Build Services (OBS) Appliance.

Running the appliance locally with VirtualBox

  1. Install VirtualBox
  2. Navigate to the download subdirectory. It should be one of these:
  3. Download the .vdi image.
  4. Run the image in VirtualBox.
  5. Enable Virtual Network as Bridged Adapter.

Enabling ssh access

In order to make it easier to access the virtual machine (whichever you chose), we will enable its ssh daemon.

  1. In the terminal open inside the virtual machine, log in as root with de default password provided in the appliance:
    • Login: root
    • Password: opensuse
  2. Enable the sshd service:
    • systemctl enable sshd --now
  3. Retrieve the ip of your virtual machine:
    • ip a | grep inet | grep eth0
  4. Try to enter the virtual machine from your local machine:
    • ssh root@IP_VIRTUAL_MACHINE

Once you access via SSH, you can find the Rails project in /srv/www/obs/api.

Test the appliance via WebUI.

Inside the Virtual Machine, you can run any command, access the code (/srv/www/obs/api/), run tests, etc. However, if you need to test the WebUI, you can do it from the outside.

  1. Open the browser on your machine (outside the Virtual Machine).
  2. The output suggests accessing the WebUI via https://localhost, to do so, use the Virtual Machine IP instead.

It can take a few seconds to respond for the first time.

Clone this wiki locally