Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e48a0e7
chore: add podman-compose to uv config
efahl Jan 22, 2026
1b05d17
ci: use uv
aparcar Jan 23, 2026
0f5dac7
build: s/network/network_mode
aparcar Jan 23, 2026
3bd1b97
build(deps): Bump werkzeug from 3.1.4 to 3.1.5
dependabot[bot] Jan 23, 2026
430648e
build(deps): Bump urllib3 from 2.6.2 to 2.6.3
dependabot[bot] Jan 23, 2026
28f8395
build(deps): Bump python-multipart from 0.0.21 to 0.0.22
dependabot[bot] Jan 27, 2026
47c1e5c
feat: add error logging
aparcar Jan 11, 2026
fe04eb5
build: report package errors with a more detail
efahl Feb 3, 2026
01bf4d7
package-changes: remove kmod-nf-conntrack6
efahl Feb 4, 2026
f67ce75
error-log: sanitize job hashes in messages
efahl Feb 4, 2026
f1617b0
build: improve package error name parsing
efahl Feb 4, 2026
5b0eeed
fix: validate repository dict keys and URLs in build requests
aparcar Feb 6, 2026
c194bac
fix: replace naive startswith() repo allow-list with URL parsing
aparcar Feb 6, 2026
0216152
fix: add filter='data' to tarfile.extractall() (CVE-2007-4559)
aparcar Feb 6, 2026
d2a37b0
package-changes: remove any luci-i18n english translations
efahl Feb 6, 2026
298ddb4
package_changes.py: 25.12 Add switch driver for lantiq
map-b Feb 16, 2026
65be169
build(deps): Bump pygments from 2.19.2 to 2.20.0
dependabot[bot] Mar 30, 2026
ef43e6a
build(deps): Bump requests from 2.32.5 to 2.33.0
dependabot[bot] Mar 26, 2026
56a18f9
build: add hatchling build-system and boto3 dependency
aparcar Mar 29, 2026
0e2f7b3
feat: add S3 storage backend for decentralized workers
aparcar Mar 29, 2026
874acad
fix: proper container cleanup to prevent leaked containers and volumes
aparcar Mar 29, 2026
fc9559f
tests: use pytest tmp_path and add store abstraction tests
aparcar Mar 29, 2026
cbb01ea
feat: longer caching of build results
aparcar Mar 29, 2026
0db88ce
feat: more detailed stats
aparcar Mar 29, 2026
f341c8e
feat: add podman-compose for decentralized S3 workers
aparcar Mar 29, 2026
5ccf5b5
docs: add Redis setup to development section
aparcar Mar 29, 2026
fd58efc
chore: run ruff format
aparcar Apr 13, 2026
d840776
feat: make container network mode configurable
aparcar Apr 13, 2026
d67011d
feat: add repository mode (append/replace) and apk support
aparcar Apr 13, 2026
8e2aea6
tests: add LibreMesh external repository integration tests
aparcar Apr 13, 2026
d86ec57
tests: add Freifunk Weimarnetz external repository integration tests
aparcar Apr 13, 2026
dec4d5b
build(deps): Bump werkzeug from 3.1.5 to 3.1.6
dependabot[bot] Apr 13, 2026
4092578
build: improve package error conflict parsing
efahl Mar 26, 2026
4d5f075
build(deps-dev): Update pytest requirement from >=8.4.2 to >=9.0.3
dependabot[bot] Apr 13, 2026
7310ed0
build(deps): Update boto3 requirement from >=1.35.0 to >=1.42.88
dependabot[bot] Apr 13, 2026
aea97f9
build(deps-dev): Update isort requirement from >=7.0.0 to >=8.0.1
dependabot[bot] Apr 13, 2026
2333447
feat: add TOML config file support
aparcar Apr 13, 2026
29d3e31
refactor: store build error logs in Redis instead of files
aparcar Apr 13, 2026
6bb91e0
refactor: simplify container socket mounting
aparcar Apr 13, 2026
b7793cd
style: add dark theme based on system preference
aparcar Apr 13, 2026
2082abb
chore: switch to Python 3.14
aparcar Apr 13, 2026
b3d4f2b
ci: fix new asu-build network requirement
aparcar Apr 13, 2026
09cf2b1
fix: use correct network parameter
aparcar Apr 14, 2026
d8dacbe
test: improve debugging and update slow tests to 25.12.2
aparcar Apr 14, 2026
c65833f
ci: add podman-compose integration test with nginx cache
aparcar Apr 14, 2026
af72b67
fix(test): restore settings after slow tests mutate them
aparcar Apr 14, 2026
b85510a
chore: run all CI on the same ubuntu
aparcar Apr 14, 2026
46c8547
fix: set network_mode=bridge when using named networks
claude Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 67 additions & 12 deletions .github/workflows/podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,29 @@ env:
LOG_LEVEL: DEBUG

jobs:
build:
runs-on: ubuntu-latest
direct:
runs-on: ubuntu-24.04

name: podman-compose integration test
name: podman-compose

steps:
- uses: actions/checkout@v4

- name: Install ImageBuilder prereqs
run: sudo apt-get install -y podman-compose jq
- name: Install prereqs
run: sudo apt-get install -y jq

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Build the containers
run: |
podman-compose build
uv run podman-compose build

