Development Environments and Stages

Motivation: To manage various development stages in HelixML, including local development, testing, and production environments.

Environments

The following environments are used in HelixML:

  • Local: Used for development and debugging.
  • Testing: Used for running tests and validating code changes.
  • Staging: Used for testing deployments before they are released to production.
  • Production: Used for serving live traffic.

Stages

Each environment can be configured with different stages:

  • Development: The default stage used for local development.
  • Testing: The default stage used for testing environments.
  • Staging: The default stage used for staging environments.
  • Production: The default stage used for production environments.

Configuration

The configuration for each environment and stage is defined in the config.yaml file.

# Configuration for the local development environment
          local:
            stage: development
          
          # Configuration for the testing environment
          testing:
            stage: testing
          
          # Configuration for the staging environment
          staging:
            stage: staging
          
          # Configuration for the production environment
          production:
            stage: production
          

Example Usage

Local Development:

# Set the environment to "local"
          export HELIX_ENV=local
          
          # Run the application
          helix run
          

Testing:

# Set the environment to "testing"
          export HELIX_ENV=testing
          
          # Run the tests
          helix test
          

Staging:

# Set the environment to "staging"
          export HELIX_ENV=staging
          
          # Deploy the application
          helix deploy
          

Production:

# Set the environment to "production"
          export HELIX_ENV=production
          
          # Deploy the application
          helix deploy
          

Notes

  • The HELIX_ENV environment variable can be used to set the environment.
  • The HELIX_STAGE environment variable can be used to set the stage.
  • The config.yaml file can be used to override the default environment and stage settings.
  • The helix command provides a variety of commands for working with different environments and stages.

References: