From f478e1c114466921cb72619e12659a0592dcaae2 Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 4 Apr 2026 13:46:27 +0200 Subject: [PATCH 1/3] feat(ci): Add deployment to static web host --- .forgejo/workflows/cleanup.yaml | 29 ++++++++++++ .forgejo/workflows/deploy.yaml | 80 +++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 .forgejo/workflows/cleanup.yaml create mode 100644 .forgejo/workflows/deploy.yaml diff --git a/.forgejo/workflows/cleanup.yaml b/.forgejo/workflows/cleanup.yaml new file mode 100644 index 0000000..99af0c7 --- /dev/null +++ b/.forgejo/workflows/cleanup.yaml @@ -0,0 +1,29 @@ +on: + pull_request: + types: + - closed + +env: + TZ: Europe/Berlin + DEPLOY_TARGET_BASE: c3vocdocs-website-deploy@public-web-static-intern.hamburg.ccc.de + STAGING_BASE_PATH: https://docs-staging.c3voc.de/av + STAGING_DEPLOY_PATH: /var/www/docs-staging.c3voc.de/av/ + +jobs: + cleanup-staging: + runs-on: ubuntu-latest + container: + image: code.forgejo.org/oci/node:22-bookworm + steps: + - name: Pipeline info PR + run: | + echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}" + + - name: Staging Deployment - Prepare keys + run: | + echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv + chmod 400 deploykey.priv + echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts + - name: Staging Deployment - Remove PR from staging + run: | + ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts' ${{ env.DEPLOY_TARGET_BASE }} -t "rm -r ${{ env.STAGING_DEPLOY_PATH }}/pr${{ github.event.pull_request.number }}/" diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml new file mode 100644 index 0000000..0132a84 --- /dev/null +++ b/.forgejo/workflows/deploy.yaml @@ -0,0 +1,80 @@ +on: + push: + branches: + - main + pull_request: + +env: + TZ: Europe/Berlin + DEPLOY_TARGET_BASE: c3vocdocs-website-deploy@public-web-static-intern.hamburg.ccc.de + PROD_BASE_PATH: https://docs.c3voc.de/av + PROD_DEPLOY_PATH: /var/www/docs.c3voc.de/av/ + STAGING_BASE_PATH: https://docs-staging.c3voc.de/av + STAGING_DEPLOY_PATH: /var/www/docs-staging.c3voc.de/av/ + +jobs: + build: + runs-on: ubuntu-latest + container: + image: python:3.13-trixie + steps: + - name: Pipeline info + run: | + echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}" + + - name: Bootstrap CI Tools + run: | + apt update + apt -y install nodejs git rsync openssh-client + pip install --upgrade pip + + - uses: actions/checkout@v6 + with: + fetch-depth: 0 # pull full history for page lastmod by git commit date + + - name: Install Python packages + run: | + pip install -r requirements.txt + + - name: Build website - prod + run: | + mkdocs build + + - name: Build website - staging + if: github.ref_name != 'main' + run: | + sed -i "s#site_url: ${{ env.PROD_BASE_PATH }}/'#site_url: ${{ env.STAGING_BASE_PATH }}/pr${{ github.event.pull_request.number }}/#" mkdocs.yml + mkdocs build + + - name: Deploy - Prepare keys + if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule' + run: | + echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv + chmod 400 deploykey.priv + echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts + + - name: Deploy - Upload PR to staging + if: github.event_name == 'pull_request' + run: | + echo "Deploying to ${{ env.STAGING_BASE_PATH }}/pr${{ github.event.pull_request.number }}" + rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ ${{ env.DEPLOY_TARGET_BASE }}:${{ env.STAGING_DEPLOY_PATH }}/pr${{ github.event.pull_request.number }}/ + - name: Deploy - Add comment to PR with staging URL + if: github.event_name == 'pull_request' && github.event.action == 'opened' + run: | + curl \ + -X POST \ + ${{ github.event.pull_request.base.repo.url }}/issues/${{ github.event.pull_request.number }}/comments \ + -H "Content-Type: application/json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + --data '{ "body": "You can view your changes at ${{ env.STAGING_BASE_PATH }}/pr${{ github.event.pull_request.number }}/" }' + + - name: Deploy - Upload to prod + if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main' + run: | + rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ ${{ env.DEPLOY_TARGET_BASE }}:${{ env.PROD_DEPLOY_PATH }} + + - uses: actions/upload-artifact@v3 + if: github.event_name == 'pull_request' + with: + name: website-build + path: public/ From bc8def927d85213ae6a8f7a6fa7f946efe62c024 Mon Sep 17 00:00:00 2001 From: jtbx Date: Mon, 6 Apr 2026 21:55:56 +0200 Subject: [PATCH 2/3] WIP FIXUP: Fix staging domain and folder TODO: target host is not publicly reachable! --- .forgejo/workflows/cleanup.yaml | 4 ++-- .forgejo/workflows/deploy.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/cleanup.yaml b/.forgejo/workflows/cleanup.yaml index 99af0c7..854d089 100644 --- a/.forgejo/workflows/cleanup.yaml +++ b/.forgejo/workflows/cleanup.yaml @@ -6,8 +6,8 @@ on: env: TZ: Europe/Berlin DEPLOY_TARGET_BASE: c3vocdocs-website-deploy@public-web-static-intern.hamburg.ccc.de - STAGING_BASE_PATH: https://docs-staging.c3voc.de/av - STAGING_DEPLOY_PATH: /var/www/docs-staging.c3voc.de/av/ + STAGING_BASE_PATH: https://staging.docs.c3voc.de/av + STAGING_DEPLOY_PATH: /var/www/staging.docs.c3voc.de/av/ jobs: cleanup-staging: diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 0132a84..7a413f2 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -9,8 +9,8 @@ env: DEPLOY_TARGET_BASE: c3vocdocs-website-deploy@public-web-static-intern.hamburg.ccc.de PROD_BASE_PATH: https://docs.c3voc.de/av PROD_DEPLOY_PATH: /var/www/docs.c3voc.de/av/ - STAGING_BASE_PATH: https://docs-staging.c3voc.de/av - STAGING_DEPLOY_PATH: /var/www/docs-staging.c3voc.de/av/ + STAGING_BASE_PATH: https://staging.docs.c3voc.de/av + STAGING_DEPLOY_PATH: /var/www/staging.docs.c3voc.de/av/ jobs: build: From 39e4cf60ceefc73b71d0ed0f4d7343ebe3da519c Mon Sep 17 00:00:00 2001 From: jtbx Date: Wed, 15 Apr 2026 23:03:42 +0200 Subject: [PATCH 3/3] Cabling: Add more descriptions and network setup notes --- docs/case2.0/cabling.md | 71 +++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/docs/case2.0/cabling.md b/docs/case2.0/cabling.md index 5a88da0..a08b904 100644 --- a/docs/case2.0/cabling.md +++ b/docs/case2.0/cabling.md @@ -2,30 +2,69 @@ title: Cabling --- -Simplified cabling diagram: ![](img/voc-case2_0-cabling.png) +Please also see the [Buildup Plan](buildup.md) for detailed instructions and what to consider when setting up a lecture room. + +The 2 main components of the lecture hall setup are the lectern module on the stage and the FOH module and camera at some "front of house" location. +They are connected by: 1 SDI cable and 1 ethernet cable. +Depending on the location of the audio inputs to the hall, one or two XLR cables may also be laid to the stage or some other location in the hall. +Considerations regarding network connection can be found in the [Network Setup](#network-setup) chapter. + +This cabling diagram contains all connections between modules and devices (but not the inner workings of the modules): ![](img/voc-case2_0-cabling.png) + +## Network Setup + +A VOC lecture hall setup needs some internal VOC network (commonly named VOC-VLAN, even though it may not always be a VLAN technically) and a way to have internet access. +Depending on the number of rooms and the network provided by the location or event there are multiple ways to connect rooms. +This needs to be designed by the VOC responsible person. + +The easiest setup is a single room (or multiple fully independent rooms). +Since the Lectern and FOH modules both have network ports for public and VOC network and a VLAN trunk between them, it doesn't matter where the public network is connected. + +### Recommended Single-Room Network Setup + +- Put the WRT router near the FOH module +- If the room's public network (uplink) is located at the stage: + * Connect the public network (uplink) to the "public" port of the lectern module + * Connect the WAN port of the WRT to some "public" port of the FOH module's network switch +- If the room's public network (uplink) is located near the FOH: + * Connect the WAN port of the WRT to the public network (uplink) +- Connect one LAN port of the WRT to some "VOC" port of the FOH module's network switch +- Power on the WRT router + +See how to enable DHCP in the VOC-(V)LAN if needed. + +### Multi-Room Network Setup + +Ideally there's a private VLAN between all rooms which can be used to interconnect all room setups and the office. +In that case, each hall setup just needs to be connected to the venue VLAN with one "VOC" port (either at the lectern or at the FOH module -- whatever is more convenient). + +When the server case is used, the router VM will provide uplink to the whole VOC network. +If not, deploy one WRT router in a lecture hall or the VOC office providing a connection between public and VOC network. +(Remember to enable all hall networks which are reachable via this router so that the remote access VPN works. TODO: Where is this documented?) ## FOH Module ![](img/voc-case2_0-foh-back.jpeg) See the netbox for detailed port configuration: - -- [Case 1](https://netbox.c3voc.de/dcim/devices/19/interfaces/) -- [Case 2](https://netbox.c3voc.de/dcim/devices/25/interfaces/) -- [Case 3](https://netbox.c3voc.de/dcim/devices/26/interfaces/) -- [Case 4](https://netbox.c3voc.de/dcim/devices/27/interfaces/) -- [Case 5](https://netbox.c3voc.de/dcim/devices/28/interfaces/) -- [Case 6](https://netbox.c3voc.de/dcim/devices/29/interfaces/) +[Case 1](https://netbox.c3voc.de/dcim/devices/19/interfaces/), +[Case 2](https://netbox.c3voc.de/dcim/devices/25/interfaces/), +[Case 3](https://netbox.c3voc.de/dcim/devices/26/interfaces/), +[Case 4](https://netbox.c3voc.de/dcim/devices/27/interfaces/), +[Case 5](https://netbox.c3voc.de/dcim/devices/28/interfaces/), +[Case 6](https://netbox.c3voc.de/dcim/devices/29/interfaces/) ## Lectern Module - +![](img/voc-case2_0-lectern-front.jpeg) +![](img/voc-case2_0-lectern-back.jpeg) -See the netbox for detailed port configuration: +Use ethernet connections at the front unless a fiber trunk is needed via the SFP slots. -- [Case 1](https://netbox.c3voc.de/dcim/devices/30/interfaces/) -- [Case 2](https://netbox.c3voc.de/dcim/devices/31/interfaces/) -- [Case 3](https://netbox.c3voc.de/dcim/devices/32/interfaces/) -- [Case 4](https://netbox.c3voc.de/dcim/devices/33/interfaces/) -- [Case 5](https://netbox.c3voc.de/dcim/devices/34/interfaces/) -- [Case 6](https://netbox.c3voc.de/dcim/devices/35/interfaces/) +Otherwise see the netbox for detailed port configuration: +[Case 1](https://netbox.c3voc.de/dcim/devices/30/interfaces/), +[Case 2](https://netbox.c3voc.de/dcim/devices/31/interfaces/), +[Case 3](https://netbox.c3voc.de/dcim/devices/32/interfaces/), +[Case 4](https://netbox.c3voc.de/dcim/devices/33/interfaces/), +[Case 5](https://netbox.c3voc.de/dcim/devices/34/interfaces/), +[Case 6](https://netbox.c3voc.de/dcim/devices/35/interfaces/)