Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9999957
feat(bareos): Added Bareos 24 images based on Ubuntu 24.04
dark-vex Oct 4, 2025
66d44e9
fix(bareos): Issue with keyring, Debian/Ubuntu have deprecated the us…
dark-vex Oct 4, 2025
ed3b4a9
fix(bareos): GPG key issue
dark-vex Oct 4, 2025
bbc45d2
Update lint job to use ubuntu-latest
dark-vex Nov 18, 2025
e3c0dc0
chore(gh-actions): Changed repo url and runner
dark-vex Nov 18, 2025
aed2d02
Update Docker push commands to use INPUT_REGISTRY
dark-vex Nov 18, 2025
e8dc99d
fix(ci): Image building
dark-vex Nov 19, 2025
5c25f16
fix(ci): test phase missing registry url
dark-vex Nov 19, 2025
9a74532
fix(ci): Missing inputs from secret
dark-vex Nov 19, 2025
f702c1d
feat(director): Add alpine 3.22 with Bareos 24
dark-vex Nov 21, 2025
1c181d9
chore(ci): Test bump
dark-vex Nov 21, 2025
7e16efe
chore(ci): Alpine Docker image
dark-vex Nov 21, 2025
fdbdc04
chore(ci): Alpine 20
dark-vex Nov 21, 2025
49aac7a
test
dark-vex Nov 21, 2025
cacf151
Create claude.yml
dark-vex Nov 21, 2025
48c9deb
Update claude.yml
dark-vex Nov 21, 2025
82d23c5
Update claude.yml
dark-vex Nov 21, 2025
ac988c4
Add Bareos 24 Alpine images for client, storage, webui, and api
github-actions[bot] Nov 21, 2025
8430c78
Fix Alpine build failure by adding edge repository for Bareos packages
github-actions[bot] Nov 21, 2025
60866ee
Update Dockerfile
dark-vex Nov 21, 2025
75eec3a
Update Dockerfile
dark-vex Nov 21, 2025
b154052
Fix Alpine build failure by using Alpine 3.16
github-actions[bot] Nov 21, 2025
503dc28
Merge pull request #13 from dark-vex/claude/issue-11-20251121-2300
dark-vex Nov 22, 2025
e5a579c
fix(bareos): Fix images, alpine does not have bareos v24 version on a…
dark-vex Nov 22, 2025
3bb9f3b
fix(ci): API test
dark-vex Nov 22, 2025
484b253
Update entrypoint.sh
dark-vex Nov 22, 2025
4af1f66
Update entrypoint.sh
dark-vex Nov 22, 2025
5a85dc9
fix(bareos): API v24
dark-vex Nov 22, 2025
eb813c3
ci
dark-vex Nov 22, 2025
95494b7
Update run-compose.yml
dark-vex Apr 16, 2026
bcd5e0e
fix(ci): update container name for Docker Compose V2 naming convention
dark-vex Apr 16, 2026
7224197
Merge pull request #14 from dark-vex/fix/run-compose-container-naming
dark-vex Apr 16, 2026
9db5d6a
fix(ci): upgrade mysql from 5.6 to 5.7 in alpine-mysql-v2 compose (#15)
dark-vex Apr 17, 2026
34ab934
Delete .github/workflows/claude.yml (#16)
dark-vex Apr 17, 2026
abc724a
feat: add Bareos 22-ubuntu images, re-enable Ubuntu CI, add version s…
dark-vex Apr 18, 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
74 changes: 74 additions & 0 deletions .claude/skills/add-bareos-version/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: add-bareos-version
description: Add a new Bareos version directory (Dockerfile + docker-entrypoint.sh) for a given component and flavor (alpine|ubuntu). Delegates all code generation to the ollama-orchestrator subagent. Use when the user asks to add support for Bareos N-ubuntu or N-alpine, or fill missing version/flavor combos. Also use when the user types "add Bareos 22 ubuntu" or "generate missing Bareos versions".
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, Agent]
---

# add-bareos-version skill

Generates missing Bareos Docker image directories using the ollama-orchestrator subagent.

## Upstream source table

See `references/upstream-sources.md` for the authoritative mapping of Bareos version → Alpine tag and Ubuntu repo URL. **Verify this table before generating** — do not assume; run the probe commands in that file if unsure.

## Workflow

### 1. Resolve inputs

Accept: a list of `{component, version, flavor}` tuples. Examples:
- "Add 22-ubuntu for all standard components" → four tuples: director-pgsql, storage, client, webui, each with version=22, flavor=ubuntu
- "Generate client/23-alpine" → one tuple

**Standard components** = director-pgsql, storage, client, webui. The api component uses a pip-pinned pattern; handle it separately only if explicitly requested.

### 2. Look up upstream source

From `references/upstream-sources.md`:
- If the version has no upstream source for the requested flavor → stop and tell the user what's missing.
- If the source is marked `current/` → note that the image will install whatever Bareos is current (as of the build date, not the directory name).

### 3. Find the reference template

Find the nearest existing directory with the **same component** and **same flavor**:
- Same component, closest version, same flavor (e.g. for client/22-ubuntu, reference is client/21-ubuntu)
- Read its `Dockerfile` and `docker-entrypoint.sh` in full — pass this verbatim to the subagent

### 4. Invoke ollama-orchestrator

Call `Agent(subagent_type: "ollama-orchestrator", prompt: <detailed prompt>)` with:
- The reference Dockerfile and entrypoint verbatim (inside a code fence)
- The target directory name (e.g. `client/22-ubuntu`)
- The FROM change: e.g. `FROM ubuntu:jammy` (Ubuntu 22.04)
- The BAREOS_KEY and BAREOS_REPO values from the upstream sources table
- Any differences in how the gpg key is handled between v21 and v22+ style
- A request for the complete Dockerfile and entrypoint, not a diff

**Mandatory**: do not write Dockerfile or entrypoint bodies yourself. All content must come from ollama-orchestrator.

### 5. Write files

From the subagent's output, extract the Dockerfile and docker-entrypoint.sh, then:
```bash
mkdir -p <component>/<version>-<flavor>
# Write Dockerfile
# Write docker-entrypoint.sh
chmod +x <component>/<version>-<flavor>/docker-entrypoint.sh
```

### 6. Validate one representative build

Run `docker build --check` (or `docker build --platform linux/amd64 --no-cache -t test-bareos:local .`) from inside the new directory. If it fails, inspect the error and run one correction round through ollama-orchestrator before giving up.

Do not attempt to build all generated dirs in one pass — do one, verify, then continue.

### 7. Report

State what was generated, which tuples were skipped (upstream not found), whether the test build passed.

## Ubuntu key handling difference

- v20–21 (old style): `curl -Ls $BAREOS_KEY -o /tmp/bareos.key` then `apt-key add /tmp/bareos.key`
- v22+ (new style): `curl -Ls $BAREOS_KEY | gpg --dearmor -o /usr/share/keyrings/bareos.gpg` then `[signed-by=/usr/share/keyrings/bareos.gpg]` in sources.list

When generating v22-ubuntu, ensure the reference (v21-ubuntu old style) is adapted to the new gpg style shown in v24-ubuntu. Tell the subagent explicitly.
69 changes: 69 additions & 0 deletions .claude/skills/add-bareos-version/references/upstream-sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Bareos Upstream Source Table

Last verified: 2026-04-18

## Ubuntu repos

| Bareos version | Ubuntu base | BAREOS_KEY | BAREOS_REPO | Status |
|---------------|-------------|------------|-------------|--------|
| 20 | ubuntu:focal (20.04) | `http://download.bareos.org/bareos/release/20/xUbuntu_20.04/Release.key` | `http://download.bareos.org/bareos/release/20/xUbuntu_20.04/` | ✓ versioned |
| 21 | ubuntu:focal (20.04) | `http://download.bareos.org/bareos/release/21/xUbuntu_20.04/Release.key` | `http://download.bareos.org/bareos/release/21/xUbuntu_20.04/` | ✓ versioned |
| 22 | ubuntu:jammy (22.04) | `http://download.bareos.org/current/xUbuntu_22.04/Release.key` | `http://download.bareos.org/current/xUbuntu_22.04/` | ⚠ current/ installs latest Bareos (25.x as of 2026-04) |
| 23 | — | — | — | ✗ no versioned repo; current/ does not pin to 23 |
| 24 | ubuntu:noble (24.04) | `http://download.bareos.org/current/xUbuntu_24.04/Release.key` | `http://download.bareos.org/current/xUbuntu_24.04/` | ⚠ current/ installs latest Bareos (25.x as of 2026-04) |
| 25 | — | — | — | ✗ no versioned repo; current/ does not pin to 25 |

**Note**: For v22+, `current/` always tracks the latest Bareos release. The directory name reflects Ubuntu version, not Bareos version.

## Alpine repos

| Bareos version | Alpine tag | Bareos package | Status |
|---------------|-----------|----------------|--------|
| 20 | alpine:3.15 | bareos-20.x | ✓ in community |
| 21 | alpine:3.17 | bareos-21.x | ✓ in community |
| 22 | alpine:3.18 | bareos-22.0.3-r1 | ✓ in community |
| 23 | — | — | ✗ Alpine 3.19+ has no Bareos packages |
| 24 | — | — | ✗ Alpine 3.19+ has no Bareos packages |
| 25 | — | — | ✗ Alpine 3.19+ has no Bareos packages |

**Note**: Bareos is only available in Alpine through 3.18. There is no Alpine support for Bareos 23+.

## api component (bareos-restapi pip package)

| Version | Pip spec | PyPI status |
|---------|----------|-------------|
| 21 | `>=21*,<22*` | ✓ 21.1.9 on PyPI |
| 22 | `>=22*,<23*` | ✗ not on PyPI — build will fail |
| 24 | `>=24*,<25*` | ✗ not on PyPI — build will fail |

**api component note**: The existing api/22-alpine and api/24-alpine Dockerfiles have broken pip constraints. Only api/21-alpine is reliably buildable. Do not generate new api dirs without first verifying PyPI availability.

## Verification commands

```bash
# Ubuntu: check a specific version URL
curl -sfI "http://download.bareos.org/bareos/release/<v>/xUbuntu_20.04/Release.key" && echo "YES" || echo "NO"
curl -sfI "http://download.bareos.org/current/xUbuntu_22.04/Release.key" && echo "YES" || echo "NO"

# Alpine: check what Bareos version an Alpine tag ships
docker run --rm alpine:<tag> sh -c "apk update -q 2>/dev/null && apk search -e bareos"

# pip: check bareos-restapi versions
curl -sL "https://pypi.org/simple/bareos-restapi/" | grep -Eo 'bareos.restapi-[0-9]+\.[0-9]+\.[0-9]+' | sed 's/bareos.restapi-//'
```

## Missing and buildable as of 2026-04-18

| Component | Target | Buildable? | Reason |
|-----------|--------|------------|--------|
| director-pgsql | 22-ubuntu | ✓ | Ubuntu 22.04 + current/ |
| director-pgsql | 24-alpine | ✗ | No Alpine package for Bareos 24 |
| director-pgsql | 23-alpine/ubuntu | ✗ | No upstream source |
| director-pgsql | 25-alpine/ubuntu | ✗ | No upstream source |
| storage | same as director-pgsql | same | same |
| client | same as director-pgsql | same | same |
| webui | same as director-pgsql | same | same |
| api | 20-alpine | ✗ | bareos-restapi<21 not on PyPI |
| api | 23-alpine | ✗ | No upstream source |
| api | 25-alpine | ✗ | No upstream source |
| director-mysql | 21+ | ✗ | MySQL backend dropped in Bareos 21+ |
6 changes: 6 additions & 0 deletions .github/actions/build-bareos-app/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: 'build-bareos-app'
description: 'Build Bareos app images'
author: 'Barcus'
inputs:
registry:
description: 'Registry URL'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.registry }}
2 changes: 1 addition & 1 deletion .github/actions/build-bareos-app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ while read app version arch app_path ; do
--build-arg VCS_REF=$(git rev-parse --short HEAD) \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--build-arg NAME="${GITHUB_REPOSITORY}-${app}" \
--output "type=docker,dest=${workdir}/bareos-${app}-${tag}.tar,name=${GITHUB_REPOSITORY}-${app}:${tag}" \
--output "type=docker,dest=${workdir}/bareos-${app}-${tag}.tar,name=${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${app}:${tag}" \
"${app_path}"

