Myths Around Preview Environments
Preview environments are rapidly becoming a crucial part of the development experience when building cloud native applications. They provide everyone in your organization a way to see new features, test bug fixes, and provide early feedback by deploying the changes in a Pull Request before it gets merged. In the previous article, we looked at four reasons Preview environments are a must-have for platform and development experience organizations looking to boost developer productivity. This time, we will debunk some of the common myths associated with them, which will help us understand their utility even better!
One of the most common myths surrounding preview environments is that they are only useful when working on frontend applications. However, this is not true. Preview environments can be used to deploy any or all of the microservices that make up your application.
For instance, let's assume you're working on a backend API, and you've added code for a new endpoint in your latest pull request. Preview environments deploy this change to the API and provide you with a link that you can share with other teams in your organization that consume this API. This allows them to test and verify if the changes you've made are compatible with existing systems or not. This provides an excellent way to receive feedback from all the teams that could be affected by this API change! So, if you're working on cloud-native applications, you can rest assured that your team will benefit greatly from the use of preview environments.
Another common myth regarding preview environments is that they are costly to set up and maintain. This is not entirely true. While setting up preview environments may require some initial investment, they are not as expensive as most people believe. Since they follow the lifecycle of a pull request (PR), they are only active until the PR is up and are deleted as soon as the PR is merged or closed. This ensures that cloud resources are utilized in a cost-effective manner. In fact, preview environments can save money in the long run by helping identify potential issues early on, which can ultimately save both time and money.
Some people believe that setting up preview environments is a complicated process that requires a lot of configuration. However, Okteto's Preview Environments are very simple to set up. If you're already using Okteto's Development Environments, you just need to create the YAML file for the Preview Environments GitHub Action (or create a GitLab CI/CD job), and you're good to go! If you're not already using Development Environments, you'll have to perform just one additional step of writing your Okteto Manifest. This is also a very simple process since it relies on the same manifests you already use in production (Helm charts, Kustomize, Docker Compose, etc.). You won't need to write any additional configuration files or create any infrastructure or cloud resources! Detailed instructions on how to set up Preview Environments can be found in our documentation.
Preview Environments are an invaluable tool for developers, but they are not limited to this group alone. Anyone in an organization can access the endpoints provided by Preview Environments, making them an excellent way to receive feedback from all teams, including sales, marketing, and design, that could be affected by a change.
For example, product managers can use Preview Environments to see how new features will look and function and provide feedback on their user experience. With Preview Environments, a product manager can test how a new feature will integrate with the current product and provide feedback on potential improvements or changes that could be made to improve the user experience.
Preview environments also provide a way for non-engineering stakeholders to understand the changes being made in a pull request. This doesn't have to be limited to people in your own organization. You can even choose to share the endpoints with some of your users or customers to give them a sneak peek of a coming feature or to get feedback from them as well!
There is a common misconception that the endpoints provided by Preview Environments can be accessed by unauthorized parties, potentially leading to breaches. This couldn’t be farther away from the truth. Okteto's Preview Environments have the same level of security as production or staging environments. You can easily restrict access to published endpoints on pull requests by configuring Private Endpoints. This ensures that only people with access to your Okteto namespace can access the endpoints, and they will need to provide their credentials before being granted access.
Preview Environments can be very beneficial, regardless of the number of microservices that compose your applications. If your application has a large number of microservices, then it's a no-brainer that Preview Environments will be useful. It becomes very difficult to see the impact of changes in a pull request on the whole application without the endpoints provided by Preview Environments.
But even if you're working on a project with just two or three microservices, the core benefit they provide is still relevant: early feedback from everyone on your team. Even in small projects, non-software engineering teams are almost always left out of the review process. Preview environments help fix that by deploying the changes in pull requests and providing endpoints that anyone can access to review and provide feedback!
Preview environments are an incredibly valuable tool in the modern application development lifecycle. Not only do they enable all team members across your development team and company to be a part of the feedback process, but they also allow developers to receive early feedback on their work. By providing a quick and easy way to see and test changes, preview environments can help reduce the number of bugs and errors that make it into the final release. In this article, we have discussed some common misconceptions associated with preview environments and have demonstrated just how valuable they can be in helping to ship applications faster. If you are a platform or development experience engineer, the free tier of Okteto is a great place to get started to learn how to enhance your development experience with Preview Environments. To get set up, follow the quick and easy steps outlined in our guide or you can follow along with our video tutorial: