Skip to content

Commit b374972

Browse files
authored
Merge branch 'main' into docs/work-in-agro-cd-feedback
2 parents 1fded16 + 3e9a47e commit b374972

File tree

18 files changed

+213
-31
lines changed

18 files changed

+213
-31
lines changed

demos/data-lakehouse-iceberg-trino-spark/load-test-data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
spec:
99
containers:
1010
- name: load-test-data
11-
image: "bitnami/minio:2024-debian-12"
11+
image: "bitnamilegacy/minio:2024-debian-12"
1212
# Please try to order the load jobs from small to large datasets
1313
command:
1414
- bash

demos/jupyterhub-keycloak/load-gas-data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
spec:
99
containers:
1010
- name: load-gas-data
11-
image: "bitnami/minio:2022-debian-10"
11+
image: "bitnamilegacy/minio:2022-debian-10"
1212
command: ["bash", "-c", "cd /tmp; curl -O https://repo.stackable.tech/repository/misc/datasets/gas-sensor-data/20160930_203718.csv && mc --insecure alias set minio http://minio:9000/ $(cat /minio-s3-credentials/accessKey) $(cat /minio-s3-credentials/secretKey) && mc cp 20160930_203718.csv minio/demo/gas-sensor/raw/;"]
1313
volumeMounts:
1414
- name: minio-s3-credentials

demos/spark-k8s-anomaly-detection-taxi-data/load-test-data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
spec:
99
containers:
1010
- name: load-ny-taxi-data
11-
image: "bitnami/minio:2022-debian-10"
11+
image: "bitnamilegacy/minio:2022-debian-10"
1212
# yamllint disable-line rule:line-length
1313
command:
1414
- "bash"

demos/trino-taxi-data/load-test-data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
spec:
99
containers:
1010
- name: load-ny-taxi-data
11-
image: "bitnami/minio:2024-debian-12"
11+
image: "bitnamilegacy/minio:2024-debian-12"
1212
# yamllint disable-line rule:line-length
1313
command:
1414
- bash

docs/modules/demos/pages/airflow-scheduled-job.adoc

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,65 @@ asynchronously - and another to poll the running job to report on its status.
129129

130130
image::airflow-scheduled-job/airflow_11.png[]
131131

132+
== Patching Airflow to stress-test DAG parsing using relevant environment variables
133+
134+
The demo also created a third DAG in the ConfigMap, called `dag_factory.py`, which was not mounted to the cluster and therefore does not appear in the UI.
135+
This DAG can be used to create a number of individual DAGs on-the-fly, thus allowing a certain degree of stress-testing of the DAG scan/register steps (the generated DAGs themselves are trivial and so this approach will not really increase the burden of DAG _parsing_).
136+
To include this in the list of DAGs (without removing the existing ones), an extra volumeMount is needed, as shown below.
137+
The patch also sets some environment variables that can be used to change the frequency of certain operations. The descriptions can be found here: https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html[window=_blank].
138+
139+
[source,yaml]
140+
----
141+
---
142+
apiVersion: airflow.stackable.tech/v1alpha1
143+
kind: AirflowCluster
144+
metadata:
145+
name: airflow
146+
spec:
147+
clusterConfig:
148+
volumeMounts:
149+
- name: airflow-dags
150+
mountPath: /dags/dag_factory.py
151+
subPath: dag_factory.py
152+
- name: airflow-dags
153+
mountPath: /dags/date_demo.py
154+
subPath: date_demo.py
155+
- name: airflow-dags
156+
mountPath: /dags/pyspark_pi.py
157+
subPath: pyspark_pi.py
158+
- name: airflow-dags
159+
mountPath: /dags/pyspark_pi.yaml
160+
subPath: pyspark_pi.yaml
161+
webservers:
162+
roleGroups:
163+
default:
164+
envOverrides: &envOverrides
165+
AIRFLOW__CORE__DAGS_FOLDER: "/dags"
166+
AIRFLOW__CORE__MIN_SERIALIZED_DAG_UPDATE_INTERVAL: "60"
167+
AIRFLOW__CORE__MIN_SERIALIZED_DAG_FETCH_INTERVAL: "60"
168+
AIRFLOW__DAG_PROCESSOR__MIN_FILE_PROCESS_INTERVAL: "60"
169+
AIRFLOW__DAG_PROCESSOR__PRINT_STATS_INTERVAL: "60"
170+
AIRFLOW_CONN_KUBERNETES_IN_CLUSTER: "kubernetes://?__extra__=%7B%22extra__kubernetes__in_cluster%22%3A+true%2C+%22extra__kubernetes__kube_config%22%3A+%22%22%2C+%22extra__kubernetes__kube_config_path%22%3A+%22%22%2C+%22extra__kubernetes__namespace%22%3A+%22%22%7D"
171+
kubernetesExecutors:
172+
envOverrides: *envOverrides
173+
schedulers:
174+
roleGroups:
175+
default:
176+
envOverrides: *envOverrides
177+
----
178+
179+
THe patch can be applied like this:
180+
181+
[source,console]
182+
----
183+
kubectl patch airflowcluster airflow --type="merge" --patch-file stacks/airflow/patch_airflow.yaml
184+
----
185+
186+
[NOTE]
187+
====
188+
The scheduled job runs every minute and so an instance of it may be running while the scheduler is being re-started as a result of the patch, in which case that instance may fail.
189+
====
190+
132191
== Summary
133192