if [[ $? -ne 0 ]] ; then
Expand Down
9 changes: 2 additions & 7 deletions .github/actions/prepare-bareos-app/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

BUILDX_VER='v0.5.1'
latest_ubuntu='21'
latest_ubuntu='24'
latest_alpine='22'
latest_api='22'
latest_api='24'

build_file="${GITHUB_WORKSPACE}/build/app_build.txt"
tag_file="${GITHUB_WORKSPACE}/build/tag_build.txt"
Expand All @@ -28,11 +28,6 @@ for file in $docker_files; do
base_img=$(echo "$version_dir" |cut -d'-' -f2)
[[ $version -ge 20 ]] && default_backend='pgsql'

# disable ubuntu builds
if [ "${base_img}" == "ubuntu" ]; then
continue
fi

# Define default tag
tag_build="${version}-${base_img}"
if [ "${app}" == 'director' ]; then
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/push-bareos-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ description: 'Push Bareos docker images to Docker Hub'
author: 'Barcus'
inputs:
docker_pass:
description: 'Docker Hub password'
description: 'Registry Password'
required: true
docker_user:
description: 'Registry Username'
required: true
registry:
description: 'Registry URL'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.docker_user }}
- ${{ inputs.docker_pass }}
- ${{ inputs.registry }}
20 changes: 10 additions & 10 deletions .github/actions/push-bareos-app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ done
echo ::endgroup::

