Hosted GitOps Runtime installation
Set up your Hosted GitOps environment
For GitOps, Codefresh offers the option of installing Hosted and Hybrid GitOps Runtimes. Hosted GitOps Runtimes are fully managed and maintained by Codefresh. For a comparison, see Hosted vs. Hybrid GitOps.
This article describes how to install the Hosted GitOps Runtime to leverage GitOps capabilities.
For Hybrid GitOps Runtime installation, see Hybrid GitOps Runtime installation.
You can install a single Hosted GitOps Runtime per Codefresh account.
System requirements for Hosted GitOps Runtimes
|Server version 1.18 and higher to which to deploy applications
Where to start with Hosted GitOps Runtimes
If you have not provisioned a Hosted GitOps Runtime, Codefresh presents you with the setup instructions in the Home dashboard.
- In the Codefresh UI, from OPS in the sidebar, select Home. Codefresh guides you through the three-step setup, as described below.
Before you begin
- Set up integrations with the Git provider for the Hosted GitOps Runtime
- Bitbucket Cloud
Step 1: Install Hosted GitOps Runtime
Start installing the Hosted GitOps Runtime with a single-click. Codefresh completes the installation without any further intervention on your part. The Hosted GitOps Runtime is provisioned on the Codefresh cluster, and completely managed by Codefresh with automatic version and security upgrades.
- Do one of the following:
- To set up Hosted GitOps Runtime later, click Install later, and continue from step 2.
- To start setup, click Install, and continue from step 3.
- Do the following:
- In the Codefresh UI, click the Settings icon on the toolbar.
- From Runtimes in the sidebar, select GitOps Runtimes, and click + Add Runtime.
- Select Hosted Runtime and click Add.
An account can be provisioned with a single Hosted GitOps Runtime. If you have already provisioned a Hosted GitOps Runtime for your account, the Hosted GitOps Runtime option is disabled.
- Continue from step 3.
- When complete, to view the components for the Hosted GitOps Runtime, click View Runtime. You are directed to the Runtime Components tab.
You can see that there are two steps to complete Hosted GitOps setup.
The Git Sources and the Managed Clusters are empty as they will be set up in the next steps.
If you navigate to Runtimes > List View, you can identify the Hosted GitOps Runtime through the Type column (Hosted), the Cluster/Namespace column (Codefresh), and the Module column (CD Ops).
Step 2: Connect Git provider
Connect your Hosted GitOps Runtime to a Git provider for Codefresh to create the required Git repos.
Based on the Git provider you select, you need to authorize access through OAuth or access token, and then select the Git organizations or accounts in which to create the required Git repos.
Only authorized organizations are displayed in the list. To authorize organizations for the Codefresh application in GitHub, see Authorize organizations/projects.
Once you authorize access, Codefresh creates two Git repositories, one to store the configuration settings for GitOps Runtimes, and the other to store the Runtime’s application settings:
Shared Configuration Repository
The Shared Configuration Repository is a centralized Git repository that stores configuration settings for the Hosted GitOps Runtime. Additional Hybrid runtimes provisioned for the account can point to this repo to retrieve and reuse the configuration.
Read about Shared Configuration Repositories.
Git Source application repo
Codefresh creates a Git Source application repo for every Hosted GitOps Runtime.
Read about Git sources.
Before you begin
Make sure you have the credentials for the Git provider handy
- From the list, select the Git provider.
- Enter the credentials for the selected Git provider:
- Username: The username of your Codefresh user account in Gerrit.
- Password: Paste the HTTP Password you generated and copied into the field.
- Host URL: The URL of your website with the Gerrit instance, for example,
- Click Authorize Access.
- Optional. To authorize access for GitHub and Bitbucket through OAuth, click Connect and enter your OAuth token.
- Optional. If required for your Git provider, select the Git Organization for which to create the repos.
If the organization does not appear in the list, you need to authorize access to it. See Authorize organizations/projects.
- Click Create. Codefresh creates the two Git repositories in the paths shown.
- Verify that both repositories have been created in your Git account.
- Optional. To see your tokens, click View Tokens.
If you return to the Runtimes page and select the Git Source tab, you will now see the Git Source that Codefresh created.
The Sync State may be Unknown for a few moments until it is synced to the Codefresh cluster.
Step 3: Connect a Kubernetes cluster
Connect a destination cluster to the Hosted GitOps Runtime and register it as a managed cluster. Deploy applications and configuration to the cluster. For information on managed clusters and installing Argo Rollouts, see Add and manage external clusters.
Before you begin
- Make sure your cluster has internet access
- Click Connect.
- In the Add Managed Cluster panel, copy the command
cf cluster add, and run it in the terminal.
- When prompted to select the
kube-context, select from the list of available clusters as defined in
- Return to the Runtimes page, and then select Topology View.
You can see the new K8s cluster you connected.
- Configure access to the IP addresses required. See Codefresh IP addresses.
If you could not connect a cluster, you may not have the latest version of the CLI:
Upgrade the GitOps CLI.
You have completed setting up your Hosted GitOps Runtime. You are ready to create applications, and connect third-party CI tools for image enrichment.
(Optional) Create application
Optional. Create an application in Codefresh, deploy it to the cluster, and track deployment and performance in the Applications dashboard.
- Follow our quick-start to create and deploy the
codefresh-guestbookapplication. Start with Create application resources.
Create your own application. See Create an application
- In the Codefresh UI, view your application in the Applications dashboard.
(Optional) Connect CI
Optional. Integrate Codefresh with the third-party tools you use for CI to enrich image information in deployments.