Creating an Environment
Creating additional environments for your application allows you to set up staging, development, or feature-specific instances that operate independently from your production environment. The process builds upon your existing application configuration while allowing environment-specific customizations.
Getting Started
To create a new environment for an existing application:
- Navigate to your Applications list and find the application
- Click the “Manage Environments” button for that application
- Look for the “Create Environment” button on the environment management page
This opens the environment creation form, which is very similar to the application creation process but with some important differences around inheritance and database handling.
Environment Configuration
Environment Name
Choose a descriptive name that clearly indicates the environment’s purpose, such as staging
, development
, feature-testing
, or user-acceptance
. The name should be unique within your application and follow the same naming conventions as applications (lowercase, hyphens allowed).
Configuration Inheritance When creating a new environment, Quant Cloud automatically inherits several configuration elements from your production environment:
- Container specifications and compose definition structure
- Persistent storage volume configurations
- Environment variables and their values
- Scaling settings as a starting point
This inheritance ensures consistency across environments while allowing you to customize settings specific to each environment’s needs.
Task and Container Configuration
The environment creation form includes the same configuration sections as application creation:
Task Architecture and Resources
- CPU architecture (X86_64 or ARM64)
- Total CPU allocation for the environment
- Memory allocation shared across containers
Container Configuration
- Container names, images, and exposed ports
- Mount points for persistent storage
- Resource limits and execution settings
Scaling Configuration
- Minimum and maximum instance counts
- Auto-scaling behavior for the environment
You can adjust these settings to match the environment’s intended use. For example, development environments might use smaller resource allocations to reduce costs, while staging should closely match production specifications.
Automatic Database Provisioning
If your application has a managed database attached, Quant Cloud automatically handles database setup for new environments:
Separate Database Instance Each environment gets its own isolated database instance, ensuring complete separation between environments. This prevents development or staging activities from affecting production data.
Automatic Credentials The system automatically creates unique database credentials (username and password) for each environment and securely stores them as environment secrets. These credentials are automatically injected into your containers, so your application can connect without additional configuration.
Database Configuration The new database instance uses the same engine and basic configuration as your production database, but operates as a completely separate instance with its own storage and backup schedule.
Environment Variables and Secrets
Inherited Configuration Your new environment starts with a copy of all environment variables from the production environment. This provides a consistent baseline configuration that you can then customize as needed.
Environment-Specific Customization After creation, you can modify environment variables and secrets specific to each environment. Common customizations include:
- API endpoints pointing to staging or development services
- Feature flags enabling experimental functionality
- Debug settings for development environments
- Different external service credentials for testing
Secret Management Database credentials and other sensitive configuration are automatically managed as secrets, ensuring secure handling of sensitive information across all environments.
Best Practices for Environment Creation
Resource Sizing Consider the intended use when configuring resources:
- Development: Smaller allocations to reduce costs
- Staging: Match production as closely as possible
- Feature testing: Minimal resources for temporary environments
Naming Conventions Use clear, consistent naming that indicates the environment’s purpose and makes it easy for team members to identify the right environment for their needs.
Database Considerations Remember that each environment will have its own empty database initially. You may need to seed development and staging databases with appropriate test data after creation.
After Environment Creation
Once your environment is created, it will appear in your applications list with its own status indicator and management options. You can then:
- Deploy your application code to the new environment
- Customize environment variables and secrets as needed
- Set up any environment-specific integrations or configurations
- Begin using the environment for its intended purpose
The new environment operates completely independently, allowing you to develop, test, and experiment without any impact on your production environment or other environments within the same application.