Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cli runtime migration fixes#874

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
NimRegev merged 4 commits intomasterfromcli-runtime-migration-fixes
Dec 20, 2023
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 22 additions & 91 deletions_docs/installation/gitops/migrate-cli-runtimes-helm.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,24 +13,34 @@ When you migrate the CLI-based Runtime, the Git Sources, external clusters, and
The `values.yaml` file for Helm installation is the central configuration hub for customizing and controlling various aspects of the Runtime installation. You need to replicate all patches and customizations applied to the CLI Runtime to the `values.yaml` for the new Helm Runtime.

>**NOTE**:
Migration from CLI-based to Helm-based Runtimes is supported from GitOps CLI version 0.1.54 and higher.
Migration from CLI-based to Helm-based Runtimes is supported from GitOps CLI version 0.1.57 and higher.

## Before you begin
Make sure you have:
* Git user token (see [Git tokens]({{site.baseurl}}/docs/reference/git-tokens/#git-user-access-token-scopes))
* Git username, based on the Git provider
* GitHub and GitHub Enterprise: Not required as Codefresh automatically retrieves and populates it.
* GitLab Cloud and GitLab Server: Required, and is either your username as the owner, or if your project is within a group, the front-slash separated path to the project. For example, `nr-codefresh` (owner), or `parent-group/child-group` (group hierarchy)
* Bitbucket Cloud and Bitbucket Server: Required, and is your username for the Bitbucket Cloud/Bitbucket Server account.
* CLI version 0.1.53 or higher
* Bitbucket Cloud and Bitbucket Server: Required, and is your username for the Bitbucket Cloud/Bitbucket Server account.
* CLI version 0.1.57 or higher
Run `cf upgrade` if needed to download the latest CLI version

## Step 1: Update `values.yaml`

Before migrating the CLI-based Runtime and installing the Helm-based Runtime, replicate all patches and customizations made to the CLI Runtime to the `values.yaml` file. This action is essential and ensures that the Helm-based Runtime inherits the configurationestablishedin the CLI Runtime's setup.
Before migrating the CLI-based Runtime and installing the Helm-based Runtime, replicate all patches and customizations made to the CLI Runtime to the `values.yaml` file. This action is essential and ensures that the Helm-based Runtime inherits the configuration in the CLI Runtime's setup.

The Codefresh `values.yaml` is located [here](https://github.com/codefresh-io/gitops-runtime-helm/tree/main/charts/gitops-runtime){:target="\_blank"}. Every parameter is annotated in detail. If you have questions, reach out to Codefresh Support for guidance.

>TIP:
For info on customizing options for Argo components in the `values.yaml`, check out the following:
>[Argo CD](https://github.com/codefresh-io/argo-helm/blob/argo-cd/charts/argo-cd/README.md){:target="\_blank"}
>[Argo Events](https://github.com/codefresh-io/argo-helm/blob/argo-cd/charts/argo-events/README.md){:target="\_blank"}
>[Argo Workflows](https://github.com/codefresh-io/argo-helm/blob/argo-cd/charts/argo-workflows/README.md){:target="\_blank"}
>[Argo Rollouts](https://github.com/codefresh-io/argo-helm/blob/argo-cd/charts/argo-rollouts/README.md){:target="\_blank"}




1. Update `values.yaml`.
1. Continue with [Step 2: Migrate CLI-based GitOps Runtime](#step-2-migrate-cli-based-gitops-runtime).

Expand DownExpand Up@@ -218,11 +228,11 @@ helm upgrade --install <helm-release-name> \
{:start="4"}
1. Wait for a few minutes, and then click **Close**.
You are taken to the List View for GitOps Runtimes where:
* The Hybrid GitOps Runtime youadded is prefixed with a green dot indicating that it is online.
* The Hybrid GitOps Runtime youmigrated is prefixed with a green dot indicating that it is online.
* The Type column for the Runtime displays **Helm**.
* The Sync Status column displays **Complete Installation**, indicating that there are pending steps to complete the installation.
* Drilling down into the Runtime shows empty tabs for Runtime Components, Git Sources, and Managed Clusters.
The Runtime Components are populated only when the GitOps Runtime is configured as an Argo Application, describedlater onin theinstallation process.
The Runtime Components are populated only when the GitOps Runtime is configured as an Argo Application, described in thestep that follows.

{% include
image.html
Expand All@@ -235,97 +245,18 @@ helm upgrade --install <helm-release-name> \
%}

{:start="5"}
1. Continue with [Step 5: Configure Git credentials for GitOps Runtime](#step-5-configure-git-credentials-for-gitops-runtime).

## Step 5: Configure Git credentials for GitOps Runtime
Configure Git credentials to authorize access to and ensure proper functioning of the Helm-based GitOps Runtime.

Git credentials include authorizing access to Git through OAuth2 or a Git Runtime token, and optionally configuring SSH access to the Git installation repo for the Runtime.

**Git authorization**
* OAuth2 authorization is possible if your admin has registered an OAuth Application for Codefresh. See [OAuth2 setup for GitOps]({{site.baseurl}}/docs/administration/account-user-management/oauth-setup/).
* Git access token authentication requires you to generate an access token in your Git provider account for the GitOps Runtime, with the correct scopes. See [GitOps Runtime token scopes]({{site.baseurl}}/docs/reference/git-tokens/#git-runtime-token-scopes).

**SSH access to Git**
By default, Git repositories use the HTTPS protocol. You can also use SSH to connect Git repositories by entering the SSH private key.
When SSH is configured for a GitOps Runtime, on creating/editing Git-Source applications, you can select HTTPS OR SSH as the protocol to connect to the Git repository. See [Repository URL in Application Source definitions]({{site.baseurl}}/docs/deployments/gitops/create-application/#source).

For more information on generating SSH private keys, see the official documentation:
* [GitHub](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent){:target="\_blank"}
* [GitLab](https://docs.gitlab.com/ee/ssh/#generating-a-new-ssh-key-pair){:target="\_blank"}
* [Bitbucket](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html){:target="\_blank"}
* [Azure](https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops&tabs=current-page){:target="\_blank"}

<br>

**Before you begin**
* To authenticate through a Git Runtime access token, make sure your token is valid and has the required scopes for GitOps Runtimes
* To use SSH, copy the SSH private key for your Git provider

<br>

**How to**
1. In the Sync Status column for the Runtime you just installed, click **Complete Installation**.
Codefresh displays the steps needed to complete the installation.

{% include
image.html
lightbox="true"
file="/images/runtime/helm/helm-complete-install-widgets.png"
url="/images/runtime/helm/helm-complete-install-widgets.png"
alt="Steps to complete installing Hybrid GitOps Runtime"
caption="Steps to complete installing Hybrid GitOps Runtime"
max-width="60%"
%}

{:start="2"}
1. Do one of the following:
* If your admin has set up OAuth access, click **Authorize Access to Git Provider**. Go to _step 3_.
* Alternatively, authenticate with an access token from your Git provider. Go to _step 4_.

{% include
image.html
lightbox="true"
file="/images/runtime/helm/helm-git-runtime-token.png"
url="/images/runtime/helm/helm-git-runtime-token.png"
alt="Configure Git Runtime credentials"
caption="Configure Git Runtime credentials"
max-width="50%"
%}

{:start="3"}
1. For OAuth2 authorization:
> **NOTE**:
If the application is not registered and you get an error, contact your admin for help.
* Enter your credentials, and select **Sign In**.
* If required, as for example with two-factor authentication, complete the verification.

{% include
image.html
lightbox="true"
file="/images/administration/user-settings/oauth-user-authentication.png"
url="/images/administration/user-settings/oauth-user-authentication.png"
alt="Authorizing access with OAuth2"
caption="Authorizing access with OAuth2"
max-width="60%"
%}

{:start="4"}
1. For Git token authentication, in the **Git Runtime Token** field, paste the Git Runtime token you generated.
1. Optional. To configure SSH access to Git, expand **Connect Repo using SSH**, and then paste the raw SSH private key into the field.
1. Click **Update Credentials**. Codefresh displays a message that the Git Runtime credentials have been updated.
1. Continue with [Step 6: (Optional) Configure Hybrid GitOps Runtime as Argo Application](#step-6-optional-configure-hybrid-gitops-runtime-as-argo-application).
1. Continue with [Step 5: (Optional) Configure Hybrid GitOps Runtime as Argo Application](#step-6-optional-configure-hybrid-gitops-runtime-as-argo-application).




## Step6: (Optional) Configure Hybrid GitOps Runtime as Argo Application
## Step5: (Optional) Configure Hybrid GitOps Runtime as Argo Application

Configure the Hybrid GitOps Runtime as an Argo Application as the final step in theinstallation process.
Configure the Hybrid GitOps Runtime as an Argo Application as the final step in themigration process.
We recommend completing this step, as by doing so, you can view the Runtime components, monitor health and sync statuses, and ensure that GitOps is the single source of truth for the Runtime.

>**NOTE**:
You cannot configure the Runtime as an Argo Application if you have not configured Git credentials for the Runtime, as described in the previous step.
<!--- >>**NOTE**:
You cannot configure the Runtime as an Argo Application if you have not configured Git credentials for the Runtime, as described in the previous step. -->


1. Go back to the List view.
Expand DownExpand Up@@ -353,7 +284,7 @@ You can also create [Environments]({{site.baseurl}}/docs/dashboards/gitops-envir

## Related articles
[Monitor & manage GitOps Runtimes]({{site.baseurl}}/docs/installation/gitops/monitor-manage-runtimes/)
[Add Git Sourcesto runtimes]({{site.baseurl}}/docs/installation/gitops/git-sources/)
[Managing Git Sourcesin GitOps Runtimes]({{site.baseurl}}/docs/installation/gitops/git-sources/)
[Shared Configuration Repository]({{site.baseurl}}/docs/installation/gitops/shared-configuration)
[Home Dashboard]({{site.baseurl}}/docs/dashboards/home-dashboard/)
[DORA metrics]({{site.baseurl}}/docs/dashboards/dora-metrics/)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp