Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a502aa0128 | |||
| e0b7ead458 | |||
| b5dcf2d815 | |||
| 1d33b8d3f3 | |||
| d592dc6db0 | |||
| bc4d7fea39 | |||
| 5b7d8c3927 |
@@ -21,15 +21,29 @@
|
||||
# tag's commit is actually part of main's history (see check-branch job).
|
||||
|
||||
name: build-and-push
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
- "mqtt-cert-manager/v*"
|
||||
- "visquitto/v*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
addon:
|
||||
description: "Which add-on to build"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- mqtt-cert-manager
|
||||
- visquitto
|
||||
version:
|
||||
description: "Version (e.g. 0.4.0) — leave empty to read from config.yaml"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
env:
|
||||
REGISTRY_HOST: gitea.viratak.com
|
||||
REGISTRY_OWNER: bitopa
|
||||
IMAGE_NAME: mqtt-cert-manager
|
||||
|
||||
jobs:
|
||||
check-branch:
|
||||
@@ -42,12 +56,17 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Make sure we have main's history too
|
||||
- name: Make sure we have main's history
|
||||
run: git fetch origin main:refs/remotes/origin/main
|
||||
|
||||
- name: Is this tag's commit part of main?
|
||||
id: check
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "on_main=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if git merge-base --is-ancestor HEAD origin/main; then
|
||||
echo "on_main=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
@@ -55,17 +74,56 @@ jobs:
|
||||
echo "Tag $GITHUB_REF_NAME points to a commit that is not on main — skipping build."
|
||||
fi
|
||||
|
||||
build:
|
||||
prepare:
|
||||
needs: check-branch
|
||||
if: needs.check-branch.outputs.on_main == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
addon: ${{ steps.meta.outputs.addon }}
|
||||
version: ${{ steps.meta.outputs.version }}
|
||||
image: ${{ steps.meta.outputs.image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Determine add-on and version
|
||||
id: meta
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
ADDON="${{ inputs.addon }}"
|
||||
VERSION="${{ inputs.version }}"
|
||||
else
|
||||
# tag format: mqtt-cert-manager/v0.3.0 or visquitto/v0.4.0
|
||||
ADDON=$(echo "${{ github.ref_name }}" | cut -d/ -f1)
|
||||
VERSION=$(echo "${{ github.ref_name }}" | cut -d/ -f2 | sed 's/^v//')
|
||||
fi
|
||||
|
||||
# Fallback: read version from config.yaml if not provided
|
||||
if [ -z "$VERSION" ]; then
|
||||
VERSION=$(grep '^version:' "$ADDON/config.yaml" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
fi
|
||||
|
||||
if [ -z "$ADDON" ] || [ -z "$VERSION" ]; then
|
||||
echo "Could not determine add-on or version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "addon=$ADDON" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "image=${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_OWNER }}/$ADDON" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Building $ADDON version $VERSION"
|
||||
|
||||
build:
|
||||
needs: prepare
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: amd64
|
||||
platform: linux/amd64
|
||||
# TEMPORARY: only building amd64 while developing against a
|
||||
# single Dell thin client — restore these before publishing.
|
||||
# Uncomment when you are ready for multi-arch:
|
||||
# - arch: aarch64
|
||||
# platform: linux/arm64
|
||||
# - arch: armv7
|
||||
@@ -78,23 +136,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Read add-on version
|
||||
id: version
|
||||
# Plain shell instead of python3+PyYAML: the runner's Python has
|
||||
# no yaml module installed, and this value is a simple one-liner
|
||||
# anyway (version: "0.1.0"), so there's no need for a real YAML
|
||||
# parser or an extra apt/pip install step just for this.
|
||||
run: |
|
||||
VERSION=$(grep '^version:' mqtt-cert-manager/config.yaml | cut -d'"' -f2)
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Read base image for this arch from build.yaml
|
||||
id: base
|
||||
run: |
|
||||
BUILD_FROM=$(grep -E "^[[:space:]]*${{ matrix.arch }}:" mqtt-cert-manager/build.yaml | cut -d'"' -f2)
|
||||
echo "build_from=$BUILD_FROM" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU (needed to build non-amd64 targets on an amd64 runner)
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
@@ -108,13 +150,12 @@ jobs:
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./mqtt-cert-manager
|
||||
context: ./${{ needs.prepare.outputs.addon }}
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
build-args: |
|
||||
BUILD_FROM=${{ steps.base.outputs.build_from }}
|
||||
# No BUILD_FROM needed anymore — modern Dockerfiles have a direct FROM
|
||||
tags: |
|
||||
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}-${{ matrix.arch }}:${{ steps.version.outputs.version }}
|
||||
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}-${{ matrix.arch }}:latest
|
||||
${{ needs.prepare.outputs.image }}-${{ matrix.arch }}:${{ needs.prepare.outputs.version }}
|
||||
${{ needs.prepare.outputs.image }}-${{ matrix.arch }}:latest
|
||||
@@ -17,6 +17,13 @@ This repository contains the following apps
|
||||
|
||||
_Application to use as a certificate manager for Home Assistant._
|
||||
|
||||
### [Visquitto](./visquitto)
|
||||
|
||||
<!-- ![Supports aarch64 Architecture][aarch64-shield] -->
|
||||
![Supports amd64 Architecture][amd64-shield]
|
||||
|
||||
_Application to use as a Second MQTT broker._
|
||||
|
||||
<!--
|
||||
|
||||
Notes to developers after forking or using the github template feature:
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 0.5.1 - 2026-10-11
|
||||
|
||||
- Bug fix
|
||||
|
||||
## 0.5.0 - 2026-10-11
|
||||
|
||||
- Upgraded image build precedure
|
||||
|
||||
## 0.4.2
|
||||
|
||||
- Certificate Common Name (CN) is now taken from each device's own
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
ARG BUILD_FROM
|
||||
FROM ${BUILD_FROM}
|
||||
FROM ghcr.io/home-assistant/base:3.24
|
||||
|
||||
RUN apk add --no-cache python3 py3-pip
|
||||
|
||||
@@ -12,8 +11,8 @@ COPY run.sh /run.sh
|
||||
RUN chmod a+x /run.sh
|
||||
|
||||
LABEL \
|
||||
io.hass.version="0.1.0" \
|
||||
io.hass.name="MQTT Certificate Manager" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.arch="armhf|armv7|aarch64|amd64|i386"
|
||||
io.hass.arch="amd64"
|
||||
|
||||
CMD ["/run.sh"]
|
||||
|
||||
@@ -31,6 +31,7 @@ self-signed CA — no external CA or internet dependency.
|
||||
Full device-side wire protocol: see `DEVICE_PROTOCOL.md`.
|
||||
|
||||
## Installing this application
|
||||
|
||||
1. Add [virarepo repository](https://gitea.viratak.com/bitopa/virarepo) in applications section
|
||||
2. Look for this project, and click install
|
||||
|
||||
@@ -46,10 +47,8 @@ Full device-side wire protocol: see `DEVICE_PROTOCOL.md`.
|
||||
|
||||
## What's included in this scaffold
|
||||
|
||||
- `config.yaml` / `build.yaml` — add-on manifest, current (2026) HA base
|
||||
image convention. **Double check `build.yaml` against
|
||||
https://github.com/home-assistant/docker-base if your Supervisor
|
||||
version is very new or old** — base image tags do change.
|
||||
- `config.yaml` — add-on manifest, current (2026) HA base
|
||||
image convention.
|
||||
- `app/ca.py` — root CA generation + CSR signing (RSA-4096 root, 20-year
|
||||
validity; issued certs default to 825 days, matching common CT/browser
|
||||
practice, though these are just client certs so it's a soft ceiling you
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# As of Supervisor 2026.04+, HA no longer injects BUILD_FROM automatically,
|
||||
# so we pin it explicitly here. If your Supervisor is older/newer and this
|
||||
# fails to build, check https://github.com/home-assistant/docker-base for the
|
||||
# current recommended base image tag and update the line below.
|
||||
build_from:
|
||||
amd64: "ghcr.io/home-assistant/base:latest"
|
||||
aarch64: "ghcr.io/home-assistant/base:latest"
|
||||
armv7: "ghcr.io/home-assistant/base:latest"
|
||||
armhf: "ghcr.io/home-assistant/base:latest"
|
||||
i386: "ghcr.io/home-assistant/base:latest"
|
||||
@@ -1,8 +1,8 @@
|
||||
name: "MQTT Certificate Manager"
|
||||
version: "0.4.2"
|
||||
version: "0.5.1"
|
||||
slug: "mqtt_cert_manager"
|
||||
description: "Local CA that issues and manages TLS client certificates for MQTT nodes"
|
||||
url: "https://gitea.viratak.com/bitopa/mqtt-cert-manager"
|
||||
url: "https://gitea.viratak.com/bitopa/virarepo/src/branch/main/mqtt-cert-manager"
|
||||
# Points Supervisor at a pre-built image instead of building locally on
|
||||
# install. {arch} is substituted with each entry in "arch:" below (amd64,
|
||||
# aarch64, ...) — Supervisor then pulls
|
||||
|
||||
+40
-14
@@ -1,31 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## 0.1.0
|
||||
## 0.5.0 - 2026-10-11
|
||||
|
||||
- Initializing the Application
|
||||
- Added pre-built docker image
|
||||
- Fixed some translation issues
|
||||
|
||||
## 0.2.0
|
||||
## 0.4.1 - 2026-10-11
|
||||
|
||||
- Added app icon
|
||||
- Improved app configuration
|
||||
- Fixed Translation indentation issue
|
||||
|
||||
## 0.2.1
|
||||
## 0.4.0
|
||||
|
||||
- Fixed app icon
|
||||
- Added descriptions in configuration
|
||||
- Added Persian support in configuration
|
||||
|
||||
## 0.2.2
|
||||
## 0.3.3
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.3
|
||||
## 0.3.2
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.5
|
||||
## 0.3.1
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
@@ -33,3 +30,32 @@
|
||||
|
||||
- Added separated ACL's
|
||||
- Improved logging capabilities
|
||||
|
||||
## 0.2.5
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.3
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Minor bug fix
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Fixed app icon
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Added app icon
|
||||
- Improved app configuration
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Initializing the Application
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
FROM eclipse-mosquitto:2
|
||||
|
||||
# Install jq (needed by run.sh for config parsing)
|
||||
RUN apk add --no-cache jq
|
||||
|
||||
# Copy and prepare the entrypoint
|
||||
COPY run.sh /run.sh
|
||||
RUN chmod a+x /run.sh
|
||||
|
||||
# Optional but recommended labels
|
||||
LABEL \
|
||||
io.hass.name="Visquitto" \
|
||||
io.hass.description="Second private Mosquitto broker for bitopa nodes" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.arch="amd64"
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
# Visquitto
|
||||
|
||||
Visquitto is a simple Mosquitto broker setup intended to run on a separate port and be used alongside [mqtt-cert-manager](../mqtt-cert-manager) and custom MQTT nodes.
|
||||
Visquitto is a simple Mosquitto broker setup intended to run on a separate port and be used alongside [mqtt-cert-manager](https://gitea.viratak.com/bitopa/virarepo/src/branch/main/mqtt-cert-manager) and custom MQTT nodes.
|
||||
|
||||
This is not a full certificate-management platform or a Home Assistant-only app. It is a lightweight broker instance for local MQTT traffic, designed to coexist with [mqtt-cert-manager](../mqtt-cert-manager) and custom client code.
|
||||
This is not a full certificate-management platform or a Home Assistant-only app. It is a lightweight broker instance for local MQTT traffic, designed to coexist with [mqtt-cert-manager](https://gitea.viratak.com/bitopa/virarepo/src/branch/main/mqtt-cert-manager) and custom client code.
|
||||
|
||||
## What it is
|
||||
|
||||
- A standard Mosquitto broker
|
||||
- Configured for a dedicated port, separate from the default broker
|
||||
- Meant to be used alongside [mqtt-cert-manager](../mqtt-cert-manager) and custom MQTT nodes
|
||||
- Meant to be used alongside [mqtt-cert-manager](https://gitea.viratak.com/bitopa/virarepo/src/branch/main/mqtt-cert-manager) and custom MQTT nodes
|
||||
- Intended for local/private network use
|
||||
|
||||
## Why use it
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
name: Visquitto
|
||||
version: "0.3.0"
|
||||
version: "0.5.0"
|
||||
slug: visquitto
|
||||
description: Second private Mosquitto broker for bitopa nodes
|
||||
url: "https://gitea.viratak.com/bitopa/virarepo/src/branch/main/visquitto"
|
||||
image: "gitea.viratak.com/bitopa/visquitto-{arch}"
|
||||
arch:
|
||||
- amd64
|
||||
init: false
|
||||
@@ -21,7 +23,6 @@ options:
|
||||
users: []
|
||||
log_dest: []
|
||||
log_type: []
|
||||
nodes: []
|
||||
require_certificate: false
|
||||
cafile: mqtt-cert-manager-ca.crt
|
||||
certfile: mosquitto-server.crt
|
||||
@@ -30,10 +31,11 @@ schema:
|
||||
users:
|
||||
- username: str
|
||||
password: password
|
||||
nodes:
|
||||
log_dest: []
|
||||
log_type: []
|
||||
require_certificate: false
|
||||
log_dest:
|
||||
- list(none|stdout|stderr|topic)?
|
||||
log_type:
|
||||
- list(none|debug|error|warning|notice|information|subscribe|unsubscribe|websockets|all)?
|
||||
require_certificate: bool
|
||||
cafile: str
|
||||
certfile: str
|
||||
keyfile: str
|
||||
@@ -0,0 +1,33 @@
|
||||
configuration:
|
||||
users:
|
||||
name: Users
|
||||
description: List of MQTT users (username + password)
|
||||
fields:
|
||||
username:
|
||||
name: Username
|
||||
description: MQTT username
|
||||
password:
|
||||
name: Password
|
||||
description: MQTT password
|
||||
log_dest:
|
||||
name: Log destinations
|
||||
description: Where Mosquitto should send log messages (none, stdout, stderr, topic)
|
||||
log_type:
|
||||
name: Log types
|
||||
description: Which log levels/events to enable (none, debug, error, warning, notice, information, subscribe, unsubscribe, websockets, all)
|
||||
require_certificate:
|
||||
name: Require client certificate
|
||||
description: If enabled, clients must present a valid certificate signed by the CA
|
||||
cafile:
|
||||
name: CA certificate file
|
||||
description: Filename of the CA certificate (relative to the ssl folder)
|
||||
certfile:
|
||||
name: Server certificate file
|
||||
description: Filename of the Mosquitto server certificate (relative to the ssl folder)
|
||||
keyfile:
|
||||
name: Server private key file
|
||||
description: Filename of the Mosquitto server private key (relative to the ssl folder)
|
||||
|
||||
network:
|
||||
1883/tcp: MQTT (plain)
|
||||
8883/tcp: MQTT over TLS
|
||||
@@ -0,0 +1,33 @@
|
||||
configuration:
|
||||
users:
|
||||
name: کاربران
|
||||
description: لیست کاربران MQTT (نام کاربری + رمز عبور)
|
||||
fields:
|
||||
username:
|
||||
name: نام کاربری
|
||||
description: نام کاربری MQTT
|
||||
password:
|
||||
name: رمز عبور
|
||||
description: رمز عبور MQTT
|
||||
log_dest:
|
||||
name: مقصدهای لاگ
|
||||
description: محل ارسال پیامهای لاگ توسط برنامهی ماسکیتو (none، stdout، stderr، topic)
|
||||
log_type:
|
||||
name: انواع لاگ
|
||||
description: سطوح و رویدادهای لاگ که باید فعال شوند (none، debug، error، warning، notice، information، subscribe، unsubscribe، websockets، all)
|
||||
require_certificate:
|
||||
name: نیاز به گواهی کلاینت
|
||||
description: در صورت فعال بودن، کلاینتها باید گواهی معتبر امضا شده توسط CA ارائه دهند
|
||||
cafile:
|
||||
name: فایل گواهی CA
|
||||
description: نام فایل گواهی CA (نسبت به پوشه ssl)
|
||||
certfile:
|
||||
name: فایل گواهی سرور
|
||||
description: نام فایل گواهی سرور برنامهی ماسکیتو (نسبت به پوشه ssl)
|
||||
keyfile:
|
||||
name: فایل کلید خصوصی سرور
|
||||
description: نام فایل کلید خصوصی سرور برنامهی ماسکیتو (نسبت به پوشه ssl)
|
||||
|
||||
network:
|
||||
1883/tcp: پورت MQTT (ساده)
|
||||
8883/tcp: پورت MQTT روی TLS
|
||||
Reference in New Issue
Block a user