Hi all,
In my previous blog I shared my experience creating a simple and single app deployed in a single cluster, but what if you need to manage hundreds of apps in a large and dynamic environments deployed in different SAP Kyma clusters, do you need to maintain all of them in every cluster?, let me try to answer it 🙂
SAP Kyma Cluster per environment
First of all Argo CD can deploy applications in multiple SAP Kyma clusters from one unique SAP Kyma cluster:
Argo CD Agents
The only thing that you need is to install the Argo CD agents in the other clusters that you want to manage.
Second, Argo CD provides a controller ( that need to be installed apart of the main installation ) that allow the creation of “ApplicationSet”, unlike with an Argo CD Application resource, which deploys resources from a single Git repository to a single destination cluster/namespace, “ApplicationSet” uses templated automation to create, modify, and manage multiple Argo CD applications simultaneously, targeting multiple destination clusters/namespaces.
ApplicationSet
As you can start to imagine, this controller is very useful to generate dynamic environments, with dynamic applications that needs to be deployed in dynamic SAP Kyma clusters, let’s try to use the following repository structure to handle the our scenario:
Infrastructure as Code – repository
We can see :
The main idea of this repository is to create one unique “Argo CD application” ( called “app-generator-envs” ) for the “Argo CD ApplicationSet” that will create automatically & dynamically “Argo CD applications” per environments using the folder “envs” ( called “app-generator-<environment>” ) where those applications will create automatically & dynamically “Argo CD applications” per application to deploy using the folder “envs/<environment>” ( called “app-generated-<environment>-<app>”).
Let’s see it in action:
app-generator-envs( definition )
app-generator-envs( result )
appset-generator-envs( definition )
app-generator-dev( result )
appset-generator-dev( definition )
app-generated-dev-test3( result )
So, after deploying one unique “Argo CD Application” all the SAP CAP applications were deployed as desired in the IaC repository ( for the sake of this blog only one cluster was used, but it could be specified in the “appset-generator-<environment>” file).
We can classify the “Argo CD Applications ” as “generator” & “generated”:
Generator Argo CD Applications
Generated Argo CD Applications ( SAP CAP apps )
So, the following questions could raise in your mind:
It’s really easy to deploy multiples SAP CAP applications in different SAP Kyma clusters using Argo CD 😉