- name: Start the containers
run: |
export CONTAINER_SOCKET_PATH="/tmp/podman.sock"
podman system service --time=0 "unix://$CONTAINER_SOCKET_PATH" &
echo "PUBLIC_PATH=$(pwd)/public" > .env
echo "CONTAINER_SOCKET_PATH=$CONTAINER_SOCKET_PATH" >> .env
podman-compose up -d
podman network create asu-build
podman system service --time=0 "unix://$(pwd)/podman.sock" &
uv run podman-compose up -d

- name: Let the containers start
run: sleep 30
Expand All @@ -55,7 +56,7 @@ jobs:
curl 'http://localhost:8000/api/v1/build' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data @tests/ci/openwrt-one-24.10.0.json | tee response.json | jq
--data @tests/ci/openwrt-one-25.12.2.json | tee response.json | jq
if [ "$(jq -r '.status' response.json)" -eq 200 ]; then
break
fi
Expand All @@ -64,3 +65,57 @@ jobs:
fi
sleep 10
done

cached:
runs-on: ubuntu-latest

name: podman-compose with nginx cache

steps:
- uses: actions/checkout@v4

- name: Install prereqs
run: sudo apt-get install -y jq

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Build the containers
run: |
uv run podman-compose build

- name: Start the containers with cache
run: |
podman network create asu-build
podman system service --time=0 "unix://$(pwd)/podman.sock" &
cp tests/ci/asu-cache.toml asu.toml
uv run podman-compose -f podman-compose.yml -f podman-compose.cache.yml up -d

- name: Let the containers start
run: sleep 30

- name: Test startup
run: |
curl -s http://localhost:8000/api/v1/stats | tee response.json | jq
[ "$(jq -r '.queue_length' response.json)" -eq 0 ] || exit 1

- name: Test build (first request, cache miss)
run: |
for i in {1..20}; do
curl 'http://localhost:8000/api/v1/build' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data @tests/ci/openwrt-one-25.12.2.json | tee response.json | jq
if [ "$(jq -r '.status' response.json)" -eq 200 ]; then
break
fi
if [ $i -eq 20 ]; then
exit 1
fi
sleep 10
done

- name: Verify cache was used
run: |
uv run podman-compose -f podman-compose.yml -f podman-compose.cache.yml logs cache 2>&1 | tee cache.log
grep -q "downloads.openwrt.org" cache.log
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"

name: Python ${{ matrix.python-version }}

Expand All @@ -37,9 +37,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
uses: astral-sh/setup-uv@v5

- name: Display Python version
run: python -c "import sys; print(sys.version)"
Expand All @@ -55,8 +53,8 @@ jobs:

- name: Test with pytest
run: |
export CONTAINER_SOCKET_PATH="/tmp/podman.sock"
podman system service --time=0 "unix://$CONTAINER_SOCKET_PATH" &
podman network create asu-build
podman system service --time=0 "unix://$(pwd)/podman.sock" &
uv run coverage run -m pytest -vv --runslow
uv run coverage xml

Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-slim
FROM python:3.14-slim

WORKDIR /app/

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ The services are configured via environment variables, which can be set in a
`.env` file

```bash
echo "PUBLIC_PATH=$(pwd)/public" > .env
echo "CONTAINER_SOCKET_PATH=/run/user/$(id -u)/podman/podman.sock" >> .env
# optionally allow custom scripts running on first boot
echo "ALLOW_DEFAULTS=1" >> .env
# symlink the podman socket into the asu directory
ln -sf /run/user/$(id -u)/podman/podman.sock podman.sock

# create isolated network for build containers (no access to Redis)
podman network create asu-build
```

Now it's possible to run all services via `podman-compose`:
Expand Down Expand Up @@ -187,6 +188,12 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --extra dev
```

#### Running Redis

```bash
podman run -d --name redis -p 6379:6379 redis:alpine
```

#### Running the server

```bash
Expand Down
38 changes: 38 additions & 0 deletions asu.example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ASU Server Configuration
#
# Copy to asu.toml and adjust. Environment variables and .env
# override values set here.

upstream_url = "https://downloads.openwrt.org"
allow_defaults = false
log_level = "INFO"

# Container settings
base_container = "ghcr.io/openwrt/imagebuilder"

# Caching proxy: uncomment to route package downloads through nginx cache
# upstream_url = "http://cache"

# Build cache TTLs
build_ttl = "7d"
build_ttl_unversioned = "24h"
build_defaults_ttl = "30m"
build_failure_ttl = "1h"
max_pending_jobs = 200
job_timeout = "10m"

# S3 storage (optional, default is local)
# store_backend = "s3"
# s3_endpoint = "https://s3.example.com"
# s3_access_key = ""
# s3_secret_key = ""
# s3_bucket = "asu-store"
# s3_region = "auto"
# s3_public_url = "https://cdn.example.com"

# Allowed external repository URL prefixes
# repository_allow_list = [
# "https://raw.githubusercontent.com/libremesh/",
# "https://feed.libremesh.org/",
# "https://buildbot.weimarnetz.de/",
# ]
Loading