Debian Server Setup - nicholasdavidson/pybit GitHub Wiki

dbconfig-common

The Debian packaging of pybit-web uses dbconfig-common to configure the database.

For a local postgres instance, choose the unix socket option and the default ident authentication, then postgres as the database administrative user and www-data as the pybit-web database user. You can use whatever name you prefer for the pybit-web database itself.

populating the tables

Each section of the main pybit homepage will need some data entry, matched to the requirements of your toolkit.

Example basic SQL:

INSERT INTO distribution(name) VALUES ('Debian');

INSERT INTO format(name) VALUES ('deb');

INSERT INTO status(name) VALUES
	('Waiting'),
	('Blocked'),
	('Cancelled'),
	('Building'),
	('Failed'),
	('Uploaded'),
	('Done');

These common settings are part of the Debian default installation as of pybit >= 0.5.0.

Apache configuration

pybit-web includes an example Apache configuration - it may not suit everyone but it can get you started with a pybit-web interface on port 80 of the localhost apache2 instance. As root:

# cd /etc/apache2/sites-available/
# ln -s /usr/share/pybit-web/apache_config.txt pybit.conf
# a2dissite 000-default
# a2ensite pybit
# apache2ctl restart

Admin access

Now change the admin access details in /etc/pybit/web/web.conf which allows users to configure pybit, including supported architectures, suites etc.

Architectures and suites

Specific settings will include architectures, suites and the weight of a particular architecture for a particular suite which indicates which architecture should take the load of Architecture: all packages and Build-Depends-Indep: target packages.

The combination of architectures and suites needs to match the available matrix of clients.

buildboxes

Currently, clients are not able to insert their own identity into the database, only to update their status once created. So this needs to be added. Debconf asks for the name of the client but the string to be added to the database is the name of the private queue which can be identified from:

# tail /var/log/pybitclient.log

e.g. Creating private command queue with name:build_client_sylvester

The database string should then be build_client_sylvester

This will change once https://github.com/nicholasdavidson/pybit/issues/127 is fixed.

Automation of client registration is awaiting a secure implementation of the server->client communication.

Clients

Always restart the web server providing the web frontend when the pybit-web package is upgraded, e.g.:

sudo apache2ctl restart

Always restart all clients when the server (pybit-web package) is upgraded.

sudo invoke-rc.d pybit-client restart
⚠️ **GitHub.com Fallback** ⚠️