Blog
Product
Qovery
5
minutes

5 Simple Steps to Create Preview Environments on AWS with Qovery

The process of software development has changed radically. Development is fast-paced and needs testing and staging environments to reflect production accurately. Still, achieving this can be a significant operational hassle. Most engineering teams use a single staging environment, making it hard for developers to test their changes in isolation. That’s where Qovery’s Preview Environments comes in, solving this problem by automatically creating a clone of your production environment (including applications, databases and configuration) on every pull request, so you can test your changes confidently without affecting your production. We have built the dream feature for any team of developers, and I will walk you through exactly how to implement and create Preview Environments on AWS with Qovery in 5 simple steps.
Albane Tonnellier
Product Marketing Manager
Summary
Twitter icon
linkedin icon

Key advantages of using Qovery Preview Environments

Before diving into details and explaining how to use the preview environments on Qovery, let’s talk through some of the main reasons engineering teams use Preview Environments. Let me unpack the three big reasons:

Increased efficiency of DevOps

Replicating a production environment containing complex configuration, infrastructure components like load balancers, Kubernetes cluster, firewall, etc., takes a considerable amount of time and can lead to errors. Also, while staging is a replica of production, still, data, infrastructure, and configuration will be slightly different. Having the ability to automate environments by using the Preview Environments can give your distributed teams the ability to spin up and decommission the environments as needed, accelerating time to market.

Increased development speed

Preview Environments improve your overall development speed. As you can quickly spin up new environments for each pull request, testing can be performed in isolation without interfering with other environments, and can quickly roll out your releases.

Reduced cost

First, you will save valuable time spent on the manual setup of the environment. Then, Qovery keeps your preview environments up to date on every commit and automatically destroys them when the original pull request is merged or closed. You can also set up an expiry time to automatically clean up preview environments after a period of inactivity. That way, you can achieve not only scalability but improved cost control.

If you want to know more about the best use cases for Preview Environments, here is a great article for you!

5 easy steps to create preview environments on Qovery

Managing Preview Environments has never been that simple! Before we dive in, let’s assume the following:

If all of those are done, let’s begin:

Step 1: Create a “Blueprint” environment

Even if not required, we recommend creating an environment that will serve as a root to create your Preview Environments. The idea is to keep this environment as a template of a fully working environment. This environment should not be directly used. This is what we call a "blueprint environment". To see how it works on the console, head to this tutorial.

Step 2: Enable Deployment Environment feature

Now, you can go to turn on Preview Environments in three simple steps:

  1. Click on your Blueprint environment "Settings".
  2. Click on the Preview Env. tab
  3. Turn on the Preview Environment feature for all your applications by clicking on Activate preview environment for all apps.

Now that you have turned on the Preview Environment feature, you need to change the base branch from your applications inside your Blueprint Environment. Let's say, every new feature branch you create are coming from staging. Then you will need to change all your applications to target the staging branch, to see how it’s done, here is a video explaining you everything.

Here is a flow example showing what happens when you create a new Pull Request from a feat/xxx branch that has been created from the base branch staging.

Preview Environment Branching

Step 3: Validate your Blueprint Environment

Before creating a Preview Environment, ensure your blueprint is ready by deploying it. Once the deployment is done and all the light green, you know everything is running smoothly. You can then stop it immediately and stop the auto-deploy inside the deployment settings so that when you push something on the staging branch or any other branch used by the Blueprint environment, this environment won’t be triggered.

Step 4: Create a Preview Environment

To create a Preview Environment, the steps are very easy as Qovery take care of cloning all your services and the configuration as well (Environment Variables and Secrets included), everything is done in three simple steps:

  1. Checkout your staging branch.
  2. Create a branch test_qovery_preview_environment and push it.
  3. Create a Pull Request/Merge Request.

You must see a new environment appearing in your environment list on Qovery. Wait until it is fully deployed, then you will be able to connect to it. This environment is fully isolated from your base environment.****

If you want to watch it in action, here is the video tutorial made for you.

