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
The Top 10 Porter Alternatives: Finding a More Flexible DevOps Platform

Looking for a Porter alternative? Discover why Qovery stands out as the #1 choice. Compare features, pros, and cons of the top 10 platforms to simplify your deployment strategy and empower your team.

Mélanie Dallé
Senior Marketing Manager
AWS
Deployment
 minutes
AWS App Runner Alternatives: Top 10 Choices for Effortless Container Deployment

AWS App Runner limits control and locks you into AWS. See the top 10 alternatives, including Qovery, to gain crucial customization, cost efficiency, and multi-cloud flexibility for containerized application deployment.

Mélanie Dallé
Senior Marketing Manager
Kubernetes
 minutes
Kubernetes Management: Best Practices & Tools for Managing Clusters and Optimizing Costs

Master Kubernetes management and cut costs with essential best practices and tools. Learn about security, reliability, autoscaling, GitOps, and FinOps to simplify cluster operations and optimize cloud spending.

Mélanie Dallé
Senior Marketing Manager
AWS
GCP
Azure
Cloud
Business
10
 minutes
10 Best AWS Elastic Beanstalk Alternatives

AWS Elastic Beanstalk is often rigid and slow. This guide details the top 10 Elastic Beanstalk alternatives—including Heroku, Azure App Service, and Qovery—comparing the pros, cons, and ideal use cases for achieving superior flexibility, faster deployments, and better cost control.

Morgan Perry
Co-founder
Kubernetes
DevOps
7
 minutes
Kubernetes Cloud Migration Strategy: Master the Shift, Skip the Disaster

Master your Kubernetes migration strategy with this expert guide. Learn the critical planning phases, mitigate major risks (data, security, dependencies), and see how Qovery simplifies automation and compliance for a fast, successful, and reliable transition.

Morgan Perry
Co-founder
SecurityAndCompliance
DevSecOps
 minutes
Qovery Achieves SOC 2 Type II Compliance

Qovery is officially SOC 2 Type II compliant with an Unqualified Opinion. Get the highest assurance of continuously verified security controls for enterprise-grade application deployments and simplify due diligence.

Pierre Mavro
CTO & Co-founder
Product
Observability
 minutes
Troubleshoot Faster with the New Log Search and Filtering in Qovery Observe

Following the launch of Qovery Observe, we’re progressively adding new capabilities to help you better monitor, debug, and understand your applications. Today, we’re excited to announce a major improvement to the Logs experience: you can now search and filter directly within your application logs.

Alessandro Carrano
Lead Product Manager
Platform Engineering
DevOps
Terraform
7
 minutes
Top 5 Crossplane Alternatives & Competitors

Go beyond Crossplane. Discover Qovery, the #1 DevOps automation tool, and 4 other IaC alternatives (Terraform, Pulumi) for simplified multi-cloud infrastructure management and deployment.

Morgan Perry
Co-founder

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.