Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
APK Foundry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Rees
APK Foundry
Commits
6f4643e9
Commit
6f4643e9
authored
6 years ago
by
Max Rees
Browse files
Options
Downloads
Patches
Plain Diff
More documentation
parent
cd8efb02
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+0
-75
0 additions, 75 deletions
README.md
README.rst
+65
-0
65 additions, 0 deletions
README.rst
doc/quickstart.rst
+46
-0
46 additions, 0 deletions
doc/quickstart.rst
doc/webhook.rst
+17
-0
17 additions, 0 deletions
doc/webhook.rst
with
128 additions
and
75 deletions
README.md
deleted
100644 → 0
+
0
−
75
View file @
cd8efb02
# abuildd
an Alpine archive management software replacement
## synopsis
`abuildd`
contains multiple components that replaces the entire Alpine archive management
software. These are:
*
`abuildd-build`
: runs a build and stages artifacts to a designated location
*
`abuildd-agentd`
: runs as an agent and consumes MQTT messages for build requests
*
`abuildd-collect`
: retrieves artifacts from a build server for a specific build
*
`abuildd-compose`
: gathers all collected artifacts and composes a repository or
distribution
*
`abuildd-enqueue`
: enqueues new packages for building with dependency resolution
*
`abuildd-git-hook`
: runs
`abuild-enqueue`
as necessary when new git commits are
received
*
`abuildd-monitord`
: a monitoring daemon which watches the MQTT server for feedback from
the build servers
*
`abuildd.webhook`
: a webhook implementation which enqueues new packages based on
changeset notifications
*
`abuildd.status`
: an
`aiohttp.web`
application which shows current status of the
build servers, also includes
`abuildd.webhook`
`abuildd`
depends on a preconfigured postgresql database and mqtt server, you can use any
mqtt server you wish for the task (mosquitto, rabbitmq, etc.). It also depends on bubblewrap
being installed for sandboxing the build.
## PPAs
`abuildd`
can be configured to build PPAs, as well as official repos. See the
`abuildd-git-hook`
documentation for more details. Alternatively, a Github webhook can be found in the
`abuildd.webhook`
module. The webhook module requires gunicorn and aiohttp.
## Webhook
Still a work in progress - mostly finished but needs an installer. To set it up and play
with it, here's a quick and dirty rundown:
```
# mkdir /etc/abuildd
# cp conf/*.ini /etc/abuildd
# $EDITOR /etc/abuildd/*.ini
$ echo 'CREATE DATABASE abuildd;' | psql -U postgres
$ psql -U postgres -d abuildd -f abuildd/abuildd.sql
$ virtualenv /path/to/new/venv
$ source /path/to/new/venv/bin/activate
(venv) $ pip install hbmqtt aiohttp asyncpg pyirc
(venv) $ export PYTHONPATH="$(pwd):/path/to/py3-abuild:$PYTHONPATH"
```
Then create a bare git clone for each project you want to support. A project's name is
simply its git URL with slashes replaced by full stops, e.g.
`code.foxkit.us.sroracle.packages.git`
.
```
(venv) $ git clone --bare https://git/clone/url.git git.clone.url.git
(venv) $ /path/to/webhook.py
```
The webhook can be added to a GitLab project by going to Settings > Web Hooks. Currently,
"Push Events", "Comments" (on merge requests; "notes" internally), and "Merge Request
Events" are supported.
This diff is collapsed.
Click to expand it.
README.rst
0 → 100644
+
65
−
0
View file @
6f4643e9
README for abuildd
==================
an Alpine archive management software replacement
:Authors:
* **William Pitcock**, original developer
* **Max Rees**, maintainer
:Status:
Alpha
:Copyright:
© 2017-2018 William Pitcock and Max Rees. MIT open source licence.
Synopsis
--------
``abuildd`` contains multiple components that replaces the entire Alpine
archive management software. These are:
* ``abuildd-build``: runs a build and stages artifacts to a
designated location
* ``abuildd-agentd``: runs as an agent and consumes MQTT messages for
build requests
* ``abuildd-collect``: retrieves artifacts from a build server for a
specific build
* ``abuildd-compose``: gathers all collected artifacts and composes a
repository or distribution
* ``abuildd-enqueue``: enqueues new packages for building with
dependency resolution
* ``abuildd-git-hook``: runs ``abuild-enqueue`` as necessary when new git
commits are received
* ``abuildd-monitord``: a monitoring daemon which watches the MQTT server
for feedback from the build servers
* ``abuildd-webhook``: a webhook implementation which enqueues new
packages based on changeset notifications
* ``abuildd-status``: an ``aiohttp.web`` application which shows the
current status of the build servers, also includes ``abuildd-webhook``
Dependencies
------------
``abuildd`` depends on a preconfigured PostgreSQL database and mqtt server, you
can use any mqtt server you wish for the task (mosquitto, rabbitmq, etc.). It
also depends on bubblewrap being installed for sandboxing the build.
Base set
* Python 3.6+
* PostgreSQL server
* MQTT broker
* `hbmqtt <https://hbmqtt.readthedocs.io/en/latest/>`_
* `asyncpg <https://magicstack.github.io/asyncpg/current/>`_
* `py3-abuild <https://code.foxkit.us/sroracle/py3-abuild>`_
``abuildd-webhook``, ``abuildd-status``
* `aiohttp <https://aiohttp.readthedocs.io/en/stable/>`_
``abuildd-agentd``
* `bubblewrap <https://github.com/projectatomic/bubblewrap>`
PPAs
----
``abuildd`` can be configured to build PPAs, as well as official repos. See
the ``abuildd-git-hook`` documentation for more details. Alternatively, a
GitLab webhook can be found in the ``abuildd.webhook`` module.
This diff is collapsed.
Click to expand it.
doc/quickstart.rst
0 → 100644
+
46
−
0
View file @
6f4643e9
Getting started with abuildd
============================
abuildd configuration
---------------------
The files in the ``conf/`` directory are example configuration files for use
with abuildd. The ``INI`` files are copied to ``/etc/abuildd`` and changed as
appropriate. The names of the files and the distribution of content between
them is completely arbitrary and can be customized as you wish - the
configuration manager globs for ``/etc/abuildd/*.ini`` and reads them in sorted
order. Each configuration option is documented within the example configuration
files, along with their defaults. Configuration options are referred to as
``<section name>.<option name>``, for example ``irc.mqtt`` for the ``mqtt``
option in the ``[irc]`` section. Comments start with a semicolon (``;``) and
are not allowed on the same line as assignments. Assignments can span multiple
lines as long as the additional lines after the assignment are indented. Blank
lines are included in the assignments, and so assignments continue until the
next comment or assignment.
The ``conf/mosquitto-acl`` file is an example access control list file for use
with the `mosquitto(8) <https://mosquitto.org/>` MQTT broker. See the
``doc/mosquitto.rst`` file for more information.
.. code-block:: console
# mkdir /etc/abuildd
# cp conf/*.ini /etc/abuildd
# $EDITOR /etc/abuildd/*.ini
MQTT configuration
------------------
See the ``doc/mqtt.rst`` file.
.. code-block:: console
# $EDITOR $(grep -l '^;mqtt =' conf/*.ini)
Database configuration
----------------------
.. code-block:: console
$ echo 'CREATE DATABASE abuildd;' | psql -U postgres
$ psql -U postgres -d abuildd -f abuildd.sql
# $EDITOR /etc/abuildd/database.ini
This diff is collapsed.
Click to expand it.
doc/webhook.rst
0 → 100644
+
17
−
0
View file @
6f4643e9
Setting up the webhook for use with GitLab
==========================================
Create a bare git clone for each GitLab project you would like to receive build
requests from. The name of the clone should be the clone URI with slashes
replaced with full stops. Then the webhook should be run from the directory
that contains the clones. For example:
.. code-block:: console
$ git clone --bare https://code.foxkit.us/sroracle/packages.git code.foxkit.us.sroracle.packages.git
$ git clone --bare https://code.foxkit.us/adelie/packages.git code.foxkit.us.adelie.packages.git
$ /path/to/webhook.py
The webhook can be added to a GitLab project by going to Settings > Web Hooks.
Currently, "Push Events", "Comments" (on merge requests; "notes" internally),
and "Merge Request Events" are supported.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment