FOSSAsia 2018

OBS workshop - step by step

VirtualBox

Fetch Debian Stretch VDI.gz

$ wget --trust-server-names http://deb.li/dJR4
Down arrow
Uncompress and check MD5
$ wget --trust-server-names http://deb.li/31unD
$ gzip -d OBS_workshop_Debian_stretch.vdi.gz
$ md5sum -c OBS_workshop_Debian_stretch.vdi.md5
						

Add a new Debian instance in VirtualBox,
boot the verified VDI file.
Setup networking to bridge mode

Login

  • user: obs
  • pass: obsworkshop

After booting image install

$ sudo apt install obs-server obs-api obs-worker 

When asked introduce a password of your choice for database, i.e. opensuse
Read /usr/share/doc/obs-api/README.Debian

Configuration

  • OSC - open build service command-line tool
  • OBS worker
  • OBS Download on demand setup (DoD)
  • OBS project

OSC - open build service command-line tool

$ osc -A https://fossasia2018 ls
Username: Admin
Password: opensuse
					  

OBS worker

Let's fetch obs-build from backports repositories

$ echo "deb http://deb.debian.org/debian/ stretch-backports main" | \
  sudo tee -a /etc/apt/sources.list.d/bpo.list
$ sudo apt update
$ sudo apt install obs-build=20180302-2~bpo9+1
$ sudo editor /etc/default/obsworker
					  

Set ENABLED=1 and OBS_RUN_DIR="/srv/run/obs"

$ echo "127.0.0.1 obs" | sudo tee -a /etc/hosts
$ sudo systemctl restart obsworker
					  

OBS Download on demand setup (DoD)

$ osc meta prj Debian:Sid:main -e
$ osc meta prj Debian:Stretch:main -e

$ wget --trust-server-names http://deb.li/3p8vj
$ osc meta prjconf Debian:Sid:main -F unstable.conf
$ osc meta prjconf Debian:Stretch:main -F unstable.conf

$ wget --trust-server-names http://deb.li/ijx7R
$ osc meta prj Debian:Sid:main -F sid_dod.conf

$ wget --trust-server-names http://deb.li/xJJd
$ osc meta prj Debian:Stretch:main -F stretch_dod.conf
					  

OBS project

$ osc meta prj myproject -e

$ wget --trust-server-names http://deb.li/3lMpV
$ osc meta prjconf myproject -F myprjconf.conf

$ wget --trust-server-names http://deb.li/98a1
$ osc meta prj myproject -F myprj.conf
					  

Upload hello package

$ sudo apt install osc-plugins-dput=20180227.0~bpo9+1
$ sudo apt install osc-plugins-dput
$ apt source hello
$ osc dput myproject hello_2.10-1+deb9u1.dsc

Check for IP address, i.e.

$ ip a
Open a browser in your host pointing to https://VBOX_IP/
Remember login is Admin with opensuse as password.