- Development: Deploy and iterate quickly using the mogenius UI.
- Staging and Production: Enable GitOps to manage deployments declaratively through Git, with pull request-based reviews for production changes.
Setting up a development environment
Create a workspace
Create a workspace for your development environment. Assign it to the cluster and namespace where your dev workloads should run. See Creating Workspaces.
Deploy your application
Use any of the deployment methods to get your application running:
- Container images for deploying from a registry.
- Pipeline starters for CI/CD from a Git repository.
- Helm charts for chart-based deployments.
Configure deployment settings
Set up environment-specific configuration for your dev environment: environment variables, resource limits, health checks, and scaling. See Deployment Configuration.
Iterate and test
Use the built-in monitoring and logs to debug and iterate on your application. The mogenius UI allows you to make changes and see results quickly without needing to manage YAML files or kubectl commands.
Enabling GitOps for environment promotion
Once your application is working in development, enable GitOps to version-control your configurations and promote them to other environments.Enable GitOps on your cluster
Navigate to your cluster settings and enable GitOps. This installs ArgoCD and Sealed Secrets on your cluster and connects a GitHub repository. See GitOps setup.
Create a GitOps application
Add your development deployments to a GitOps application. mogenius automatically generates the Kubernetes manifests and commits them to your Git repository. You now have a versioned, declarative representation of your application.
Creating staging and production environments
With your application manifests in Git, you can set up additional environments using GitOps.Staging environment
Create a separate workspace with its own namespace for staging. Use GitOps to deploy from the same Git repository, ensuring consistency between development and staging. Adjust environment-specific settings (environment variables, resource limits, replica counts) as needed for the staging context.Production environment
For production, use GitOps with pull request-based commit behavior. This ensures that every change to your production configuration goes through a review process before being applied. To enable this:- In your cluster’s GitOps settings, activate the toggle for creating pull requests instead of direct commits.
- When changes are made, mogenius creates a pull request in your Git repository.
- Team members review and approve the pull request.
- Once merged, ArgoCD syncs the changes to the production cluster.
Managing environment-specific configurations
When running multiple environments, keep these practices in mind:- Use separate namespaces for each environment to isolate resources and prevent conflicts.
- Environment variables: Set different values per environment (e.g., database URLs, API endpoints, feature flags) in each workspace’s deployment settings.
- Resource limits and scaling: Development environments typically need fewer resources and replicas than production. Configure appropriate resource limits and scaling per environment.
- Secrets: Manage environment-specific secrets through the Secrets & Configs page in each workspace. When GitOps is enabled, secrets are encrypted with Sealed Secrets before being committed to Git.
- Workspaces as team boundaries: Use workspace roles to control who can make changes in each environment. For example, give developers editor access to dev but only viewer access to production.