134193
This demo showed how DAGs can be made available for Airflow, scheduled, run and then inspected with the Webserver UI.

stacks/_templates/postgresql-airflow.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ options:
1212
username: airflow
1313
password: airflow
1414
database: airflow
15+
global:
16+
security:
17+
allowInsecureImages: true
18+
image:
19+
repository: bitnamilegacy/postgresql
20+
volumePermissions:
21+
image:
22+
repository: bitnamilegacy/os-shell
23+
metrics:
24+
image:
25+
repository: bitnamilegacy/postgres-exporter

stacks/_templates/postgresql-druid.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ options:
1212
username: druid
1313
password: druid
1414
database: druid
15+
global:
16+
security:
17+
allowInsecureImages: true
18+
image:
19+
repository: bitnamilegacy/postgresql
20+
volumePermissions:
21+
image:
22+
repository: bitnamilegacy/os-shell
23+
metrics:
24+
image:
25+
repository: bitnamilegacy/postgres-exporter

stacks/_templates/postgresql-hive-iceberg.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ options:
1212
username: hive
1313
password: hive
1414
database: hive
15+
global:
16+
security:
17+
allowInsecureImages: true
18+
image:
19+
repository: bitnamilegacy/postgresql
20+
volumePermissions:
21+
image:
22+
repository: bitnamilegacy/os-shell
23+
metrics:
24+
image:
25+
repository: bitnamilegacy/postgres-exporter

stacks/_templates/postgresql-hive.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ options:
1212
username: hive
1313
password: hive
1414
database: hive
15+
global:
16+
security:
17+
allowInsecureImages: true
18+
image:
19+
repository: bitnamilegacy/postgresql
20+
volumePermissions:
21+
image:
22+
repository: bitnamilegacy/os-shell
23+
metrics:
24+
image:
25+
repository: bitnamilegacy/postgres-exporter

stacks/_templates/postgresql-hivehdfs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ options:
1212
username: hive
1313
password: hive
1414
database: hivehdfs
15+
global:
16+
security:
17+
allowInsecureImages: true
18+
image:
19+
repository: bitnamilegacy/postgresql
20+
volumePermissions:
21+
image:
22+
repository: bitnamilegacy/os-shell
23+
metrics:
24+
image:
25+
repository: bitnamilegacy/postgres-exporter

0 commit comments

Comments
 (0)