# Connect Docker Hub
docker login -u 'barcus' -p "${INPUT_DOCKER_PASS}"
docker login "${INPUT_REGISTRY}" -u "${INPUT_DOCKER_USER}" -p "${INPUT_DOCKER_PASS}"

# Push tags and manfiests
echo ::group::Push build tags
Expand All @@ -27,27 +27,27 @@ while read line ; do
re='^[0-9]+-alpine.*$'
if [[ $version =~ $re ]] ; then
build_tag="${version}-${arch}"
rm_tag="$rm_tag ${GITHUB_REPOSITORY}-${app}:${build_tag}"
rm_tag="$rm_tag ${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${app}:${build_tag}"
fi
# Push build tags
docker push "${GITHUB_REPOSITORY}-${app}:${build_tag}"
docker push "${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${app}:${build_tag}"
done < "${workdir}/app_build.txt"
echo ::endgroup::

echo ::group::Push additional tags
while read build_app s_tag t_tag ; do
# Push additional tags for Ubuntu
if [[ $s_tag =~ ^[a-z0-9]+-ubuntu.*$ ]]; then
docker tag "${GITHUB_REPOSITORY}-${build_app}:${s_tag}" \
"${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
docker push "${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
docker tag "${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${s_tag}" \
"${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
docker push "${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
fi
# Create and push manifest for Alpine (arm64 + amd64)
if [[ $s_tag =~ ^[a-z0-9]+-alpine.*$ ]]; then
docker manifest create "${GITHUB_REPOSITORY}-${build_app}:${t_tag}" \
"${GITHUB_REPOSITORY}-${build_app}:${s_tag}-amd64" \
"${GITHUB_REPOSITORY}-${build_app}:${s_tag}-arm64"
docker manifest push "${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
docker manifest create "${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${t_tag}" \
"${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${s_tag}-amd64" \
"${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${s_tag}-arm64"
docker manifest push "${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${build_app}:${t_tag}"
fi
done < "${workdir}/tag_build.txt"
echo ::endgroup::
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/test-bareos-app/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: 'test-bareos-app'
description: 'Test Bareos docker images'
author: 'Barcus'
inputs:
registry:
description: 'Registry URL'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.registry }}
14 changes: 10 additions & 4 deletions .github/actions/test-bareos-app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ while read app version arch path ; do
# Define args and command
if [[ $version =~ $re_alpine ]] ; then
build_tag="${version}-${arch}"
alpine_pkg='bareos'
[[ "$app" == "webui" ]] && alpine_pkg='bareos-webui'
CMD="apk list --installed $alpine_pkg"

