Skip to content

Commit a076932

Browse files
committed
docs fine-tuning
1 parent 36afab5 commit a076932

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,14 @@ image::airflow-scheduled-job/airflow_15.png[]
180180

181181
=== `core_deferrable_sleep_demo` DAG
182182

183-
Now log out of the UI. This next section will illustrate user authorization with the Open Policy Agent (OPA) and the OPA Authorizer that is included in Stackable's Airflow product images.
183+
Now log out of the UI.
184+
This next section will illustrate user authorization with the Open Policy Agent (OPA) and the OPA Authorizer that is included in Stackable's Airflow product images.
184185
Two other users - other than `admin` - are supplied with this demo: `jane.doe` and `richard.roe` (the passwords are the same as the user names).
185186
`jane.doe` has permission to view all DAGs but only has permission to activate and run `core_deferrable_sleep_demo`.
186187
`richard.roe` does not have permission to view or action any DAGs.
187188
Login in as `jane.doe`.
188-
You will see the list of 4 DAGs as usual, and can enable `core_deferrable_sleep_demo` (the only DAG not automatically enabled when the demo was deployed).
189+
Select the DAGs view, making sure to set the filter from `Enabled` to `All`.
190+
You will see the list of 4 DAGs, and can enable `core_deferrable_sleep_demo` (the only DAG not automatically enabled when the demo was deployed).
189191
But if you try and run any other DAG, permission will be denied:
190192

191193
image::airflow-scheduled-job/airflow_16.png[]
@@ -212,6 +214,7 @@ image::airflow-scheduled-job/opa_01.png[]
212214

213215
== Patching Airflow to stress-test DAG parsing using relevant environment variables
214216

217+
Log back into the UI as `admin`.
215218
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.
216219
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_).
217220
To include this in the list of DAGs (without removing the existing ones), an extra volumeMount is needed, as shown below.
@@ -230,20 +233,14 @@ spec:
230233
- name: airflow-dags
231234
mountPath: /dags/dag_factory.py
232235
subPath: dag_factory.py
233-
- name: airflow-dags
234-
mountPath: /dags/date_demo.py
235-
subPath: date_demo.py
236-
- name: airflow-dags
237-
mountPath: /dags/pyspark_pi.py
238-
subPath: pyspark_pi.py
239-
- name: airflow-dags
240-
mountPath: /dags/pyspark_pi.yaml
241-
subPath: pyspark_pi.yaml
236+
- name: kafka-tls-pem
237+
mountPath: /stackable/kafka-tls-pem
242238
webservers:
243239
roleGroups:
244240
default:
245241
envOverrides: &envOverrides
246242
AIRFLOW__CORE__DAGS_FOLDER: "/dags"
243+
PYTHONPATH: "/stackable/app/log_config:/dags"
247244
AIRFLOW__CORE__MIN_SERIALIZED_DAG_UPDATE_INTERVAL: "60"
248245
AIRFLOW__CORE__MIN_SERIALIZED_DAG_FETCH_INTERVAL: "60"
249246
AIRFLOW__DAG_PROCESSOR__MIN_FILE_PROCESS_INTERVAL: "60"
@@ -261,7 +258,7 @@ THe patch can be applied like this:
261258

262259
[source,console]
263260
----
264-
kubectl patch airflowcluster airflow --type="merge" --patch-file stacks/airflow/patch_airflow.yaml
261+
kubectl patch airflowcluster airflow --type="merge" --patch-file stacks/airflow/patch_airflow.yaml -n airflow-demo
265262
----
266263

267264
[NOTE]

stacks/airflow/patch_airflow.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@ spec:
99
- name: airflow-dags
1010
mountPath: /dags/dag_factory.py
1111
subPath: dag_factory.py
12-
- name: airflow-dags
13-
mountPath: /dags/date_demo.py
14-
subPath: date_demo.py
15-
- name: airflow-dags
16-
mountPath: /dags/pyspark_pi.py
17-
subPath: pyspark_pi.py
18-
- name: airflow-dags
19-
mountPath: /dags/pyspark_pi.yaml
20-
subPath: pyspark_pi.yaml
12+
- name: kafka-tls-pem
13+
mountPath: /stackable/kafka-tls-pem
2114
webservers:
2215
roleGroups:
2316
default:
2417
envOverrides: &envOverrides
2518
AIRFLOW__CORE__DAGS_FOLDER: "/dags"
19+
PYTHONPATH: "/stackable/app/log_config:/dags"
2620
AIRFLOW__CORE__MIN_SERIALIZED_DAG_UPDATE_INTERVAL: "60"
2721
AIRFLOW__CORE__MIN_SERIALIZED_DAG_FETCH_INTERVAL: "60"
2822
AIRFLOW__DAG_PROCESSOR__MIN_FILE_PROCESS_INTERVAL: "60"

0 commit comments

Comments
 (0)