Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
217 changes: 122 additions & 95 deletions _docs/getting-started/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,94 +5,123 @@ group: getting-started
toc: true
---

Codefresh GitOps is built around an enterprise version of the Argo Ecosystem, fully GitOps-compliant with industry-standard security.
To cater to differing requirements and degrees of enterprise security, Codefresh offers hosted and hybrid installation environments.
Both hosted and hybrid environments share a similar architecture, with the key difference being the location of the Codefresh Runtime.
Codefresh GitOps is built around an enterprise version of the Argo Ecosystem, fully compliant with the GitOps paradigm, with industry-standard security.
To cater to differing requirements and degrees of enterprise security, Codefresh supports hosted and hybrid installation environments for Codefresh runtimes.

The sections that follow illustrate hosted and hybrid architecture, and describe the main components in the Codefresh Platform.
The sections that follow illustrate the architecture of the different installation environments, starting with a high-level overview of the Codefresh Platform.

### Codefresh architecture

### Hosted GitOps runtime architecture
In the hosted environment, the Codefresh Runtime is located on a K8s cluster managed by Codefresh.
The diagram shows a high-level view of the Codefresh Platform and its core components, the Codefresh Control Plane, the Codefresh Runtime, and the Codefresh Clients.

{% include
image.html
lightbox="true"
file="/images/getting-started/architecture/arch-hosted.png"
url="/images/getting-started/architecture/arch-hosted.png"
alt="Hosted runtime architecture"
caption="Hosted runtime architecture"
file="/images/getting-started/architecture/arch-codefresh-simple.png"
url="/images/getting-started/architecture/arch-codefresh-simple.png"
alt="Codefresh Platform architecture"
caption="Codefresh Platform architecture"
max-width="100%"
%}

### Hybrid runtime architecture
In the hybrid environment, the Codefresh Runtime is located on the customer's K8s cluster, and managed by the customer.

{% include
image.html
lightbox="true"
file="/images/getting-started/architecture/arch-hybrid.png"
url="/images/getting-started/architecture/arch-hybrid.png"
alt="Hybrid runtime architecture"
caption="Hybrid runtime architecture"
max-width="100%"
%}

### Codefresh Platform
The Codefresh Platform comprises:

* Codefresh Control Plane
* Codefresh Runtime with the Codefresh Application Proxy and Argo Project
* Codefresh Clients, the Codefresh UI and the Codefresh CLI

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

#### Codefresh Control Plane
The Codefresh Control Plane is the SaaS component in the platform. External to the enterprise firewall, it does not have direct communication with the Codefresh Runtime, Codefresh Clients, or the customer's organizational systems. The Codefresh Application Proxy and the Codefresh Clients communicate with the Codefresh Control Plane to retrieve the required information.
#### Codefresh Control Plane
The Codefresh Control Plane is the SaaS component in the platform. External to the enterprise firewall, it does not have direct communication with the Codefresh Runtime, Codefresh Clients, or the customer's organizational systems. The Codefresh Runtime and the Codefresh Clients communicate with the Codefresh Control Plane to retrieve the required information.

The Codefresh Control Plane:

* Securely stores user accounts, and retrieves
* Enforces the permissions model
* Controls authentication, user management, and billing

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