if [[ "$app" == "api" ]] ; then
CMD="python -m pip show bareos-restapi | grep 'Version:' | awk '{print $2}'"
elif [[ "$app" == "webui" ]] ; then
CMD="apk list --installed bareos-webui"
else
CMD="apk list --installed bareos"
fi
fi

if [[ $version =~ $re_ubuntu ]] ; then
CMD="dpkg-query --showformat=\${Version} --show bareos-${app}"
fi
Expand All @@ -48,7 +54,7 @@ while read app version arch path ; do

# Run docker and check version
img_version=$(docker run -t --rm ${ARGS} \
${GITHUB_REPOSITORY}-${app}:${build_tag} \
${INPUT_REGISTRY}/${GITHUB_REPOSITORY}-${app}:${build_tag} \
${CMD} | tail -1)

if [[ $version =~ $re_alpine ]] ; then
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:

- name: Build images
uses: ./.github/actions/build-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:

- name: Load and test images
uses: ./.github/actions/test-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

deploy:
needs: test
Expand All @@ -111,3 +115,5 @@ jobs:
uses: ./.github/actions/push-bareos-app
with:
docker_pass: ${{ secrets.DOCKER_PASS }}
docker_user: ${{ secrets.DOCKER_USER }}
registry: ${{ secrets.REGISTRY_URL }}
6 changes: 6 additions & 0 deletions .github/workflows/ci-bareos-app.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:

