Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature preview environments #41

Open
rawlingsj opened this issue Jul 31, 2020 · 6 comments
Open

Feature preview environments #41

rawlingsj opened this issue Jul 31, 2020 · 6 comments

Comments

@rawlingsj
Copy link
Member

Jenkins X preview environments have always been one of the projects favourite features. The ability to preview an applications changes in an isolated environment before merging to the mainline gives developers faster feedback and reviewers greater confidence that the change does what's expected.

Questions we always get about preview environments are "how to I use a database in my preview environment?" or "how can I test against other microservices?". The advice here is to deploy a copy of what you need into your preview environment or link to services running in your staging environment.

This has worked great when working on a single application but often developers are working on a feature that span multiple microservices. You'd want to preview your changes along with others microservices for the same feature which means today you would need to deploy them in your preview environment and yours in theirs, manually keeping them up to date as more commits land in the PR. You don't want to use the staging environment as your not sure how they behave together and with trunk based development you would want code merged to mainline to be shippable. If you find an issue in staging then that can prevent other fixes going in until you revert your change.

This issue proposes the concept of "feature preview environments". A super easy way for developers to create a short term environment backed by gitops for deployment automation where multiple microservices can be previewed and tested together from changes to pull requests from multiple application git repos. Once the feature is ready an approved would merge and release the microservices together and promote the feature into staging / production.

This would mean Jenkins X supports

  • application previews (environment git repo is under the single applications charts/preview directory as it is today)
  • feature previews (environment git repo is separate much like a staging or production one where multiple applications can promote a pull request change into)
@jstrachan
Copy link
Member

as part of #38 we've got lovely new helmfile based preview environments now when using Jenkins X 3.x

it would be awesome to look at adding terraform based previews too which would really help give feature preview environments (and previews of staging/production environments)

@vbehar
Copy link
Contributor

vbehar commented Sep 11, 2020

@rawlingsj it would be awesome to have native support for that in JX.

Right now we're solving this using Helmfile-based previews:

  • we have a specific git repo with high-level tests
  • in this repo, we have a preview folder with an helmfile.yaml referencing multiple components, with specific versions. Either released versions, or non-released versions (published as snapshot in a container & helm repository)
  • so people can create a PR in this repo, adjusting the helmfile.yaml to target the right set of versions, and have the tests executed on them (in a specific namespace in the cluster)

@rawlingsj
Copy link
Member Author

@vbehar yeah that sounds ideal for this. With a combination of the jx 3 work and your approach I think we're pretty close to being able to have that as a native jx feature that is BDD tested with every release. This is great!

@sladyn98
Copy link

@vbehar This is a pretty good feature to be able to view previews while developing. Much like a sandbox. Is the development actively being tracked in a PR. Would love to be able to add support for terraform or help in existing development

@jenkins-x-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

@rawlingsj
Copy link
Member Author

/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants