Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Installation

Timotheus Pokorra edited this page Aug 1, 2021 · 39 revisions

Goal

In the end, we want to build LightBuildServer packages for Ubuntu and for Fedora, so that the server can easily be installed: the server builds itself, so to speak :)

Current situation

We only support Ubuntu 20.04 as host for the build containers at the moment. More Linux distributions might follow if there is enough interest.

For the control server, there is now an UWSGI based setup for Fedora 27. If there are volunteers, feel free to contribute packages for other distributions as well!

Ubuntu 20.04 as host of the build containers

Add the repository for the lxd scripts that are needed for configuring the containers:

echo 'deb [arch=amd64] https://lbs.solidcharity.com/repos/tpokorra/lbs/ubuntu/focal focal main' >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x4796B710919684AC

Now install:

apt-get update
# choose lxd 4
apt-get install lxd lxd-client lxc-utils cgroup-lite python3-lxc bsdmainutils cron patch debootstrap lxd-scripts
cd ~; ln -s /usr/share/lxd-scripts scripts
/usr/share/lxd-scripts/initLXD.sh
/usr/share/lxd-scripts/initIPTables.sh
# to redirect traffic for ssh, from external port 2005 to local container with id 005
/usr/share/lxd-scripts/tunnelport.sh 5 22

Fedora 27: install the control server

dnf install 'dnf-command(config-manager)'
dnf config-manager --add-repo https://download.solidcharity.com/repos/tpokorra/lbs/fedora/27/lbs-tpokorra-lbs.repo
dnf install lightbuildserver
# when asked for a password, leave it empty! this key will be used to connect to the hosts for the build containers
/usr/share/lightbuildserver/init.sh
mysql
    CREATE DATABASE lbs  DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
    GRANT ALL ON lbs.* TO lbs@localhost IDENTIFIED BY 'TODOsecret';

At the moment, the website will only run on http://localhost. Please insert the hostname in /etc/nginx/conf.d/lightbuildserver.conf

Upload the public key to the container:

container="build02.lbs.solidcharity.com"
echo "put /etc/lightbuildserver/container/container_rsa.pub" | sftp root@$container
ssh root@$container -C "mkdir -p .ssh; chmod 700 .ssh; echo >> .ssh/authorized_keys; chmod 700 ssh/authorized_keys; cat container_rsa.pub >> .ssh/authorized_keys; rm container_rsa.pub; passwd -d root"

Getting started

See config files for details how you can configure your LightBuildServer!

See Project and Package Layout how you can define how packages should be built!

Clone this wiki locally