-
Notifications
You must be signed in to change notification settings - Fork 1
Add CTFp CLI tool #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ials in template.tfvars
…ions in automated setup template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a CTFp CLI tool that automates the deployment and management of CTF platform components. The tool provides a command-line interface for initializing configurations, generating SSH keys, deploying infrastructure across multiple environments (test, dev, prod), and managing the full lifecycle of cluster, ops, platform, and challenges components.
Key changes include:
- New Python-based CLI tool (ctfp.py) with commands for init, deploy, destroy, and key generation
- Automated configuration template (template.automated.tfvars) consolidating all deployment variables
- Refactored backend generator to integrate with the CLI tool
- Variable renaming from fluentd to filebeat for consistency
- Terraform variable default value corrections and type fixes
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 32 comments.
Show a summary per file
| File | Description |
|---|---|
| ctfp.py | Main CLI tool implementation with deployment automation, workspace management, and configuration handling |
| template.automated.tfvars | Comprehensive configuration template covering cluster, ops, platform, and CTFd settings |
| backend/generate.py | Refactored backend generator to work as both standalone tool and CLI subcommand |
| requirements.txt | Added python-hcl2 dependency for Terraform configuration parsing |
| kubectl.sh | Helper script for setting up kubectl context for different environments |
| kube-config/.gitignore | Ignore pattern for generated kubeconfig files |
| .env.example | Example environment file for AWS credentials |
| platform/variables.tf | Renamed fluentd variables to filebeat, added default for mariadb_version |
| platform/tfvars/template.tfvars | Updated variable names and added ctfd_manager configuration |
| platform/ctfd.tf | Updated to use renamed filebeat variables |
| platform/ctfd-manager.tf | Added GITHUB_USER environment variable configuration |
| ops/variables.tf | Fixed type syntax, corrected descheduler version default, spelling fixes |
| ops/tfvars/template.tfvars | Removed duplicate variables, added GitHub configuration section |
| ops/errors.tf | Improved namespace reference and added explicit dependency |
| ops/descheduler.tf | Fixed Helm chart name specification |
| cluster/tfvars/template.tfvars | Updated server type defaults and challenge node count |
| challenges/variables.tf | Fixed default values from empty list to empty map for challenge variables |
| challenges/challenges-config.tf | Fixed incorrect variable reference for shared_challenges |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ay break shell commands
… add tool checks for dependencies
…by eliminating shell=True
Add automated deployment system, by adding a CTFp CLI tool, that can bootstrap and run the CTFp components.