-
Notifications
You must be signed in to change notification settings - Fork 3
docs: added Deployment and migrate via FluxCD #110
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
Open
Hii-Arpit
wants to merge
33
commits into
devtron-labs:main
Choose a base branch
from
Hii-Arpit:deploy-flux
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6ff7f59
docs: add flux deploment
Hii-Arpit 91a8442
docs: enable FluxCD integration
Hii-Arpit 487ea7a
docs: added migrate FluxCD
Hii-Arpit 47211e2
docs: technical fixes
Hii-Arpit f0c7877
docs: content fixed
Hii-Arpit d4441b8
docs: optimised for OSS and enteprise
Hii-Arpit bb52f84
docs: added figure and captions
Hii-Arpit 71d947a
docs: fixes
Hii-Arpit 54cb50a
docs: optimised for gitbook
Hii-Arpit 89b8444
docs: added enterprise tagging
Hii-Arpit 0cb055e
docs: added rbac
Hii-Arpit 589282b
docs: gitbook optimizations
Hii-Arpit 559de95
docs: minor fixes
Hii-Arpit e9b2fde
docs: minor fixes
Hii-Arpit b5b6d0f
Merge branch 'main' of https://github.com/Hii-Arpit/devtron-documenta…
Hii-Arpit 5146e1e
docs: implemented suggestions
Hii-Arpit ba8bc05
docs: implement suggestions v2
Hii-Arpit 33e1429
docs: added images and captions
Hii-Arpit 38c1b63
Merge branch 'main' of https://github.com/Hii-Arpit/devtron-documenta…
Hii-Arpit 1f2d056
docs
Hii-Arpit a7724c0
docs: optimizations for gitbook
Hii-Arpit faed4e6
docs: update summary.md
Hii-Arpit eb76c17
docs: fixes
Hii-Arpit 5a57f33
docs: implmented requested changes
Hii-Arpit f2f9d69
docs: minor fixes
Hii-Arpit 2faafc4
docs: minor fixes
Hii-Arpit adf35ed
docs: fixes links
Hii-Arpit aff6404
docs: fix
Hii-Arpit f51050f
docs: fix
Hii-Arpit 96ed694
docs: fix
Hii-Arpit fd78aef
docs: fix
Hii-Arpit bca98a7
docs: fix
Hii-Arpit aaffed5
docs: fix
Hii-Arpit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# GitOps (Flux CD) | ||
|
||
{% hint style="info" %} | ||
### Prerequisite | ||
|
||
Please make sure to install **Build and Deploy (CI/CD)** integration. To install it, click [here](../integrations/build-and-deploy-ci-cd.md). | ||
|
||
{% endhint %} | ||
|
||
Devtron supports FluxCD to help you manage application deployments using GitOps. With FluxCD, your Git repository becomes the single source of truth for your Kubernetes apps. Any changes you make in Git are automatically applied to your Kubernetes cluster by FluxCD. Refer to the [FluxCD documentation](https://fluxcd.io/flux/) to learn more. | ||
|
||
{% hint style="info" %} | ||
### Additional Resources | ||
[What is FluxCD? A Quick Guide to GitOps with FluxCD](https://devtron.ai/blog/what-is-fluxcd/) | ||
|
||
[Choosing the Right GitOps Tool: ArgoCD vs.FluxCD](https://devtron.ai/blog/gitops-tool-selection-argo-cd-or-flux-cd/) | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{% endhint %} | ||
|
||
## Key features | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* Works with Devtron CI pipelines and other Devtron integrations. | ||
|
||
* Supports Helm deployment method only. | ||
|
||
## Installation | ||
|
||
{% hint style="warning" %} | ||
### Who Can Perform This Action? | ||
The user must have permissions to: | ||
* Edit the ConfigMaps of 'default-cluster' | ||
* Restart the pods | ||
{% endhint %} | ||
|
||
To enable deployments through GitOps via FluxCD or if you want to migrate your existing FluxCD application to Devtron, you need to enable two specific feature flags for the `default_cluster` in **Devtron** and then install the FluxCD controller on those clusters in which you want to deploy the FluxCD applications. To do so, follow the steps below: | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Step 1: Enable Feature Flags | ||
|
||
1. Navigate to Devtron **Resource Browser**. | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
2. Select the `default_cluster` to enable the feature flags. | ||
|
||
 | ||
|
||
3. Go to Config & Storage → ConfigMap, and select `dashboard-cm` ConfigMap | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
4. Edit the `dashboard-cm` ConfigMap by clicking **Edit live manifest**. | ||
|
||
* To enable deployments via FluxCD, check if the below entries are present in the ConfigMap (create one if it doesn't exist) and select **Apply changes**.<br> | ||
|
||
```yaml | ||
FEATURE_FLUX_DEPLOYMENTS_ENABLE: " true" | ||
FEATURE_LINK_EXTERNAL_FLUX_ENABLE: "true" | ||
``` | ||
|
||
 | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
5. Restart the deployment: | ||
|
||
* For OSS Users: | ||
1. Navigate to Devtron Resource Browser. | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. Select the cluster for which you have enabled the feature flags. | ||
|
||
3. Click the **Terminal** tab. | ||
|
||
4. Restart the deployment using the following command: | ||
|
||
```yaml | ||
kubectl rollout restart deployment dashboard -n devtroncd | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
<br> | ||
|
||
 | ||
|
||
* For Enterprise Users: | ||
1. Go to Resource Browser → (Select Cluster in which you have enabled the feature flags) → Workloads → Deployment | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. Click the checkbox next to the following Deployment workloads and restart them using the ⟳ button: | ||
|
||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* devtron | ||
|
||
* dashboard | ||
|
||
 | ||
|
||
6. Perform a hard refresh of the browser to clear the cache: | ||
|
||
* Mac: Hold down Cmd and Shift and then press R. | ||
|
||
* Windows/Linux: Hold down Ctrl and then press F5. | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Step 2: Install FluxCD Controller | ||
|
||
After enabling the feature flags, the next step is to install FluxCD Controller in every cluster (including the default cluster) in which you want to deploy the FluxCD applications. To do so, follow the steps below: | ||
|
||
1. Navigate to Devtron Resource Browser. | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. Select the cluster for which you have enabled the feature flags. | ||
|
||
3. Click the **Terminal** tab. | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
4. Run the following command to install the FluxCD Controller:<br> | ||
|
||
```bash | ||
kubectl apply -f https://github.com/fluxcd/flux2/releases/download/v0.35.0/install.yaml | ||
``` | ||
<br> | ||
|
||
 | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
5. After the command is executed successfully, you can deploy or migrate your applications in that cluster through GitOps (via FluxCD). | ||
Hii-Arpit marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.