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

Q2 gitops install quick start refaactor#776

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 7 commits intomasterfromq2-gitops-install-quick-start-refaactor
Jul 30, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions_data/nav.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,11 +35,11 @@
- title: GitOps quick starts
url: "/gitops-quick-start"
sub-pages:
- title: Provision ahosted runtime
- title: Provision aHosted GitOps Runtime
url: "/install-hosted"
- title: Prepare forhybrid runtime installation
- title: Prepare forHybrid GitOps Runtime installation
url: "/verify-requirements"
- title: Install ahybrid runtime
- title: Install aHybrid GitOps Runtime
url: "/runtime"
- title: Create an application
url: "/create-app-ui"
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -405,7 +405,7 @@ helm upgrade --install <helm-release-name> \


### Step 5: Configure Git credentials for Hybrid GitOps Runtime
Configure Git credentials to authorize access to and ensure proper functioning of the GitOps Runtime.
Configure Git credentials to authorize access to and ensure proper functioning of the GitOps Runtime.This is one of the two steps to complete installing Hybrid GitOps Runtimes, the other being to configure the Runtime as an Argo Application, described in the next step.

Git credentials include authorizing access to Git through OAuth2 or a personal access token, and optionally configuring SSH access to Git.

Expand DownExpand Up@@ -489,7 +489,7 @@ Required only for ALB AWS, Istio, or NGINX Enterprise ingress-controllers.<br>
* [Istio: Configure cluster routing service](#cluster-routing-service)
* [NGINX Enterprise ingress controller: Patch certificate secret](#patch-certificate-secret)

That's it! You have successfully completed installing a Hybrid GitOps Runtime with Helm.See the Runtime in the [Runtimes]({{site.baseurl}}/docs/installation/gitops/monitor-manage-runtimes/#gitops-runtime-views) page.
That's it! You have successfully completed installing a Hybrid GitOps Runtime with Helm.View the Runtime in the [Runtimes]({{site.baseurl}}/docs/installation/gitops/monitor-manage-runtimes/#gitops-runtime-views) page.

You can now add [external clusters to the Runtime]({{site.baseurl}}/docs/installation/gitops/managed-cluster/), and [create and deploy GitOps applications]({{site.baseurl}}/docs/deployments/gitops/create-application/).

Expand Down
22 changes: 11 additions & 11 deletions_docs/quick-start/gitops-quick-start.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,31 +8,31 @@ toc: true
Check out our GitOps quick starts to get up and running with GitOps in Codefresh.

The quick start guides you through:
* Provisioningruntimes
* ProvisioningGitOps Runtimes
* Creating and deploying an application


## Provisionruntimes
Based on your deployment model, start by provisioning thehosted orhybrid runtime. Hosted andhybrid runtimes can co-exist with each other.
## ProvisionGitOps Runtimes
Based on your deployment model, start by provisioning theHosted orHybrid GitOps Runtime. Hosted andHybrid GitOps Runtimes can co-exist with each other.


### Hosted
Hostedruntimesare hosted on a Codefresh cluster and managed by Codefresh. You need to provision yourhosted runtime once for your account.
HostedGitOps Runtimesare hosted on a Codefresh cluster and managed by Codefresh. You need to provision yourHosted Runtime once for your account.

1. [Provision ahosted runtime]({{site.baseurl}}/docs/quick-start/gitops-quick-start/install-hosted)
Provision thehosted runtime with a single click, and complete the setup for your hosted environment.
1. [Provision aHosted GitOps Runtime]({{site.baseurl}}/docs/quick-start/gitops-quick-start/install-hosted)
Provision theHosted GitOps Runtime with a single click, and complete the setup for your hosted environment.

{::nomarkdown}
<br>
{:/}

### Hybrid
Hybridruntimesare hosted on a customer cluster and managed by the customer. You can provision multiplehybrid runtimes in the same account.
HybridGitOps Runtimesare hosted on a customer cluster and managed by the customer. You can provision multipleHybrid GitOps Runtimes in the same account.

1. [Prepare forhybrid runtime installation]({{site.baseurl}}/docs/quick-start/gitops-quick-start/verify-requirements)
Verify your environment matches the requirements for installingCodefresh runtime.
1. [Installhybrid runtime]({{site.baseurl}}/docs/quick-start/gitops-quick-start/runtime)
Install theCodefresh runtime by downloading the CLI, installing the runtime, and validate successful installation in the UI
1. [Prepare forHybrid GitOps Runtime installation]({{site.baseurl}}/docs/quick-start/gitops-quick-start/verify-requirements)
Verify your environment matches the requirements for installinga Hybrid GitOps Runtime.
1. [Installthe Hybrid GitOps Runtime]({{site.baseurl}}/docs/quick-start/gitops-quick-start/runtime)
Install theHybrid GitOps Runtime through Helm.

## Create a Codefresh account
[Create an account in Codefresh]({{site.baseurl}}/docs/quick-start/create-codefresh-account/) in which to create pipelines.
Expand Down
20 changes: 10 additions & 10 deletions_docs/quick-start/gitops-quick-start/install-hosted.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
---
title: "Provision ahosted runtime"
description: ""
title: "Provision aHosted GitOps Runtime"
description: "Install the GitOps Runtime hosted by Codefresh"
group: getting-started
sub-group: gitops-quick-start
toc: true
---

If you have Hosted GitOps, set up your hosted runtime environment:

1. Provision thehosted runtime with a single click
1. Provision theHosted GitOps Runtime with a single click
1. Authorize access through your OAuth token to the organization where Codefresh creates the Git runtime repo and the shared configuration repo
1. Connect to an external K8s cluster with access to the internet, to which you can deploy applications
1. Install Argo Rollouts on the cluster

Read our [blog on Hosted GitOps](https://codefresh.io/blog/codefresh-upends-continuous-delivery-with-hosted-gitops-platform-featuring-dora-dashboards-and-first-class-integrations-for-ci/).
For detailed information on each of the steps below, see [Set up ahosted runtime environment]({{site.baseurl}}/docs/installation/gitops/hosted-runtime/).
For detailed information on each of the steps below, see [Set up aHosted GitOps Runtime environment]({{site.baseurl}}/docs/installation/gitops/hosted-runtime/).

**Before you begin**
##Before you begin

Verify the following:
* If you have hybrid runtimes installed, make sure you have latest version of the CLI
Expand All@@ -27,8 +27,8 @@ Verify the following:
* Kubernetes cluster with access to the internet
* OAuth token

**How to**
1. In the Codefresh UI, go to Codefresh [Home](https://g.codefresh.io/2.0/?time=LAST_7_DAYS){:target="\_blank"}.
##How to
1. In the Codefresh UI, go to Codefresh [Home Dashboard](https://g.codefresh.io/2.0/?time=LAST_7_DAYS){:target="\_blank"}.

{% include
image.html
Expand All@@ -41,8 +41,8 @@ max-width="80%"
%}

{:start="2"}
1. Provision thehosted runtime:
* Click **Install**, and wait for Codefresh to complete provisioning yourhosted runtime (may take up to ten minutes).
1. Provision theHosted GitOps Runtime:
* Click **Install**, and wait for Codefresh to complete provisioning yourHosted GitOps Runtime (may take up to ten minutes).

{% include
image.html
Expand DownExpand Up@@ -105,6 +105,6 @@ max-width="70%"
max-width="50%"
%}

### What to do next
## What to do next
[Create resources for codefresh-guestbook application]({{site.baseurl}}/docs/quick-start/gitops-quick-start/create-app-specs/)

181 changes: 94 additions & 87 deletions_docs/quick-start/gitops-quick-start/runtime.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,60 @@
---
title: "Installa hybrid runtime"
description: ""
title: "InstallHybrid GitOps Runtime"
description: "Install the Helm-based Hybrid GitOps Runtime"
group: getting-started
sub-group: quick-start
toc: true
---


Install the hybrid runtime on your K8s cluster. Installing the hybrid runtime installs Argo-project and Codefresh-specific components. The Argo Project is an enterprise-supported version of the Argo CD components, derived from a conformed fork of the Argo ecosystem.

### About hybrid runtime installation
Installing a hybrid runtime includes installing the:
1. GitOps CLI
2. Codefresh hybrid runtime from the CLI in a specific namespace on your cluster.
Every hybrid runtime installation makes commits to three Git repos:
* Runtime installation repo: The installation repo that manages the runtime itself with Argo CD. If the repo URL you provide does not exist, the runtime creates it automatically.
* Git Source repo: Created automatically during runtime installation. The repo with the demo resources required for the sample `Hello World` pipelines we provide.
* Shared Configuration Repository: A repository that stores configuration manifests shared across runtimes.
Get up and running with Codefresh by installing the Hybrid Runtime for GitOps via Helm.
The Runtime is installed through a Helm chart. The Codefresh `values.yaml` is located [here](https://github.com/codefresh-io/gitops-runtime-helm/blob/main/charts/gitops-runtime/){:target="\_blank"}. It contains all the arguments that can be configured, including optional ones.

### Before you begin
## Quick start assumptions

#### Tunnel-based runtime
Hybrid GitOps runtimes supports tunnel-based and ingress-based configurations.
For the quick start, we will use the tunnel-based mode which is the default access mode and does not require an ingress controller.
For details, review [GitOps Runtime architecture]({{site.baseurl}}/docs/installation/runtime-architecture/#gitops-runtime-architecture).
The quick start assumes that you are installing the first Hybrid GitOps Runtime in your Codefresh account.

#### Git provider tokens
A hybrid runtime requires a Git token for authentication to the Git installation repository based on your Git provider.
The quick start uses GitHub as the Git provider. For other Git providers and token requirements, see [Git provider and repo flags]({{site.baseurl}}/docs/installation/gitops/hybrid-gitops/#git-provider-and-repo-flags).
## Argo project components & CRDs
Hybrid GitOps installation requires a cluster without Argo project components and CRDs (Custom Resource Definitions).

Have your GitHub Personal Authentication Token (PAT) ready with a valid expiration date and access permissions:
* Expiration: Either the default of 30 days or any duration you consider logical.
* Access scopes: Set to `repo` and `admin-repo.hook`
Argo project components include Argo Rollouts, Argo CD, Argo Events, and Argo Workflows.

You can handle Argo project CRDs outside the chart, or as recommended, adopt the CRDs to be managed by the GitOps Runtime Helm release.

If you already have Argo project CRDs on your cluster, do one of the following:
* Handle Argo projects CRDs outside of the chart (see [Argo's readme on Helm charts](https://github.com/argoproj/argo-helm/blob/main/README.md){:target="\_blank"})
Disable CRD installation under the relevant section for each of the Argo projects in the Helm chart:<br>
`--set <argo-project>.crds.install=false`<br>
where:<br>
`<argo-project>` is the argo project component: `argo-cd`, `argo-workflows`, `argo-rollouts` and `argo-events`.

* Adopt the CRDs<br>
Adopting the CRDs allows them to be managed by the `gitops-runtime helm release`. Doing so ensures when you upgrade the Hybrid GitOps Runtime, the CRDs are also automatically upgraded.

Run this script _before_ installation:

```
#!/bin/sh
RELEASE=<helm-release-name>
NAMESPACE=<target-namespace>
kubectl label --overwrite crds $(kubectl get crd | grep argoproj.io | awk '{print $1}' | xargs) app.kubernetes.io/managed-by=Helm
kubectl annotate --overwrite crds $(kubectl get crd | grep argoproj.io | awk '{print $1}' | xargs) meta.helm.sh/release-name=$RELEASE
kubectl annotate --overwrite crds $(kubectl get crd | grep argoproj.io | awk '{print $1}' | xargs) meta.helm.sh/release-namespace=$NAMESPACE
```

### Tunnel-based runtime
Hybrid GitOps Runtimes supports tunnel-based, ingress-based, and service-mesh-based access modes.
For the quick start, we'll use the tunnel-based mode which is the default access mode, not requiring an ingress controller.
For details on these access modes, review [GitOps Runtime architecture]({{site.baseurl}}/docs/installation/runtime-architecture/#gitops-runtime-architecture).

### GitHub as Git provider
Hybrid GitOps Runtimes require a Git Runtime token for authentication to the Git installation repository based on your Git provider, and a Git user token to authenticate Git-based actions for the Runtime.
The quick start uses GitHub as the Git provider. For other Git providers and token requirements, see [Git providers and Git runtime tokens]({{site.baseurl}}/docs/reference/git-tokens/#git-runtime-token-scopes).

Have your GitHub Runtime token ready for Runtime installation with a valid expiration date and access permissions:
* Expiration: Either the default of 30 days or any duration you consider logical.
* Access scopes: Set to `repo` and `admin-repo.hook`

{% include
image.html
Expand All@@ -45,74 +68,58 @@ For details, review [GitOps Runtime architecture]({{site.baseurl}}/docs/installa

If you need detailed information on GitHub tokens, see the [GitHub article](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

### Download the Codefresh CLI
Downloading the Codefresh CLI requires you to select the download mode and OS, generate an API key, and authentication context, as instructed in the UI.
1. In the Welcome page, select **+ Install Runtime**.
1. Download the Codefresh CLI:
* Select one of the methods.
* Generate the API key and create the authentication context.
### Shared Configuration Repository
When you select the Git provider, Codefresh prompts you to also select the Shared Configuration Repository for your account. The repo stores account-level configuration settings and manifests.
Because the Shared Configuration Repo is defined at the account-level, the Git provider you select for the first Runtime in your account is used for all the other Runtimes in the same account.
Read up on the [Shared Configuration Repository]({{site.baseurl}}/docs/installation/gitops/shared-configuration/).

{% include
image.html
lightbox="true"
file="/images/runtime/gitops-cli-download.png"
url="/images/runtime/gitops-cli-download.png"
alt="Download GitOps CLI to install runtime"
caption="Download GitOps CLI to install runtime"
max-width="30%"
%}
### Install hybrid runtime
For the quick start, we will use the CLI wizard to install the Hybrid GitOps Runtime.

1. To start runtime installation, run `cf runtime install`.
>If you don't have a valid SSL certificate for the Ingress controller, and want to continue with the installation, add the `--insecure` flag to the runtime command.
1. Follow the prompts in the CLI wizard to complete the installation:
* **Runtime name**: The name of your runtime, starting with a lower-case character, and including up to 63 characters and numbers. Example: `codefreshproduction`
* **Select Kube context**: Your current context is highlighted. Press Enter to select it, or use the arrow keys to select a different context.
* **Repository URL**: The GitHub repo for the installation definitions, in the format `https://github.com/[user-or-org-name]/[repo_name]`. Example: `https//:github.com/codefresh/cf_production_install`.
* **Git runtime token**: The GitHub PAT for access to the installation repo.
* **Install Codefresh demo resources?** Press Enter to confirm. Demo resources are saved in a new Git Source repo, created by Codefresh. They include resources for two Hello World pipelines, one with a Cron trigger condition, and the other with a Git event trigger condition.
* **Do you wish to continue with runtime install?** Press Enter to confirm and start runtime installation.
1. Wait for the runtime installed successfully message.

### Validate successful installation
The **Runtimes** dashboard shows the hybrid runtime you just installed. You can drill down into the runtime to see its components and Git Sources.

1. In the Codefresh UI, go to the [**Runtimes**](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"} dashboard.

{% include
image.html
lightbox="true"
file="/images/quick-start/gitops/hybrid-runtime-in-list.png"
url="/images/quick-start/gitops/hybrid-runtime-in-list.png"
alt="Succesfully installed Hybrid GitOps runtime in Runtimes > List View"
caption="Succesfully installed Hybrid GitOps runtime in Runtimes > List View"
max-width="60%"
%}
## Install Hybrid GitOps Runtime

{:start="2"}
1. Select the runtime name to drill down, and then select the tabs to view the runtimecomponentsand Git Sources.
**Before you begin**
* Make sure your cluster does not have [Argo projectcomponents& CRDs](#argo-project-components--crds)

{% include
image.html
lightbox="true"
file="/images/quick-start/gitops/hybrid-runtime-components.png"
url="/images/quick-start/gitops/hybrid-runtime-components.png"
alt="Hybrid GitOps Runtime Components tab"
caption="Hybrid GitOps Runtime Components tab"
max-width="30%"
%}
**How to**

{% include
image.html
lightbox="true"
file="/images/quick-start/gitops/hybrid-runtime-gitsources.png"
url="/images/quick-start/gitops/hybrid-runtime-gitsources.png"
alt="Hybrid GitOps Runtime Git Sources tab"
caption="Hybrid GitOps Runtime Git Sources tab"
max-width="30%"
%}

### What to do next
1. In the Welcome page, select **+ Install Runtime**.
1. From Runtimes in the sidebar, select **GitOps Runtimes**.
1. Set up your Git provider account:
1. If not GitHub, select the Git provider.
1. Define the provider's API URL.
1. Define the URL of the **Shared Configuration Repository**.
1. Click **Next**.
1. Install the Hybrid GitOps Runtime:
1. Click **Generate** to create a new API key.
1. Retain the default values for the GitOps Runtime name and namespace, `codefresh`.
1. Copy the command in _Step 3_ and run it to add the repository in which to store the Helm chart. You don't need to change anything in the command.
1. Copy the command in _Step 4_ and run it to install the Helm chart for the Hybrid GitOps Runtime:
where:
* `cf-gitops-runtime` is the default name of the Helm release, which you can change if needed.
* `codefresh` is the default namespace in which to install the Hybrid GitOps runtime.
* `<codefresh-account-id>` is mandatory for _tunnel-based Hybrid GitOps Runtimes_, and is automatically populated by Codefresh in the command.
* `<codefresh-token>` is the API key you generated, and is automatically populated in the command.
* `codefresh` is the default name of the runtime.
* `<cf-gitops-runtime/gitops-runtime>` is the name of the repo and must be identical to the one specified in _Step 3_, and is by default, `cf-gitops-runtime`. `gitops-runtime` is the name of the Helm chart predefined by Codefresh, and cannot be changed.

{% include
image.html
lightbox="true"
file="/images/quick-start/gitops/install-helm-command.png"
url="/images/quick-start/gitops/install-helm-command.png"
alt="Quick Start: Install Hybrid GitOps Runtime"
caption="Quick Start: Install Hybrid GitOps Runtime"
max-width="60%"
%}

{:start="5"}
1. Wait for a few minutes, and then click **Close**.
You are taken to the List View for GitOps Runtimes where you can see the Hybrid GitOps Runtime you added with a green dot indicating that it is online, and the Type column for the Runtime displaying Helm.
1. Optional. Complete the installation by clicking **Configure as Argo Application**.
There is no need for any action from you, as Codefresh takes care of the configuration.
By configuring the Hybrid GitOps Runtime as an Argo Application, you can ensure that GitOps is the single source of truth for the Runtime and view and monitor Runtime components.

You are now ready to create and deploy a GitOps application in Codefresh.


## What to do next
[Create resources for codefresh-guestbook application]({{site.baseurl}}/docs/quick-start/gitops-quick-start/create-app-specs/)

Loading

[8]ページ先頭

©2009-2025 Movatter.jp