Closed costrouc closed 1 year ago
@nebari-dev/core-team - Please take a look and share your thoughts over the coming days, so we can decide in the team meeting on Tuesday the 22nd of August. :)
I know we had a discussion around trying to deploy a dev and prod Nebari cluster into a single kubernetes cluster but I would recommend against that. Nebari deploys cloud resources that, if modified, can potentially impact the entire cluster which could take down the production environment.
So two distinct clusters, deployed in a gitops manner. As I see it, it might be as simple as writing a workflow that copies over the production nebari-config.yaml into a separate folder (as Chris mentioned), modify the name/namespace and deploy. It might also be worth tying in a way to delete the dev cluster after the team has tested it.
@iameskild I believe that the discussion about multiple deployment using the same Kubernetes cluster is out of scope for this RFD. This should be addressed in a separate issue as something that nebari in general need to support.
An issue we agreed that should be included in this is a reliable destroy github/gitlab actions workflow https://github.com/nebari-dev/nebari/issues/1680
This has been open for feedback for a while, we'll discuss and vote on this in today's Nebari community meeting.
On discussion, we realized this is a documentation issue. The current setup with different repos for dev/staging/prod works with the most flexibility, but needs to be documented to be useful for more folks. @pavithraes Will open the docs issue, and then close this one.
RFD Resolution: Declined.
However, it was also observed that the multiple YAML workflows described here will be helpful in the case of multiple Nebari deployments using the same Kubernetes cluster - we'll track that in a new RFD.
Thank you, @costrouc for all your work creating and discussing this RFD!
Title
Support gitops staging/development/production deployments
Summary
This RFD is constructed from issue https://github.com/nebari-dev/nebari/issues/924. We need to have the ability to easily deploy several nebari clusters to respresent dev/staging/production etc within a gitops model. Whatever solution we adopt it should be backwards compatible and easy to adopt.
User benefit
There are several benifits:
Design Proposal
I propose using folders for the different nebari deployments. The current folder structure is:
For backwards compatibility we keep this structure and add new namespaced ones based on the filename extension.
For example
nebari-config.dev.yaml
would imply the following files are writtenThe github/gitlab workflows will be templated to watch and trigger only on updates to the specific files for that environment. This approach is independent of git branching.
Alternatives or approaches considered (if any)
dev -> staging -> prod
is not always how changes flow. It is also hard to compare production vs. dev side by side without diffs.Best practices
This would provide an easy way for users to have different deployments on the same git repository.
User impact
This change would not affect any existing nebari deployments as far as I am aware and would be backwards compatible.
Unresolved questions
Gitlab doesn't support multiple files for CI it wants a single entrypoint
.gitlab-ci.yml
. Pipelines would allow us to do this but then the separate stages will have to all write to the same gitlab-ci.yml file. This is solvable.