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.xml and 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/*.yaml files

  • 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

  1. Install Copier via pip, Docker, or Maven

  2. Choose a template guide:

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.