The Do's and Don'ts of Ephemeral Environments
Data
❌ Don't store critical data in ephemeral environments!
When an ephemeral environment is deleted, all its resources, including persistent volumes, are deleted. Uffizzi ephemeral environments are intended for development and testing, not production.
✅ Do seed test data when the environment is created
When adding data to an ephemeral environment you should seed it on start up (See Database Seeding). Any data that should persist beyond the lifecycle of an ephemeral environment, should be store it outside the environment, such as in object (bucket) storage.
External Services (Stateful)
❌ Don't manipulate stateful external services from ephemeral environments!
If in every ephemeral environment you're writing to or deleting from external databases, queues, and other stateful external services, you're going to have a mess on your hands. Even if you're careful, you can't be sure if other team members are manipulating the same services. It's best to limit your interactions to stateless services, or at least perform read-only operations on the external stateful services.
✅ Do create mock services or internal copies of stateful services
If you need to manipulate stateful services, you should mock the service or create a copy
that is internal to your environment, such as with containerized databases, so
they are isolated from other team member environments.
Production
❌ Don't use ephemeral environments for production or persistent hosting!
Uffizzi ephemeral environments are intended for development and testing purposes only. In addition to providing no gaurantees of availability, Uffizzi environments sleep by default after a period of inactivity (See Uffizzi Cloud and our pricing plans (opens in a new tab) for details.). Additionally, Uffizzi environments have default resource limits, depending on your plan, so they may not scale to meet production demands.
✅ Do use ephemeral environments for development and testing
Use Uffizzi dev clusters for continuous development and deployment and virtual clusters to test pre-production releases or against different versions of Kubernetes.
CI Pipelines
✅ Do configure Uffizzi with your CI platform
In addition to creating ephemeral environments from the Uffizzi CLI, you can also add Uffizzi to your GitHub Actions, GitLab CI, or other CI platform. This will allow you to create ephemeral environments every time a team member opens a pull request. Incorporating Uffizzi in your CI process has many benefits including the ability to paralellize automated tests and avoid the flakiness and resource contraints of running CI tests in pipeline runners. See our CI guides for detailed integration instructions.
❌ Don't forget to update and delete ephemeral environments from your CI pipeline!
Be sure to add a job to your pipeline that watches for new push events and pull request close events, so your ephemeral environments are updated or deleted as necessary.