- name: Build images
uses: ./.github/actions/build-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:

- name: Load and test images
uses: ./.github/actions/test-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

deploy:
needs: test
Expand All @@ -111,3 +115,5 @@ jobs:
uses: ./.github/actions/push-bareos-app
with:
docker_pass: ${{ secrets.DOCKER_PASS }}
docker_user: ${{ secrets.DOCKER_USER }}
registry: ${{ secrets.REGISTRY_URL }}
6 changes: 6 additions & 0 deletions .github/workflows/ci-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:

- name: Build images
uses: ./.github/actions/build-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:

- name: Load and test images
uses: ./.github/actions/test-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

deploy:
needs: test
Expand All @@ -111,3 +115,5 @@ jobs:
uses: ./.github/actions/push-bareos-app
with:
docker_pass: ${{ secrets.DOCKER_PASS }}
docker_user: ${{ secrets.DOCKER_USER }}
registry: ${{ secrets.REGISTRY_URL }}
6 changes: 6 additions & 0 deletions .github/workflows/ci-director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:

- name: Build images
uses: ./.github/actions/build-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:

- name: Load and test images
uses: ./.github/actions/test-bareos-app
with:
registry: ${{ secrets.REGISTRY_URL }}

deploy:
needs: test
Expand All @@ -111,3 +115,5 @@ jobs:
uses: ./.github/actions/push-bareos-app
with:
docker_pass: ${{ secrets.DOCKER_PASS }}
docker_user: ${{ secrets.DOCKER_USER }}
registry: ${{ secrets.REGISTRY_URL }}
Loading
Loading