jenkins-x / enhancements

Repository containing design proposals for Jenkins X enhancements
12 stars 16 forks source link

Feature preview environments #41

Open rawlingsj opened 4 years ago

rawlingsj commented 4 years ago

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

jstrachan commented 4 years ago

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 commented 4 years ago

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

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

rawlingsj commented 4 years ago

@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 commented 4 years ago

@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 commented 3 years ago

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 commented 3 years ago

/remove-lifecycle stale