Step 5: Delete a Preview Environment

To delete you need to merge the Preview Environment branch you created into staging. You also have the ability to delete it manually on Qovery.

If you want to see how it’s done in two minutes, here is a small video tutorial 👇🏻

To illustrate the environment flow; we made this schema to help you understand what is going on when you use the preview environment feature with Qovery

Preview Environment Flow

Wrapping up

We hope that after this article, preview environments have no more secrets for you and in case you want to know every detail, you can check out the documentation and even watch a demo here.

Eager to know how to go integrate Qovery Preview Environments with your CI and much more? We have an Advanced Preview Environment guide coming soon. In this advanced guide we will cover a wide range of topics such as “Auto-stop and start your Preview Environment”, “Seed your Preview Environment database”, “Integrate your CI (Continuous Integration) platform” and much more, and if you feel like preview environment is the feature you need, try it now!

Share on :
Twitter icon
linkedin icon
Ready to rethink the way you do DevOps?
Qovery is a DevOps automation platform that enables organizations to deliver faster and focus on creating great products.
Book a demo

Suggested articles

DevOps
 minutes
TPUs vs. GPUs: The DevOps Guide to AI Hardware Selection

Stop guessing on AI hardware. This DevOps guide details when to use TPUs vs. GPUs for optimal performance, cost, and framework compatibility in MLOps.

Mélanie Dallé
Senior Marketing Manager
Cloud
Business
10
 minutes
The DevOps Guide to Docker Monitoring: Tools, Best Practices, and Unified Observability

Stop tool sprawl. Compare top Docker monitoring tools (Prometheus, Datadog, Qovery) and learn how unified observability simplifies K8s debugging and speeds up feature delivery.

Romaric Philogène
CEO & Co-founder
Cloud
Heroku
Internal Developer Platform
Platform Engineering
9
 minutes
The Top 8 Tools to Build a Zero-Toil PaaS on Your Cloud

Stop managing K8s complexity. Discover the top 8 platform tools (Qovery, Rancher, Dokku) that let you build a customizable, zero-maintenance PaaS on your cloud.

Morgan Perry
Co-founder
Kubernetes
 minutes
How to Deploy a Docker Container on Kubernetes: Step-by-Step Guide

Simplify Kubernetes Deployment. Learn the difficult 6-step manual process for deploying Docker containers to Kubernetes, the friction of YAML and kubectl, and how platform tools like Qovery automate the entire workflow.

Mélanie Dallé
Senior Marketing Manager
Observability
DevOps
 minutes
Observability in DevOps: What is it, Observe vs. Monitoring, Benefits

Observability in DevOps: Diagnose system failures faster. Learn how true observability differs from traditional monitoring. End context-switching, reduce MTTR, and resolve unforeseen issues quickly.

Mélanie Dallé
Senior Marketing Manager
DevOps
Cloud
8
 minutes
6 Best Practices to Automate DevSecOps in Days, Not Months

Integrate security seamlessly into your CI/CD pipeline. Learn the 6 best DevSecOps practices—from Policy as Code to continuous monitoring—and see how Qovery automates compliance and protection without slowing development.

Morgan Perry
Co-founder
Heroku
15
 minutes
Top 10 Heroku Alternatives: When Simplicity Hits the Scaling Wall

Escape rising Heroku costs & outages. Compare top alternatives that deliver PaaS simplicity on your own cloud and scale without limits.

Mélanie Dallé
Senior Marketing Manager
Product
Infrastructure Management
Deployment
 minutes
Stop tool sprawl - Welcome to Terraform/OpenTofu support

Provisioning cloud resources shouldn’t require a second stack of tools. With Qovery’s new Terraform and OpenTofu support, you can now define and deploy your infrastructure right alongside your applications. Declaratively, securely, and in one place. No external runners. No glue code. No tool sprawl.

Alessandro Carrano
Head of Product

It’s time to rethink
the way you do DevOps

Say goodbye to DevOps overhead. Qovery makes infrastructure effortless, giving you full control without the trouble.