homelab infrastructure services

Machine Registry Updates for PDS and Marshal#

New Service Assignments#

Based on the existing tinsnip machine registry format, we need to add:

# Machine Registry for dynamicalsystem sheet
# Format: service_name=service_number (2-digit format)
# Service 00 is reserved for station (sheet infrastructure)

station=00

UID Calculations#

Using the 5-digit UID scheme (S-SS-E-P):

Marshal Service#

  • Service Number: 05
  • Production UID: 10500 (N:1, SS:05, E:0, P:0)
  • Test UID: 10510 (N:1, SS:05, E:1, P:0)
  • Ports: 10500-10509 (prod), 10510-10519 (test)

PDS Service#

  • Service Number: 06
  • Production UID: 10600 (N:1, SS:06, E:0, P:0)
  • Test UID: 10610 (N:1, SS:06, E:1, P:0)
  • Ports: 10600-10609 (prod), 10610-10619 (test)

Registry Update Process#

Manual Update#

# SSH to NAS server
ssh admin@nas-server

# Edit the machine registry
sudo vi /volume1/dynamicalsystem/station/prod/services

# Add new entries:
marshal=05
pds=06

Automatic Discovery#

The setup_station.sh:discover_existing_services() function will automatically discover these services once they're deployed with the correct UIDs.

Environment Variables#

The machine setup will generate these additional variables in the .env files:

Marshal Service (.env)#

TIN_SERVICE_NAME=marshal
TIN_SERVICE_ENVIRONMENT=prod
TIN_SERVICE_UID=10500
TIN_SHEET=dynamicalsystem
TIN_PORT_0=10500
TIN_PORT_1=10501
# ... up to TIN_PORT_9=10509

# Marshal-specific
TIN_MARSHAL_PORT=10500
PROXY_CADDY_URL=https://proxy-host:2019

PDS Service (.env)#

TIN_SERVICE_NAME=pds
TIN_SERVICE_ENVIRONMENT=prod
TIN_SERVICE_UID=10600
TIN_SHEET=dynamicalsystem
TIN_PORT_0=10600
TIN_PORT_1=10601
# ... up to TIN_PORT_9=10609

# PDS-specific
PDS_HOSTNAME=pds.yourdomain.com
TINSNIP_HOST=tinsnip-host.local

Port Allocation Summary#

Service Prod UID Test UID Primary Port Secondary Port Purpose
station 10000 10010 10000 10001 Registry/coordination
gazette 10100 10110 10100 10101 Document management
lldap 10200 10210 10200 10201 Identity management
redis 10300 10310 10300 10301 Key value storage, in memory cache, queue
prometheus 10400 10410 10400 10401 Metrics collection
marshal 10500 10510 10500 10501 External route coordination
pds 10600 10610 10600 10601 atproto Personal Data Server