The hosted GitOps experience (powered by Argo CD) is now available to all new Codefresh accounts (even free ones) so that simply by signing up you can start deploying applications right away to your Kubernetes cluster without having to maintain your own Argo CD installation.
Codefresh is now the easiest way to get started with GitOps/Argo CD with a fully managed service that is offered in addition to our hybrid option (for organizations with existing ArgoCD installations).
Creating the Hosted runtime
Sign up for a Codefresh account (or visit your existing one) and at the top of the main you will see the onboarding process which needs just 3 simple steps
- Enabling the hosted Runtime offering (needs to be done only once)
- Adding your Git provider (or using an existing one)
- Adding one or more clusters that will be used as deployment targets.
Note that the deployment clusters of the last step hold only your desired applications. The ArgoCD instance that is used behind the scenes is fully managed by Codefresh (and automatically updated and secured).
First click the “Install button” on the top left card of the welcome wizard. The hosted runtime will be enabled in your account in a few minutes. The progress bar will also become visible so that you have more visibility in the initialization process.
Once the hosted runtime is enabled you will have a new runtime in your account with type “hosted”.
If you click on the runtime you will see the individual components it contains. These include enterprise versions of the Argo projects, plus extra internal components.
Remember that all these components are fully managed by Codefresh in an automated manner. They are shown to you for verification purposes but you don’t need to worry about maintaining them.
Your new hosted GitOps instance is now ready!
Connecting your Git Provider
The next step is to add a new Git provider (or use an existing one if you have one in your Codefresh accounts). One of the basic tenets of GitOps is the fact that everything should be stored in Git, including application configuration and other Argo related information.
Every action that you see in the Codefresh User interface results in a Git commit once you press the apply/save button.
In the present release we support GitHub out of the box and adding more popular Git providers (such as GitLab and Bitbucket is underway).
Click the “Connect” button in the second card of the welcome wizard. Select the Git provider that will store all information for both the cluster itself as well as the applications.
Codefresh will now show you which Git repositories it will create.
By default 2 repositories will be created in your account.
The first one is holding information about the runtime itself (cluster, secrets, 3rd party integrations). The second one is holding the applications that you deploy. See https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/ for more information.
Note that under normal circumstances you are not expected to interact manually with these Git repositories.
After you press the “Create” button a similar progress bar will appear that monitors the creation of the required Git repositories in your Git provider.
With the Git integration out of the way, we are now ready to select the destination cluster(s) for deployments.
Adding a target deployment cluster
The last card in the welcome wizard seen on the main screen is about adding a target cluster. Choose the “connect” button on the card.
Authenticate with the CLI if you haven’t done so already and then simply run the command shown on the screen instructions “cf cluster add codefresh-hosted”
Once the process is finished, you will see your cluster under Managed Clusters. You can repeat the same process with additional clusters that you want to use as deployment targets.
An exciting Codefresh feature is the topology view. You can find it under the Runtime screen. It presents you with a graphical representation of your infrastructure showing all your deployments clusters along with the Argo/Codefresh control plane.
This screen will be invaluable to big organizations that have a large number of clusters managed by different ArgoCD instances.
Deploying your first application
With the initial setup out of the way, we can finally deploy an application following the GitOps principles.
Click on “Applications” from the left sidebar in the Codefresh UI and then select the “Add application” button on top right.
Here you will get the standard application dialog in Codefresh (if you are already familiar with the hybrid/on-prem versions of the platform). This time you will be able to select the hosted runtime as a deployment target.
In the next screen you can define your application details, and in the “destination” section you can choose your target deployments clusters that are managed by the hosted runtime.
Remember that everything in Codefresh is committed to Git and that behind the scenes the platform is powered by the Argo family of tools.
After you define your application settings, the UI will ask you to commit your changes and will also show the auto-generated ArgoCD application that will be added to your Git repository (as defined in the previous section).
And that’s it! A sync process will start and your application will be deployed to your chosen cluster.
Inspecting your applications
You can monitor your deployment back in the Application dashboard that shows a list of all your active applications from all Argo/Codefresh instances that you have. If you have a large number of Argo instances, you can filter for the hosted runtime by selecting it from the drop-down on the runtime filter (top left of the screen).
Afterwards you can click on the application and get access to all the usual dashboards available to applications managed by Codefresh.
Start Deploying with GitOps today
We are very excited about giving everybody the opportunity of adopting GitOps in the fastest way possible. Sign-up for Codefresh today to get started with the hosted Argo CD service. Join us at the launch event for learning more details about all the capabilities of the Codefresh platform.