-
Notifications
You must be signed in to change notification settings - Fork 3
docs: GitOps Doc Updation #117
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
bharathvaj-p
wants to merge
2
commits into
main
Choose a base branch
from
gitops-addition
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.
+84
−19
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
|
@@ -2,48 +2,58 @@ | |
|
||
## Introduction | ||
|
||
In Devtron, you can either use Helm or GitOps (Argo CD) to deploy your applications and charts. GitOps is a branch of DevOps that focuses on using Git repositories to manage infrastructure and application code deployments. | ||
In Devtron, you can use either Helm, GitOps (Argo CD), or GitOps (Flux CD) as your deployment method while deploying your application. When you choose Helm as your preferred deployment method, you are deploying your application directly into the Kubernetes cluster without version tracking of any kind. | ||
|
||
If you use the GitOps approach, Devtron will store Kubernetes configuration files and the desired state of your applications in Git repositories. | ||
However, if you choose GitOps - a branch of DevOps that focuses on using Git repositories as a single source of truth - Devtron stores Kubernetes configuration files (e.g., Kubernetes manifests or YAML configs) and the desired state of your applications in Git repositories to track each and every deployment. | ||
|
||
 | ||
|
||
Whenever tools like Argo CD or Flux CD recognize changes in the Git repository, they apply those changes to the Kubernetes cluster automatically. Similarly, if they notice any change in the cluster, they will revert back the cluster to the Git-defined state. | ||
|
||
--- | ||
|
||
## Steps to Configure GitOps | ||
|
||
{% hint style="warning" %} | ||
|
||
### Who Can Perform This Action? | ||
Users need to have super-admin permission to configure GitOps. | ||
|
||
Users need to have [Super-Admin](user-access.md#assign-super-admin-permissions) permission to configure GitOps. | ||
|
||
{% endhint %} | ||
|
||
1. Go to **Global Configurations** → **GitOps** | ||
|
||
 | ||
 | ||
|
||
2. Select any one of the [supported Git providers](#supported-git-providers) to configure GitOps. | ||
|
||
 | ||
 | ||
|
||
{% hint style="warning" %} | ||
The Git provider you select for configuring GitOps might impact the following sections: | ||
|
||
* [Deployment Template](../creating-application/deployment-template.md) | ||
|
||
* [Charts](../deploy-chart/README.md) | ||
|
||
{% endhint %} | ||
|
||
3. Fill all the mandatory fields. Refer [supported Git providers](#supported-git-providers) to know more about the respective fields. | ||
|
||
 | ||
 | ||
|
||
4. In the **Directory Management in Git** section, you get the following options: | ||
|
||
* **Use default git repository structure**: | ||
* **Auto-create git repository for each application**: | ||
|
||
This option lets Devtron automatically create a GitOps repository within your organization. The repository name will match your application name, and it cannot be changed. Since Devtron needs admin access to create the repository, ensure the Git credentials you provided in Step 3 have administrator rights. | ||
|
||
* **Allow changing git repository for application**: | ||
* **Ask git repository for each application**: | ||
|
||
Select this option if you wish to use your own GitOps repo. This is ideal if there are any confidentiality/security concerns that prevent you from giving us admin access. Therefore, the onus is on you to create a GitOps repo with your Git provider, and then [add it to the specific application](../creating-application/gitops-config.md) on Devtron. Make sure the Git credentials you provided in Step 3 have at least read/write access. Choosing this option will unlock a [GitOps Configuration](../creating-application/gitops-config.md) page under the [App Configuration](../creating-application/README.md) tab. | ||
|
||
 | ||
 | ||
|
||
5. Click **Save**/**Update**. A green tick will appear on the active Git provider. | ||
|
||
|
@@ -61,13 +71,21 @@ Alternatively, you may use the feature flag **FEATURE_USER_DEFINED_GITOPS_REPO_E | |
 | ||
|
||
1. Go to [Devtron's Resource Browser](../resource-browser/README.md). | ||
|
||
2. Select the cluster where Devtron is running, i.e., `default_cluster`. | ||
|
||
3. Go to the **Config & Storage** dropdown on the left. | ||
|
||
4. Click **ConfigMap**. | ||
|
||
5. Use the namespace filter (located on the right-hand side) to select `devtroncd` namespace. Therefore, it will show only the ConfigMaps related to Devtron, and filter out the rest. | ||
|
||
6. Find the ConfigMap meant for the dashboard of your Devtron instance, i.e., `dashboard-cm` (with an optional suffix). | ||
|
||
7. Click **Edit Live Manifest**. | ||
|
||
8. Add the feature flag (with the intended boolean value) within the `data` dictionary | ||
|
||
9. Click **Apply Changes**. | ||
|
||
--- | ||
|
@@ -78,12 +96,15 @@ Below are the Git providers supported in Devtron for storing configuration files | |
|
||
* [GitHub](#github) | ||
* [GitLab](#gitlab) | ||
* [AWS Code Commit](#aws-code-commit) | ||
* [Azure](#azure) | ||
* [Bitbucket](#bitbucket) | ||
* [Other GitOps](#other-gitops) | ||
|
||
### GitHub | ||
|
||
{% hint style="info" %} | ||
|
||
### Prerequisite | ||
|
||
1. A GitHub account | ||
|
@@ -99,14 +120,16 @@ Fill the following mandatory fields: | |
| **GitHub Username** | Provide the username of your GitHub account | | ||
| **Personal Access Token** | Provide your personal access token (PAT). It is used as an alternate password to authenticate your GitHub account. <br />If you do not have one, create a GitHub PAT [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). <br /><br /> **Access Required**: <br /> `repo` - Full control of private repositories (able to access commit status, deployment status, and public repositories). <br /> `admin:org` - Full control of organizations and teams (Read and Write access). May not be required if you are using user-defined git repo. <br /> `delete_repo` - Grants delete repo access on private repositories. | | ||
|
||
|
||
### GitLab | ||
|
||
{% hint style="info" %} | ||
|
||
### Prerequisite | ||
|
||
1. A GitLab account | ||
|
||
2. A GitLab group. If you don't have one, refer [Creating Group in GitLab](#creating-group-in-gitlab). | ||
|
||
{% endhint %} | ||
|
||
Fill the following mandatory fields: | ||
|
@@ -118,14 +141,40 @@ Fill the following mandatory fields: | |
| **GitLab Username** | Provide the username of your GitLab account | | ||
| **Personal Access Token** | Provide your personal access token (PAT). It is used as an alternate password to authenticate your GitLab account. <br />If you do not have one, create a GitLab PAT [here](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html). <br /><br /> **Access Required**: <br /> `api` - Grants complete read/write access to the scoped project API. <br /> `write_repository` - Allows read/write access (pull, push) to the repository.| | ||
|
||
### AWS Code Commit | ||
|
||
{% hint style="info" %} | ||
|
||
### Prerequisites | ||
|
||
1. An AWS Account | ||
|
||
2. An AWS IAM user with `AWSCodeCommitPowerUser` permission. Refer to [Create and Configure an IAM User with AWSCodeCommitPowerUser Permission](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html#setting-up-gc-account) for more information | ||
|
||
{% endhint %} | ||
|
||
 | ||
|
||
Fill the following mandatory fields: | ||
|
||
| Field | Description | | ||
| --- | --- | | ||
| **SSH Host** | Enter the AWS Code Commit SSH host URL (e.g., `ssh://git-codecommit.ap-south1.amazonaws.com`)| | ||
| **Enter username** | Enter the username (SSH Key ID), e.g., `YPKDKDIERJS9EXAMPLE`. Refer to [Generating Credentials in AWS Code Commit](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html#setting-up-ssh-unixes-keys) for more information| | ||
| **SSH Private Key** | Enter the SSH private key. Refer to [Generating SSH Private Key in AWS Code Commit](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html#setting-up-ssh-unixes-keys) for more information | | ||
|
||
Click **Save**. | ||
|
||
### Azure | ||
|
||
{% hint style="info" %} | ||
### Prerequisite | ||
|
||
### Prerequisites | ||
|
||
1. An organization on Azure DevOps. If you don't have one, refer [this link](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/create-organization?view=azure-devops#create-an-organization). | ||
|
||
2. A project in your Azure DevOps organization. Refer [Creating Project in Azure](#creating-project-in-azure-devops). | ||
|
||
{% endhint %} | ||
|
||
Fill the following mandatory fields: | ||
|
@@ -140,20 +189,24 @@ Fill the following mandatory fields: | |
### Bitbucket | ||
|
||
Here, you get 2 options: | ||
|
||
* [Bitbucket Cloud](#bitbucket-cloud) - Select this if you wish to store GitOps configuration in a web-based Git repository hosting service offered by Bitbucket. | ||
|
||
* [Bitbucket Data Center](#bitbucket-data-center) - Select this if you wish to store GitOps configuration in a git repository hosted on a self-managed Bitbucket Data Center (on-prem). | ||
|
||
#### Bitbucket Cloud | ||
|
||
{% hint style="info" %} | ||
|
||
### Prerequisite | ||
|
||
1. A Bitbucket account | ||
|
||
2. A workspace in your Bitbucket account. Refer [Creating Workspace in Bitbucket](#creating-workspace-in-bitbucket). | ||
|
||
{% endhint %} | ||
|
||
 | ||
 | ||
|
||
Fill the following mandatory fields: | ||
|
||
|
@@ -168,13 +221,14 @@ Fill the following mandatory fields: | |
#### Bitbucket Data Center | ||
|
||
{% hint style="info" %} | ||
|
||
### Prerequisite | ||
|
||
A Bitbucket Data Center account | ||
|
||
{% endhint %} | ||
|
||
 | ||
 | ||
|
||
Fill the following mandatory fields: | ||
|
||
|
@@ -185,6 +239,20 @@ Fill the following mandatory fields: | |
| **Bitbucket Username*** | Provide the username of your Bitbucket Data Center account | | ||
| **Password** | Provide the password to authenticate your Bitbucket Data Center account | | ||
|
||
### Other GitOps | ||
|
||
 | ||
|
||
If you prefer to use the GitOps approach using a different platform other than the available ones (e.g., Octopus Deploy), refer to the following table and fill in the mandatory fields: | ||
|
||
| Field | Description | | ||
| --- | --- | | ||
| **SSH Host** | Enter the SSH host URL (e.g., `ssh://[email protected]:acme/test-app.git`) | | ||
| **Enter username** | Enter the username (e.g., `git`) | | ||
| **SSH Private Key** | Enter the SSH private key (e.g., `M7YtY8cdJKhZ7nYXxgXeqNffv`)| | ||
|
||
Click **Save**. | ||
|
||
--- | ||
|
||
## Miscellaneous | ||
|
@@ -230,9 +298,9 @@ For more information about the plans available for your team, see [GitHub's prod | |
|
||
### Creating Project in Azure DevOps | ||
|
||
 | ||
 | ||
|
||
 | ||
 | ||
|
||
1. Go to Azure DevOps and navigate to Projects. | ||
2. Select your organization and click `New project`. | ||
|
@@ -265,7 +333,4 @@ You can also refer [Azure DevOps - Project Creation](https://docs.microsoft.com/ | |
{% hint style="info" %} | ||
### Additional References | ||
You can also refer [official Bitbucket Workspace page](https://support.atlassian.com/bitbucket-cloud/docs/what-is-a-workspace/) for more details. | ||
{% endhint %} | ||
|
||
|
||
|
||
{% endhint %} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AWS region 'ap-south1' should be 'ap-south-1' (with a hyphen). AWS region identifiers use hyphens, not just numbers.
Copilot uses AI. Check for mistakes.