homelab infrastructure services
Service Repository Migration Plan#
This document outlines the plan to separate the ./service directory into a standalone service git repository.
Architecture After Migration#
tinsnip/ # Infrastructure platform repository
├── machine/ # Machine setup infrastructure
├── scripts/ # Platform utilities (legacy deployment)
└── docs/ # Platform documentation
service/ # Service catalog repository
├── lldap/ # LLDAP identity service
│ ├── docker-compose.yml
│ └── setup.sh
├── gazette/ # Future: Gazette service
├── redis/ # Future: Redis service
└── prometheus/ # Future: Prometheus service
Migration Steps#
Phase 1: Prepare Service Repository#
- Create new
servicerepository on GitHub/GitLab - Move
service/directory contents to new repo - Add service-specific README.md and documentation
- Set up proper .gitignore for service repo
Phase 2: Update tinsnip References#
- Remove
service/directory from tinsnip repo - Update
install.shto optionally clone service repo - Update documentation to reference service repo
- Modify deployment scripts to work with external service repo
Phase 3: Documentation Updates#
tinsnip/CLAUDE.md#
- Remove service-specific paths from project structure
- Add reference to external service repo
- Update deployment workflow to show service repo usage
tinsnip/README.md#
- Add section about companion service repository
- Update installation instructions
service/README.md (new)#
- Document service catalog structure
- Explain tinsnip service standards
- Provide template for new services
Phase 4: Update Installation Process#
Modify install.sh to:
# Clone tinsnip platform
git clone https://github.com/user/tinsnip.git
# Optionally clone service catalog
read -p "Clone service catalog? (y/N): " response
if [[ "$response" =~ ^[Yy]$ ]]; then
git clone https://github.com/user/service.git tinsnip/service
fi
Phase 5: Service Deployment Changes#
Update deployment workflow to support:
- Services from the official catalog (
servicerepo) - Custom/private service repositories
- Local service definitions
Example deployment:
# Using official service catalog
cd ~/.local/opt/tinsnip/service/lldap
./setup.sh
# Using custom service
cd ~/my-services/custom-app
TINSNIP_PATH=~/.local/opt/tinsnip ./setup.sh
Benefits of Separation#
- Clean Architecture: Platform vs applications clearly separated
- Independent Versioning: Platform stable while services evolve
- Multiple Service Catalogs: Organizations can maintain private service repos
- Simpler Platform: tinsnip focuses purely on infrastructure
- Service Innovation: Easier to contribute new services without touching platform
Compatibility Considerations#
- Backward Compatibility: Support existing deployments with services in subdirectory
- Service Discovery: Platform can work with services from any location
- Registry Updates: Service registry remains in namespace station, works across repos
Next Steps#
- Create the new
servicerepository - Test migration with lldap service
- Update all documentation
- Create migration script for existing deployments
- Announce breaking change with migration guide