#### Codefresh Runtime
The Codefresh Runtime is installed on a Kubernetes cluster, and houses the enterprise distribution of the Codefresh Application Proxy and the Argo Project.
Depending on the type of installation environment, the Codefresh Runtime is installed either in the Codefresh platform (hosted), or in the customer environment (hybrid). Read more in [Codefresh runtime architecture](#codefresh-runtime-architecture).

* Hosted runtimes are installed on a _Codefresh-managed cluster_ in the Codefresh platform
* Hybrid runtimes are installed on a _customer-managed cluster_

The Codefresh Runtime:

* Integrates with Argo Workflows and Argo Events to run Delivery Pipelines (hybrid environment), and with Argo CD and Argo Rollouts (both hosted and hybrid environments) to implement GitOps deployments for progressive delivery
* Ensures that the installation repository and the Git Sources are always in sync, and applies Git changes back to the cluster
* Receives events and information from the customer's organizational systems to execute workflows

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

#### Codefresh Application Proxy
The Codefresh Application Proxy (App-Proxy) functions as the Codefresh agent. Deployed as a service in the Codefresh Runtime, the App-Proxy is exposed externally through ingress controllers/load-balancers. It is the single point-of-contact from the Codefresh Clients, the Codefresh Platform, and any organizational system to the Codefresh Runtime.
#### Codefresh Clients

Codefresh Clients include the Codefresh UI and the Codefresh CLI.
The Codefresh UI provides a unified, enterprise-wide view of deployments (runtimes and clusters), and CI/CD operations (Delivery Pipelines, workflows, and deployments) in the same location.
The Codefresh CLI includes commands to install hybrid runtimes, add external clusters, and manage runtimes and clusters.

### Codefresh runtime architecture
The sections that follow show detailed views of runtime architecture in the different installation environments, and descriptions of the Codefresh Runtime components.

* [Hosted GitOps runtime architecture](#hosted-gitops-runtime-architecture)
In this installation environment, the Codefresh Runtime is installed on a _Codefresh-managed cluster_ in the Codefresh platform.
* Hybrid runtime architecture:
In this installation environment, the Codefresh Runtime is installed on a _customer-managed cluster_ in the customer environment. The Codefresh Runtime with or without ingress controllers:
* [Ingress controller](#ingress-controller-hybrid-runtime-architecture)
* [Ingress-less](#ingress-less-hybrid-runtime-architecture)
* Runtime components
* [Codefresh Application Proxy](#codefresh-application-proxy)
* [Argo Project](#argo-project)
* [Request Routing Service](#request-routing-service)
* [Tunnel Server](#codefresh-tunnel-server)
* [Tunnel Client](#codefresh-tunnel-client)


#### Hosted GitOps runtime architecture
In the hosted environment, the Codefresh Runtime is installed on a K8s cluster managed by Codefresh.

{% include
image.html
lightbox="true"
file="/images/getting-started/architecture/arch-hosted.png"
url="/images/getting-started/architecture/arch-hosted.png"
alt="Hosted runtime architecture"
caption="Hosted runtime architecture"
max-width="100%"
%}

#### Ingress controller hybrid runtime architecture
Runtimes with ingress use an ingress controller to control communication between the Codefresh Runtime in the customer cluster and the Codefresh Platform. Ingress controllers are optimal when the cluster with the Codefresh Runtime is exposed to the internet.


**Routing**

{% include
image.html
lightbox="true"
file="/images/getting-started/architecture/arch-hybrid-ingress.png"
url="/images/getting-started/architecture/arch-hybrid-ingress.png"
alt="Ingress-based hybrid runtime architecture"
caption="Ingress-based hybrid runtime architecture"
max-width="100%"
%}

#### Ingress-less hybrid runtime architecture
Ingress-less runtimes uses tunneling to control communication between the Codefresh Runtime in the customer cluster and the Codefresh Platform. Ingress-less runtimes are optimal when the cluster with the Codefresh Runtime is not exposed to the internet.

{% include
image.html
lightbox="true"
file="/images/getting-started/architecture/arch-hybrid-ingressless.png"
url="/images/getting-started/architecture/arch-hybrid-ingressless.png"
alt="Ingress-less hybrid runtime architecture"
caption="Ingress-less hybrid runtime architecture"
max-width="100%"
%}



#### Codefresh Application Proxy
The Codefresh Application Proxy (App-Proxy) functions as the Codefresh agent, and is deployed as a service in the Codefresh Runtime.
For hybrid runtimes with ingress, the App-Proxy is the single point-of-contact between the Codefresh Runtime, and the Codefresh Clients, the Codefresh Platform, and any organizational systems in the customer environment.
For ingress-less hybrid runtimes, the Tunnel Client forwards the incoming traffic from the Tunnel Server using internal reverse proxy to the App-Proxy.

The App-Proxy:
* Accepts and serves requests from Codefresh Clients either via the Codefresh UI or CLI
* Retrieves a list of Git repositories for visualization in Codefresh Clients

**Authentication and authorization**
The App-Proxy retrieves permissions from the Codefresh Control Plane to authenticate and authorize users for the required operations.

**Write operations**
The App-Proxy performs write and state-change operations:
* Commits for GitOps-controlled entities, such as Delivery Pipelines and other CI resources
* State-change operations for non-GitOps controlled entities, such as terminating Argo Workflows
* Retrieves permissions from the Codefresh Control Plane to authenticate and authorize users for the required operations.
* Implements commits for GitOps-controlled entities, such as Delivery Pipelines and other CI resources
* Implements state-change operations for non-GitOps controlled entities, such as terminating Argo Workflows

{::nomarkdown}
<br>
Expand All @@ -106,67 +135,65 @@ The Argo Project includes:
* Argo Workflows as the workflow engine
* Argo Events for event-driven workflow automation framework


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

#### Codefresh Clients
Codefresh Clients include the Codefresh UI and the Codefresh CLI.
#### Request Routing Service
The Request Routing Service is installed on the same cluster as the Codefresh Runtime in the customer environment.
It receives requests from the ingress controller (ingress) or the Tunnel Client (ingress-less), and forwards the request URLs to the Application Proxy, and webhooks directly to the Event Sources.

**Codefresh UI**
>Important:
The Request Routing Service is available from runtime version 0.0.543 and higher.
Older runtime versions are not affected as there is complete backward compatibility, and the ingress controller continues to route incoming requests.

The Codefresh UI provides a unified, enterprise-wide view of your deployment (runtimes and clusters), and CI/CD operations (Delivery Pipelines, workflows, and deployments) in the same location.
#### Tunnel Server
Applies only to _ingress-less_ runtimes in hybrid installation environments.
The Codefresh Tunnel Server is installed in the Codefresh platform. It communicates with the enterprise cluster located behind a NAT or firewall.

* Multi-runtime and multi-cluster management: View all provisioned runtimes, and the clusters they manage in the Runtimes page.
* Dashboards for CI and CD visualizations: The Home dashboard for critical insights into CI and CD lifecycles, the DORA metrics dashboard for DevOps metrics, the Applications dashboard for GitOps details, and the Delivery Pipelines dashboard for workflow details.
* Wizards to simplify installation, Delivery Pipeline and application creation and management.
* Integrations for software delivery workflows
The Tunnel Server:
* Forwards traffic from Codefresh Clients to the client (customer) cluster.
* Manages the lifecycle of the Codefresh Tunnel Client.
* Authenticates requests from the Codefresh Tunnel Client to open tunneling connections.

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

**Codefresh CLI**
#### Tunnel Client
Applies only to _ingress-less_ runtimes in hybrid installation environments.

Perform hybrid runtime installation, and runtime and cluster management operations.

### Customer environment
The customer environment that communicates with the Codefresh platform, generally includes:
* Ingress controller
* Managed clusters
* Organizational systems

{::nomarkdown}
<br><br>
{:/}
Installed on the same cluster as the Codefresh Runtime, the Codefresh Tunnel Client establishes the tunneling connection to the Codefresh Tunnel Server via the WebSocket Secure (WSS) protocol.
A single Codefresh Runtime can have a single Tunnel Client.

#### Ingress Controller
In hybrid runtime environments, the ingress controller implements the ingress traffic rules for the Codefresh Runtime. It is configured on the same Kubernetes cluster as the Codefresh Runtime.
See [Ingress controller]({{site.baseurl}}/docs/runtime/requirements/#ingress-controller).
The Codefresh Tunnel Client:
* Initiates the connection with the Codefresh Tunnel Server.
* Forwards the incoming traffic from the Tunnel Server through the Request Routing Service to App-Proxy, and other services.

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

#### Managed clusters
Managed clusters are external clusters registered to a provisioned hosted or hybrid runtime(s).

* Hosted runtime: Requires you to connect to an external K8s cluster as part of setting up the Hosted GitOps environment. You can add more managed clusters after completing the setup.
* Hybrid runtimes: You can add external clusters after provisioning hybrid runtimes.

See [Add external clusters to runtimes]({{site.baseurl}}/docs/runtime/managed-cluster/).

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

#### Organizational Systems
Organizational Systems include the tracking, monitoring, notification, registries, Git providers, and other tools incorporated into the continuous integration and continuous deployment processes. They can be entirely on-premises or in the public cloud.
The tools send events to the Codefresh Application Proxy (via the ingress controller) to trigger and manage CI/CD flows.
### Customer environment
The customer environment that communicates with the Codefresh Runtime and the Codefresh Platform, generally includes:
* Ingress controller for ingress hybrid runtimes
The ingress controller is configured on the same Kubernetes cluster as the Codefresh Runtime, and implements the ingress traffic rules for the Codefresh Runtime.
See [Ingress controller requirements]({{site.baseurl}}/docs/runtime/requirements/#ingress-controller).
* Managed clusters
Managed clusters are external clusters registered to provisioned hosted or hybrid runtimes for application deployment.
Hosted runtimes requires you to connect at least one external K8s cluster as part of setting up the Hosted GitOps environment.
Hybrid runtimes allow you to add external clusters after provisioning the runtimes.
See [Add external clusters to runtimes]({{site.baseurl}}/docs/runtime/managed-cluster/).
* Organizational systems
Organizational Systems include the customer's tracking, monitoring, notification, container registries, Git providers, and other systems. They can be entirely on-premises or in the public cloud.
Either the ingress controller (ingress hybrid environments), or the Tunnel Client (ingress-less hybrid environments), forwards incoming events to the Codefresh Application Proxy.

### Related articles
[Set up a hosted runtime environment]({{site.baseurl}}/docs/runtime/hosted-runtime/)
[Install a hybrid runtime]({{site.baseurl}}/docs/runtime/installation/)




41 changes: 40 additions & 1 deletion _docs/runtime/monitor-manage-runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,30 @@ toc: true


The **Runtimes** page displays the provisioned runtimes in your account, both hybrid, and the hosted runtime if you have one.

View runtime components and information in List or Topology view formats, and upgrade, uninstall, and migrate runtimes.

{% include
image.html
lightbox="true"
file="/images/runtime/runtime-list-view.png"
url="/images/runtime/runtime-list-view.png"
alt="Runtime List View"
caption="Runtime List View"
max-width="70%"
%}

Select the view mode to view runtime components and information, and manage provisioned runtimes in the view mode that suits you.

> Unless specified otherwise, management options are common to both hybrid and hosted runtimes.

Manage provisioned runtimes:
* [Add managed clusters to hybrid or hosted runtimes]({{site.baseurl}}/docs/runtime/managed-cluster/))
* [Add and manage Git Sources associated with hybrid or hosted runtimes]({{site.baseurl}}/docs/runtime/git-sources/))
* [Upgrade provisioned hybrid runtimes](#hybrid-upgrade-provisioned-runtimes)
* [Uninstall provisioned runtimes](#uninstall-provisioned-runtimes)
* [Migrate ingress-less hybrid runtimes]((#hybrid-migrate-ingress-less-runtimes))

> Unless specified otherwise, management options are common to both hybrid and hosted runtimes. If an option is valid only for hybrid runtimes, it is indicated as such.

* Add managed clusters to hybrid or hosted runtimes (see [Adding & managing external clusters]({{site.baseurl}}/docs/runtime/managed-cluster/))
* Add and manage Git Sources associated with hybrid or hosted runtimes (see [Adding & managing Git Sources]({{site.baseurl}}/docs/runtime/git-sources/))
Expand Down Expand Up @@ -83,6 +104,7 @@ Here is a description of the information in the Topology view.
|**Search and View options** | {::nomarkdown}<ul><li>Find a runtime or its clusters by typing part of the runtime/cluster name, and then navigate to the entries found. </li> <li>Topology view options: Resize to window, zoom in, zoom out, full screen view.</li></ul> {:/}|



### (Hybrid) Upgrade provisioned runtimes

Upgrade provisioned hybrid runtimes to install critical security updates or to install the latest version of all components. Upgrade a provisioned hybrid runtime by running a silent upgrade or through the CLI wizard.
Expand Down Expand Up @@ -159,6 +181,23 @@ For both silent or CLI-wizard based upgrades, make sure you have:
* To manually define the shared configuration repo, add the `--shared-config-repo` flag with the path to the repo.
1. Confirm to start the upgrade.



<!---### (Hybrid) Migrate ingress-less runtimes
To migrate an ingress-less runtime to an ingress-based one, you must uninstall the ingress-less runtime and then install a runtime with an ingress controller.
You can retain the installation repo used to install the ingress-less runtime. Though empty after uninstalling the ingress-less The new installation creates the new manifests in this re


>Before uninstalling the ingress-less runtime, you can save specific patches in a temporary location or retrieve the same from the Git history, and re-apply them after installing the ingress-based runtime.

**Before you begin**
* Make sure the ingress controller for the new runtime meets [requirements and is configured as needed]({{site.baseurl}}/docs/runtime/requirements/)

**How to**
1. Uninstall the ingress-less runtime, as described in [Uninstall provisioned runtimes](#uninstall-provisioned-runtimes) in this article.
2. Install the new ingress-based runtime, as described in [Install hybrid runtimes]({{site.baseurl}}/docs/runtime/installation/).

--->
### Uninstall provisioned runtimes

Uninstall provisioned hybrid and hosted runtimes that are not in use. Uninstall a runtime by running a silent uninstall, or through the CLI wizard.
Expand Down
Binary file added images/arch-hybrid-ingressless.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.