Copier Templates
Copier is a template rendering tool that helps scaffold and maintain project configurations. NGSS provides two main Copier templates:
-
ngss-devops-template - Generates Kubernetes manifests, Skaffold configuration, and kustomize overlays
-
ngss-backstage-template - Generates Backstage catalog entries and documentation structure
Why Copier?
-
Auto-detection - Automatically detects project settings from
pom.xmland existing configs -
Consistent - Ensures all services follow the same conventions
-
Interactive Setup - Answer configuration questions interactively
-
Answers Storage - Project variables are saved in
.copier-answers/*.yamlfiles -
Smart Updates - Run an update goal (e.g.,
copier-update) to merge new template changes without losing customizations -
Conflict Resolution - Copier intelligently merges updates while preserving your modifications
Getting Started
-
Install Copier via pip, Docker, or Maven
-
Choose a template guide:
-
DevOps Template - Kubernetes, Skaffold, Kustomize
-
Backstage Template - Catalog entries, documentation
-
Quick Reference
# Initial setup
copier copy https://coderepo.mobilehealth.va.gov/scm/ckm/ngss-devops-template.git .
# Update existing project
copier update -a .copier-answers/devops.yaml
# Check for updates
copier check-update -a .copier-answers/devops.yaml .
# Re-prompt specific questions
copier update --ask version -a .copier-answers/devops.yaml
The filegen Maven plugin provides similar functionality with goals like filegen:copier-init and filegen:copier-update. See Filegen 6 Migration Guide for details.
|
See Installation Guide for setup instructions including trust configuration and troubleshooting.