-
Notifications
You must be signed in to change notification settings - Fork 13
Add deployment profiles #184
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
- Add profiles/ directory with demo, production, and development profiles - Enhance deploy_fly.sh with --profile flag support - Add profile merging with .env precedence (secrets preserved) - Support ANOMSTACK__<BATCH>__<PARAMETER> environment variable overrides - Enable environment-specific configurations without modifying examples
- Add fly-preview-demo, fly-preview-production, fly-preview-development - Add fly-deploy-demo, fly-deploy-production, fly-deploy-development - Enable easy deployment with: make fly-deploy-demo
- Add docs/docs/deployment/profiles.md with complete guide - Update fly.md with profiles reference - Add configuration management section to overview.md - Fix sidebar positions and typos in docker.md and gcp.md - Document profile composition, precedence, and workflows GIT_VALID_PII_OVERRIDE
|
Caution Review failedThe pull request is closed. WalkthroughThis change introduces a deployment profiles system for Anomstack, adding new profile-based environment files and corresponding documentation. The deployment scripts and Makefile are updated to support specifying profiles for Fly.io deployments, enabling environment-specific configuration overlays. Documentation is expanded to describe usage, configuration precedence, and best practices for deployment profiles. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant DeployScript as deploy_fly.sh
participant Profiles
participant FlyIO
User->>Makefile: make fly-deploy-demo
Makefile->>DeployScript: ./scripts/deployment/deploy_fly.sh --profile demo
DeployScript->>Profiles: Load demo.env, merge with .env
DeployScript->>FlyIO: Deploy using merged environment
FlyIO-->>DeployScript: Deployment result
DeployScript-->>User: Output applied profile and result
sequenceDiagram
participant User
participant Makefile
participant PreviewScript as preview_fly_secrets.sh
participant Profiles
User->>Makefile: make fly-preview-production
Makefile->>PreviewScript: ./scripts/deployment/preview_fly_secrets.sh --profile production
PreviewScript->>Profiles: Merge production.env with .env
PreviewScript->>User: Output merged environment variable preview
Estimated code review effort3 (~40 minutes) Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (12)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 pull request introduces deployment profiles for Anomstack, enabling environment-specific configurations without modifying original metric batch examples. The feature provides a clean separation between secrets (in .env) and environment-specific configurations (in profiles), similar to Helm values files.
- Enhanced deployment scripts to support profile-based configurations with
--profileflag - Added comprehensive documentation for deployment profiles concept and usage
- Created three default profiles (demo, production, development) with appropriate configurations
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/deployment/deploy_fly.sh |
Enhanced deployment script with profile support and configuration merging |
scripts/deployment/preview_fly_secrets.sh |
Added profile preview functionality matching deploy script behavior |
profiles/*.env |
Created demo, production, and development profile configurations |
profiles/README.md |
Added comprehensive profile documentation and usage examples |
docs/docs/deployment/profiles.md |
Created detailed deployment profiles guide with examples and best practices |
docs/docs/deployment/*.md |
Updated deployment documentation to reference profiles feature |
Makefile |
Added profile-specific deployment and preview targets |
Comments suppressed due to low confidence (1)
docs/docs/deployment/gcp.md:1
- There is a typo in 'Goolge'. It should be 'Google'.
---
| else | ||
| # Run the standard preview | ||
| preview_env_vars_from_file ".env" | ||
| fi |
Copilot
AI
Jul 22, 2025
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.
There is an extra space after 'fi'. It should be 'fi' without trailing whitespace.
| fi | |
| fi |
| # Clean up temporary file if we created one | ||
| if [[ -n "$TEMP_ENV_FILE" && -f "$TEMP_ENV_FILE" ]]; then | ||
| rm "$TEMP_ENV_FILE" | ||
| echo "🧹 Cleaned up temporary configuration file" | ||
| fi |
Copilot
AI
Jul 22, 2025
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.
[nitpick] The cleanup logic checks if TEMP_ENV_FILE is non-empty and exists, but TEMP_ENV_FILE is only set when a profile is used. Consider moving this cleanup inside the profile conditional block for clearer logic flow.
| # Clean up temporary file if we created one | |
| if [[ -n "$TEMP_ENV_FILE" && -f "$TEMP_ENV_FILE" ]]; then | |
| rm "$TEMP_ENV_FILE" | |
| echo "🧹 Cleaned up temporary configuration file" | |
| fi | |
| # (This block will be moved to the appropriate location within the profile-related logic.) |
📊 Test Coverage ReportCoverage: 59% (yellow) ✅ Coverage maintained or improved!
|
This pull request introduces a new feature called "Deployment Profiles" for managing environment-specific configurations in Anomstack, along with updates to the documentation and deployment scripts to support this feature. The changes improve flexibility, maintainability, and usability for deploying to different environments such as demo, production, and development.
Deployment Profiles Feature:
MakefileUpdates: Added new targets (fly-preview-demo,fly-preview-production,fly-preview-development,fly-deploy-demo,fly-deploy-production,fly-deploy-development) to support deployment profiles for Fly.io. These allow environment-specific previews and deployments. [1] [2]docs/docs/deployment/profiles.mdto provide a comprehensive guide on deployment profiles, including benefits, usage, and examples for demo, production, and development environments.profiles/README.mdfile to document available profiles and how to use them, along with example configurations for demo, production, and development.Documentation Enhancements:
docs/docs/deployment/fly.mdto include a new section on deployment profiles, with quick examples and a link to the detailed guide.docs/docs/deployment/overview.md, highlighting its compatibility with Fly.io, Docker, and custom deployments. [1] [2]docker.md,gcp.md). [1] [2]These changes make it easier to manage deployments across multiple environments while maintaining clean and reusable configurations.
Summary by CodeRabbit
New Features
Documentation
Chores