Blog
Cloud
Business
5
minutes

Why Preview Environments Are The New Thing in DevOps

Consider the scenario where a complex product is being developed by dozens of engineers working on different features of a product. Not only the development environment is the same, but the staging environment is also shared. As different features are merged into the shared environment, they break the code. So QA has to wait until this is fixed. A feature or bug fix may be working perfectly on the developer’s own machine, but there is no way for the QA team to test that one feature in isolation. This problem is intensified when the product has a lot of integrations and different data sources. The DevOps team simply cannot provision so many different environments on time; they will miss the bus. If developers keep using the same shared staging environment, it will take ages to deliver a mature product to the market. This is where the concept of preview environments comes into play. In this article, we will tell you what preview environments are and how they solve the above problems. We will also discuss why so many DevOps teams are adopting it to improve team productivity.
Morgan Perry
Co-founder
Summary
Twitter icon
linkedin icon

What is a Preview Environment?

A preview environment gives you the ability to “preview” the code changes present in a pull request BEFORE you merge it to master, hence the name “preview environment”. It is also coined as an “ephemeral” environment because it is not a permanent environment. It's created temporarily i.e., when a feature is ready to be tested. Then the environment is removed as soon as the feature testing is complete. It is a breakthrough for DevOps because it is provisioned automatically after the one-time setup.

A preview environment is as good as other deployment environments e.g., Production, Staging, etc., because it is equipped with everything needed for proper testing in isolation. That includes infrastructure, updated products, integrations, databases, configuration, etc. A preview environment is better than the traditional deployment environments because it is super easy to provision and de-provision a preview environment.

You can think of a preview environment as a feature-specific version of the staging or production environment, which enables developers, QA engineers, or even product managers to test that feature without worrying about other features being tested. The ability to see the changes in “live” mode before merging to master is a game changer.

Preview environments are ideal when you have an urgent fix for a product defect or you have to deploy multiple improvements to an existing feature. On the other hand, a large feature segregated into smaller chunks probably does not need the preview environment as much.

Now that we know what a preview environment is, let’s discuss how they work.

How Do Preview Environments Work?

A developer is writing code to add a feature in its respective branch. Currently, the code is being committed to the local branch. The name of the branch will be similar to” Feature-MyStore-34” in the case of a feature and “Hotfix-MyStore-598” in the case of a hotfix. As the name of the preview environment is based on the name of the branch, so proper naming of the branch will help you distinguish different preview environments from each other.

Now the magic begins, as soon as the developer pushes the code from the local repo to the remote repo. A preview environment is instantly provisioned, containing everything needed for the smooth testing of that feature. The newly created preview environment will be accessible through a unique URL. Every subsequent push to that branch will be deployed to that preview environment. As soon as the PR for that feature is generated, the QA team can access the URL of the preview environment and will start testing that feature in isolation.

After the testing is completed, PR will be merged into the master. As soon as the PR is merged into master and the feature branch is deleted (We do not want any dangling branches), the preview environment will be removed.

Preview Environments Flow

After discussing how a preview environment actually works, let’s see why engineering teams are adopting it rapidly and how it benefits your product development.

Benefits of Preview Environments

Increased Ownership and Autonomy

Preview environments allow simplified collaboration on the code review. When QA, product managers, and engineers participate in the review process, the sense of ownership is increased. It also results in Cross-functional team members’ autonomy when their feedback is incorporated into the code review process without waiting for DevOps to set up and spin up proper environments.

Shorter Feedback Cycle and Faster Delivery

Preview environments help you run faster feedback cycles, reducing your time to market the product. For a product already in production, the ability to release hotfixes without overriding the staging build is a lifesaver. You can release the next version of your product much quicker now.

Note that you can incorporate the changes before the merge happens and in the same pull request. That means you do not have to wait for a merge to see the changes. This drastically improves the release cycles.

Improve Review Process and Product Quality

Preview environments provide excellent collaboration between manual testers, automation testers, developers, and other stakeholders. This improves the overall review process. As your releases now contain all properly tested and verified features, this results in better product quality.

Preview environments run in isolation, which allows the product team to try innovative ideas and experiments without worrying about the impact on other development work.

Reduce Costs

As the preview environments are ephemeral in nature, they are removed as soon as the PR is merged back into the master branch. This eliminates the need for permanent infrastructure, hence resulting in reduced cost.

The automatic provisioning and de-provisioning of a full-fledged deployment environment reduce much time spent manually setting up the environments. Note that all the preview environments are not the same. The difference in configuration, security, infrastructure, database, etc. makes a real difference whether you provision the environment manually or automatically. Apart from time spent, your bill for the DevOps team drops as well, because the DevOps team spends less effort.

Conclusion

As you can see from above, preview environments greatly benefit engineering teams. At the same time, it adds a burden to the DevOps team because setting up and maintaining preview environments is complex and requires time and resources.

Below, we will describe how Qovery’s DevOps Automation Tool provides the best of both worlds. It provides all the great benefits of preview environments but simultaneously makes the life of the DevOps team easier.

Qovery’s Preview Environments

Preview environments provide compelling features, but unlocking that potential is not easy for the DevOps team. The job of implementing and maintaining the preview environments is tedious. What if you could directly integrate your preview environment with your AWS account and configure it in a few clicks without going into any complexities? Well, this is exactly what Qovery’s preview environments do. Let’s try Qovery’s preview environments by following this step-by-step guide or watch the video below.

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

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
AWS
Platform Engineering
DevOps
9
 minutes
10 Best AWS ECS (Elastic Container Service) Alternatives

Compare the top 10 AWS ECS alternatives, including Qovery, Docker, EKS, and GKE. Find the best solution to simplify Kubernetes, automate DevOps, and achieve multi-cloud container deployment.

Morgan Perry
Co-founder
Platform Engineering
AWS
Kubernetes
DevOps
9
 minutes
10 Best EKS Alternatives: Simplifying Kubernetes for Modern Development

Compare the 10 best EKS alternatives for Kubernetes, including Qovery (IDP), GKE, DOKS, and OpenShift. Simplify operations, reduce costs, and accelerate deployment.

Morgan Perry
Co-founder
DevOps
Kubernetes
Platform Engineering
15
 minutes
Top 10 Openshift Alternatives & Competitors

Because various organizations need cloud application and service management that offers different levels of simplicity, cost-effectiveness, or feature sets than OpenShift, this article will review its top alternatives to help readers make an informed decision aligned with their specific infrastructure needs.

Morgan Perry
Co-founder
AI
Infrastructure Management
Product
5
 minutes
GPU workloads on EKS just got way simpler with Qovery

Running GPU workloads on EKS has never been easy, until now. With Qovery’s latest update, you can enable GPU nodes, configure GPU access, and optimize costs automatically, all without writing a single line of YAML or touching Helm charts. Qovery now handles everything behind the scenes so you can focus entirely on your applications.

Alessandro Carrano
Lead Product Manager
Kubernetes
 minutes
Kubernetes Deployment Strategies: Pros, Cons & Use Cases

Master Kubernetes deployment strategies: Rolling Update, Recreate, Blue/Green, and Canary. Learn the pros, cons, and use cases to choose the right strategy based on your uptime, risk tolerance, and resources. Simplify complex rollouts with automation.

Mélanie Dallé
Senior Marketing Manager

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.