Epic: Support User-Provided Custom Templates in Holodeck Config
Summary
Enable users to specify custom scripts and templates in the Holodeck configuration file that are executed during the provisioning stage. This allows further customization of target host setup beyond Holodeck's built-in templates.
Motivation
Currently, Holodeck only executes built-in provisioning templates. Users with advanced requirements need to:
- Install additional system packages or tools
- Configure custom environment variables
- Run organization-specific initialization scripts
- Install proprietary software or drivers
- Apply security hardening policies
- Set up monitoring or observability agents
By allowing custom templates, Holodeck becomes extensible without modifying core code.
Design Considerations
Execution Phases
Custom scripts can run at different provisioning phases:
- pre-install: Before any Holodeck components are installed
- post-runtime: After container runtime, before toolkit
- post-toolkit: After toolkit, before Kubernetes
- post-kubernetes: After Kubernetes is ready
- post-install (default): After all Holodeck components
Security Model
- Scripts execute with same privileges as provisioning (sudo available)
- Input validation required
- Optional dry-run/preview mode
- Script checksums for integrity verification
Subtasks
Phase 1: API Schema Design
Phase 2: Template Loading
Phase 3: Dependency Resolver Integration
Phase 4: Execution Framework
Phase 5: Error Handling
Phase 6: Security Measures
Phase 7: Template Library (Optional)
Phase 8: CLI Integration
Phase 9: Documentation
Example Configurations
Simple Post-Install Script
spec:
customTemplates:
- name: install-tools
phase: post-install
inline: |
#!/bin/bash
apt-get update
apt-get install -y htop vim tmux
Multi-Phase Setup
spec:
customTemplates:
- name: pre-flight-checks
phase: pre-install
inline: |
#!/bin/bash
echo "Starting provisioning at $(date)"
df -h
free -m
- name: configure-runtime
phase: post-runtime
file: ./scripts/custom-containerd-config.sh
- name: deploy-monitoring
phase: post-kubernetes
url: https://example.com/monitoring-setup.sh
checksum: sha256:abc123def456...
env:
PROMETHEUS_ENDPOINT: http://prometheus.company.com
GRAFANA_API_KEY: ${GRAFANA_KEY}
- name: final-validation
phase: post-install
inline: |
#!/bin/bash
echo "Provisioning complete!"
nvidia-smi
kubectl get nodes
Acceptance Criteria
Supersedes
Labels
feature customization extensibility
Epic: Support User-Provided Custom Templates in Holodeck Config
Summary
Enable users to specify custom scripts and templates in the Holodeck configuration file that are executed during the provisioning stage. This allows further customization of target host setup beyond Holodeck's built-in templates.
Motivation
Currently, Holodeck only executes built-in provisioning templates. Users with advanced requirements need to:
By allowing custom templates, Holodeck becomes extensible without modifying core code.
Design Considerations
Execution Phases
Custom scripts can run at different provisioning phases:
Security Model
Subtasks
Phase 1: API Schema Design
Extend EnvironmentSpec for custom templates
Define CustomTemplate type in API
Phase 2: Template Loading
Implement template source resolver
Implement checksum verification
Handle template preprocessing
Phase 3: Dependency Resolver Integration
Phase 4: Execution Framework
Implement custom template executor
Add execution progress reporting
Phase 5: Error Handling
Implement per-template error handling
continueOnErrorflagImplement dry-run support
Phase 6: Security Measures
Implement input validation
Add audit logging
Implement template preview in dryrun
Phase 7: Template Library (Optional)
Create example template library
examples/templates/Document template best practices
Phase 8: CLI Integration
Phase 9: Documentation
Create custom templates guide
Add examples
Example Configurations
Simple Post-Install Script
Multi-Phase Setup
Acceptance Criteria
continueOnErrorworks as expectedSupersedes
Labels
featurecustomizationextensibility