Link Classic -> Link Next updates #26

Open
darren wants to merge 9 commits from darren/ansible-collection-apps:link-next into main
First-time contributor
No description provided.
Owner
  • Leave only components that need to talk to each other on channels.network

  • roles/podman_link/templates/home/config/systemd/user/link.target -> would prefer to keep this depending only on zammad-nginx; and have zammad-nginx depend on the bridge services instead
    (and add PartOf=zammad-nginx.service for the bridge services)

  • remove PartOf=link.target where it's been added spuriously, it should only go on zammad-nginx

- Leave only components that need to talk to each other on channels.network - roles/podman_link/templates/home/config/systemd/user/link.target -> would prefer to keep this depending only on zammad-nginx; and have zammad-nginx depend on the bridge services instead (and add PartOf=zammad-nginx.service for the bridge services) - remove PartOf=link.target where it's been added spuriously, it should only go on zammad-nginx
Owner

We're getting a lot closer to merging and deploying this code, as the audit is finishing - @darren could we exclude Voice and Deltachat channels from this release? These were out of scope for testing and documenting on our current budget, the plan is to re-add them in the future. This means not deploying those containers, and not including them in the Zammad channel list and frontend.

We're getting a lot closer to merging and deploying this code, as the audit is finishing - @darren could we exclude Voice and Deltachat channels from this release? These were out of scope for testing and documenting on our current budget, the plan is to re-add them in the future. This means not deploying those containers, and not including them in the Zammad channel list and frontend.
zammad-init, zammad-railsserver, zammad-scheduler, zammad-websocket and
zammad-nginx now run with a read-only root filesystem, no new privileges
and every capability dropped, so not even root inside a container can
change the Zammad code. What Zammad writes at run time goes to the var
and storage volumes and to memory-backed tmpfs for /opt/zammad/tmp and
/opt/zammad/log. Everything on a tmpfs is gone on the next start.

zammad-nginx also gets a tmpfs for /etc/nginx/conf.d, /var/lib/nginx and
/etc/nginx/sites-enabled. In the image sites-enabled/default is a
symlink into sites-available, which is read-only here, so the tmpfs
gives the entrypoint a plain directory to write the site config into.

This needs the Zammad image that keeps its code root-owned, which first
shipped in 4.0.0-beta.12. The role already requires that version; its
assertion now names the read-only root as a second reason.
The Signal bridge restarts signal-cli itself when it exits, and answers
503 on /api/health while signal-cli is down. If it cannot bring
signal-cli back, the container stayed up and unhealthy and nothing
restarted it.

The unit now checks /api/health every 30 seconds. After three failed
checks podman kills the container and Restart=always starts a fresh one.
A two-minute start period covers signal-cli's JVM boot, during which the
endpoint also answers 503. The image has no curl, so the check uses
node.
A bridge buffers inbound media in memory, and nothing bounded how much
a bridge container could use. Each bridge unit now sets MemoryMax, so
one that runs away is killed and restarted by its own unit instead of
exhausting the host. podman_link_bridge_memory_max (1G) covers the
WhatsApp, DeltaChat and Voice bridges and
podman_link_bridge_signal_memory_max (2G) the Signal bridge, which also
runs signal-cli's JVM.

The bridges' LOG_LEVEL is now set from podman_link_bridge_log_level. Its
default, info, is the level they already logged at in production.
This pull request has changes conflicting with the target branch.
  • roles/podman_link/defaults/main.yml
  • roles/podman_link/handlers/main.yml
  • roles/podman_link/tasks/main.yml
  • roles/podman_link/templates/home/config/containers/systemd/bridge-postgresql.container
  • roles/podman_link/templates/home/config/containers/systemd/bridge-whatsapp.container
  • roles/podman_link/templates/home/config/containers/systemd/bridge-worker.container
  • roles/podman_link/templates/home/config/containers/systemd/link.container
  • roles/podman_link/templates/home/config/containers/systemd/opensearch-dashboards.container
  • roles/podman_link/templates/home/config/containers/systemd/protonmail-bridge.container
  • roles/podman_link/templates/home/config/containers/systemd/signal-cli-rest-api.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-init.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-memcached.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-nginx.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-opensearch.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-railsserver.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-redis.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-scheduler.container
  • roles/podman_link/templates/home/config/containers/systemd/zammad-websocket.container
  • roles/podman_link/templates/home/nginx.conf
  • roles/podman_link/templates/home/opensearch-config.yml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u link-next:darren-link-next
git switch darren-link-next

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff darren-link-next
git switch darren-link-next
git rebase main
git switch main
git merge --ff-only darren-link-next
git switch darren-link-next
git rebase main
git switch main
git merge --no-ff darren-link-next
git switch main
git merge --squash darren-link-next
git switch main
git merge --ff-only darren-link-next
git switch main
git merge darren-link-next
git push origin main
Sign in to join this conversation.
No description provided.