@armyknife/backstage-installer
v0.1.0
Published
CLI tool for installing and configuring Armyknife Backstage packages
Maintainers
Readme
Armyknife Backstage Installer
A command-line tool for installing and configuring Armyknife Backstage packages.
Features
- Interactive installation of Armyknife Backstage packages
- Automatic configuration of app-config.yaml
- Updates to necessary app files (App.tsx, apis.ts, scaffolder.ts)
- Verification of installation and configuration
- Support for GitHub and GitLab authentication and templates
Available Packages
- @armyknife/backstage-github-auth: GitHub authentication provider for Backstage
- @armyknife/backstage-gitlab-auth: GitLab authentication provider for Backstage
- @armyknife/backstage-github-template: GitHub repository template creation for Backstage
- @armyknife/backstage-gitlab-template: GitLab repository template creation for Backstage
Installation
# Install globally
npm install -g @armyknife/backstage-installer
# Or use npx
npx @armyknife/backstage-installerUsage
Installing Packages
# Interactive mode
armyknife-backstage install
# Install specific packages
armyknife-backstage install --github-auth --github-template
# Install all packages
armyknife-backstage install --all
# Install in a specific Backstage app directory
armyknife-backstage install --path /path/to/backstageConfiguring Packages
# Interactive mode
armyknife-backstage configure
# Configure specific packages
armyknife-backstage configure --github-auth
# Configure all installed packages
armyknife-backstage configure --allUpdating Packages
# Update all installed packages
armyknife-backstage updateVerifying Installation
# Verify installation and configuration
armyknife-backstage verifyHow It Works
The installer performs the following steps:
Installation:
- Detects your Backstage app
- Installs the selected packages using your package manager (npm or yarn)
- Copies configuration templates to your app
Configuration:
- Prompts for necessary credentials and settings
- Updates your app-config.yaml with the provided values
- Ensures environment variables are properly set up
App Integration:
- Updates App.tsx to include authentication providers
- Updates apis.ts if present
- Updates scaffolder.ts to include template actions
Verification:
- Checks that all packages are properly installed
- Verifies configuration in app-config.yaml
- Ensures app files are correctly updated
Security Features
The GitHub template package includes support for:
- Branch protection rules
- Security scanning (CodeQL, SAST, dependency scanning, container scanning)
- Dependency updates via Dependabot
- Comprehensive security documentation
- CODEOWNERS file for code ownership
- GitHub issue and PR templates with security considerations
- GitHub Actions workflows for CI/CD with security checks
Best Practices
When using the GitHub template package:
- Use standard github.com domain in all URLs and annotations
- Use the standard github.com/project-slug annotation format in catalog-info.yaml
- For testing templates without GitHub integration, replace publish and register steps with debug:log actions
- Simplify GitHub Actions workflows to avoid potential issues with complex configurations
- Ensure all template variables are properly interpolated in YAML files
License
Apache-2.0
