Skip to content

Commit fb74c68

Browse files
committed
make tecnical parts collapsible
1 parent ccb712c commit fb74c68

1 file changed

Lines changed: 39 additions & 66 deletions

File tree

docs/modules/demos/pages/argo-cd-git-ops.adoc

Lines changed: 39 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ All products and manifests are synced and deployed via ArgoCD (except ArgoCD its
1414

1515
The key points to show are:
1616

17-
* GitOps: How to deploy changes from a Git repository to my cluster?
18-
* Secrets: How to safely store and deploy credentials, access keys from a Git repository?
17+
* GitOps: How to deploy changes from a Git repository to a cluster?
18+
* Secrets: How to safely store and deploy credentials or access keys from a Git repository?
1919
* Interaction with Stackable products (e.g. Airflow and DAGs via gitsync)
2020
2121
ArgoCD and other deployed products and dependencies are illustrated in the following diagram:
@@ -49,22 +49,20 @@ To run this demo, your system needs at least:
4949

5050
This demo consists of multiple parts:
5151

52-
* Bootstrapping via `stackablectl`:
53-
** Install {argo-cd}[Argo CD] via `stackablectl`
52+
* Bootstrapping {argo-cd}[Argo CD] via `stackablectl`:
5453
* Deploy components via ArgoCD:
55-
** Install a {sealed-secrets}[Sealed Secrets] controller to handle sensitive data like credentials or secret keys
56-
** Install all Stackable operators using an `ApplicationSet`
57-
** Install requirements like Minio and Postgres as `Application`
58-
** Deploy Stackable Airflow manifests into their respective `Projects`
59-
* Inspect ArgoCD UI
60-
* Inspect Airflow and start DAGs
61-
** Checkout Airflow UI and synced DAGs (the DAGs are synced via gitsync, not ArgoCD)
62-
** Start a DAG and inspect the logs written to S3 / Minio by the Kubernetes executor
63-
* Optional: Inspect Minio UI for logs
54+
** Install a {sealed-secrets}[Sealed Secrets] controller to decrypt secrets stored in a Git repository
55+
** Install all Stackable operators using an ArgoCD `ApplicationSet`
56+
** Install the Airflow dependencies Minio and Postgres as ArgoCD `Application`
57+
** Deploy Stackable Airflow manifests into their respective ArgoCD `Projects`
58+
* Inspect Airflow web UI
59+
** DAGs are synced from a Git repository
60+
** Start a DAG and check the results
61+
** Check Kubernetes Executor logs persisted in Minio
6462

6563
== Sealed Secrets
6664

67-
When managing all resources and configs via Git, deploying sensitive properties like certificates or credentials via Git becomes a problem.
65+
When managing all resources and configuration via Git, deploying sensitive data like certificates or credentials via Git becomes a problem.
6866

6967
There are multiple solutions to this such as Hashicorp or Bitwarden, which depend heavily on the infrastructure already available.
7068

@@ -75,8 +73,7 @@ This way, everything will be stored and managed in Git.
7573

7674
== ArgoCD UI
7775

78-
ArgoCD will be the first product that is deployed in this Demo.
79-
Once the pods are ready, you can port-forward the argocd-server in order to access the web UI.
76+
After bootstrapping ArgoCD via `stackablectl`, once the pods are ready, you can port-forward the argocd-server Service in order to access the web UI.
8077

8178
[source,console]
8279
----
@@ -88,16 +85,16 @@ In your browser, go to `https://localhost:8443` and login with username `admin`
8885
NOTE: There will be an initial warning from the browser, stating that the site is insecure due to self-signed certificates.
8986
This can be ignored in this case.
9087

91-
The ArgoCD Web UI entry page shows an overview of deployed applications and their status and other metadata as the repository or the date of the last synchronization run.
88+
The ArgoCD Web UI entry page shows an overview of deployed applications, their status and other metadata as the repository or the date of the last synchronization run.
9289

9390
TODO: Screenshot - Argo UI overview
9491

9592
Single applications can be inspected closer after clicking on e.g. the `airflow` project.
9693

9794
TODO: Screenshot - Argo UI - Airflow
9895

99-
Detailed information about the cluster, the cluster status and deployed components can be accessed in the application details.
100-
Additionally, if the Git repository and the cluster state itself differ, these differences can be previewed in a code diff similar to Git pull requests.
96+
Detailed information about the Airflow cluster, the cluster status and deployed components can be accessed in the application details.
97+
Additionally, if the Git repository and the cluster state itself differ, these differences can be previewed in a code diff preview.
10198

10299
TODO: Screenshot - Argo UI - application details Network / List tab -> mark network tabs etc.
103100

@@ -116,11 +113,13 @@ using different versions and Git sources (repository & branch) as well as the po
116113

117114
NOTE: This demo does not use a multi cluster environment for the sake of simplicity.
118115

119-
TODO: Do the code snippets actually help? Maybe text is better... its about showing at least some parts of a multi cluster setup...
116+
The following part is dives deeper into the definition of theStackable operator `ApplicationSet` and can be skipped.
120117

118+
.Stackable operators `ApplicationSet` details
119+
[%collapsible]
120+
====
121121
[source,yaml]
122122
----
123-
---
124123
apiVersion: argoproj.io/v1alpha1
125124
kind: ApplicationSet
126125
metadata:
@@ -130,7 +129,7 @@ spec:
130129
- matrix:
131130
generators:
132131
- list:
133-
elements:
132+
elements: # <1>
134133
- operator: commons
135134
- operator: listener
136135
- operator: secret
@@ -147,7 +146,7 @@ spec:
147146
- operator: trino
148147
- operator: zookeeper
149148
- list:
150-
elements:
149+
elements: # <2>
151150
- cluster: demo
152151
server: https://kubernetes.default.svc
153152
targetRevision: 25.7.0
@@ -176,6 +175,8 @@ spec:
176175
# targetRevision: 25.3.0
177176
# [...]
178177
----
178+
<1> List of Stackable operators to install.
179+
<2> List of clusters and Stackable release versions for each cluster.
179180
180181
The `matrix.generators.list[].elements[]` will create a union of parameters that may be used in the `ApplicationSet` template as follows:
181182
@@ -186,7 +187,7 @@ template:
186187
metadata:
187188
name: "{{ operator }}-operator"
188189
spec:
189-
project: "stackable-operators"
190+
project: "stackable-operators" # <1>
190191
ignoreDifferences:
191192
- group: "apiextensions.k8s.io"
192193
kind: "CustomResourceDefinition"
@@ -196,60 +197,32 @@ template:
196197
- .spec.versions[].additionalPrinterColumns | select(. == [])
197198
source:
198199
repoURL: "oci.stackable.tech"
199-
targetRevision: "{{ targetRevision }}"
200-
chart: "sdp-charts/{{ operator }}-operator"
200+
targetRevision: "{{ targetRevision }}" # <2>
201+
chart: "sdp-charts/{{ operator }}-operator" # <3>
201202
helm:
202-
releaseName: "{{ operator }}-operator"
203+
releaseName: "{{ operator }}-operator" # <4>
203204
destination:
204-
server: "{{ server }}"
205-
namespace: "stackable-operators"
205+
server: "{{ server }}" # <5>
206+
namespace: "stackable-operators" # <6>
206207
syncPolicy:
207208
syncOptions:
208-
- CreateNamespace=true
209-
- ServerSideApply=true
210-
- RespectIgnoreDifferences=true
211-
automated:
212-
selfHeal: true
213-
prune: true
214-
----
215-
216-
The templated version for e.g. the parameters `operator=zookeeper`, `server=https://kubernetes.default.svc` and `targetRevision=25.7.0` will result in the following template:
217-
218-
[source,yaml]
219-
----
220-
# [...]
221-
template:
222-
metadata:
223-
name: "zookeeper-operator"
224-
spec:
225-
project: "stackable-operators"
226-
ignoreDifferences:
227-
- group: "apiextensions.k8s.io"
228-
kind: "CustomResourceDefinition"
229-
jqPathExpressions:
230-
- .spec.names.categories | select(. == [])
231-
- .spec.names.shortNames | select(. == [])
232-
- .spec.versions[].additionalPrinterColumns | select(. == [])
233-
source:
234-
repoURL: "oci.stackable.tech"
235-
targetRevision: "25.7.0"
236-
chart: "sdp-charts/zookeeper-operator"
237-
helm:
238-
releaseName: "zookeeper-operator"
239-
destination:
240-
server: "https://kubernetes.default.svc"
241-
namespace: "stackable-operators"
242-
syncPolicy:
243-
syncOptions:
244-
- CreateNamespace=true
209+
- CreateNamespace=true # <7>
245210
- ServerSideApply=true
246211
- RespectIgnoreDifferences=true
247212
automated:
248213
selfHeal: true
249214
prune: true
250215
----
216+
<1> The ArgoCD project name.
217+
<2> The Stackable release version, e.g. `25.7.0` (templated from the matrix generators).
218+
<3> The Chart name in the repository e.g. `"sdp-charts/airflow-operator"` (templated from the matrix generators).
219+
<4> The Helm release name e.g. `airflow-operator` (templated from the matrix generators).
220+
<5> The Kubernetes cluster, e.g. `https://kubernetes.default.svc` for this demo (templated from the matrix generators).
221+
<6> The namespace to deploy the operators in. Will be created if `spec.syncPolicy.syncOptions[].CreateNamespace` is set to true.
222+
<7> Automatically create missing namespaces.
251223
252224
This allows control over which releases and versions are deployed to which cluster.
225+
====
253226

254227
Now with ArgoCD deployed, the Sealed Secrets controller and Stackable operators up and running, you can inspect Airflow as the first Stackable product.
255228

0 commit comments

Comments
 (0)