domino-py-iisas 1.0.9__py3-none-any.whl → 1.0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- domino/VERSION +1 -1
- domino/cli/utils/platform.py +74 -95
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/METADATA +1 -1
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/RECORD +8 -8
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/WHEEL +0 -0
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/entry_points.txt +0 -0
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/licenses/LICENSE +0 -0
- {domino_py_iisas-1.0.9.dist-info → domino_py_iisas-1.0.11.dist-info}/top_level.txt +0 -0
domino/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.11
|
domino/cli/utils/platform.py
CHANGED
|
@@ -9,7 +9,7 @@ import requests
|
|
|
9
9
|
import time
|
|
10
10
|
from concurrent.futures import ThreadPoolExecutor
|
|
11
11
|
import base64
|
|
12
|
-
import
|
|
12
|
+
import secrets
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
from rich.console import Console
|
|
15
15
|
from yaml.resolver import BaseResolver
|
|
@@ -429,6 +429,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
429
429
|
"data": {
|
|
430
430
|
"metadataSecretName": 'airflow-metadata-secret'
|
|
431
431
|
},
|
|
432
|
+
"webserverSecretKey": secrets.token_hex(16),
|
|
432
433
|
**workers,
|
|
433
434
|
**scheduler,
|
|
434
435
|
}
|
|
@@ -444,112 +445,90 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
444
445
|
|
|
445
446
|
# External database for the Airflow metastore (due to [changes](https://github.com/bitnami/containers/issues/83267) related to bitnami images since [v1.12.0](https://airflow.apache.org/docs/helm-chart/1.12.0/release_notes.html#the-helm-chart-is-now-using-a-newer-version-of-bitnami-postgresql-dependency-34817))
|
|
446
447
|
if not airflow_values_override_config['postgresql']['enabled']:
|
|
447
|
-
console.print('
|
|
448
|
+
console.print('Using external database for the Apache Airflow metastore.')
|
|
448
449
|
|
|
449
450
|
# create secret for the Airflow metastore
|
|
450
|
-
airflow_db_host = platform_config['airflow_db'].get('AIRFLOW_DB_HOST', 'airflow-postgres')
|
|
451
|
+
airflow_db_host = platform_config['airflow_db'].get('AIRFLOW_DB_HOST', 'airflow-postgres-rw')
|
|
451
452
|
airflow_db_port = platform_config['airflow_db'].get('AIRFLOW_DB_PORT', 5432)
|
|
452
453
|
airflow_db_user = platform_config['airflow_db'].get('AIRFLOW_DB_USER', 'airflow')
|
|
453
454
|
airflow_db_password = platform_config['airflow_db'].get('AIRFLOW_DB_PASSWORD', 'airflow')
|
|
454
455
|
airflow_db_name = platform_config['airflow_db'].get('AIRFLOW_DB_NAME', 'postgres')
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
"helm", "
|
|
475
|
-
|
|
476
|
-
"
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
"
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
"
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
"storage": {
|
|
496
|
-
"size": "1Gi"
|
|
456
|
+
|
|
457
|
+
if not platform_config['airflow_db'].get('AIRFLOW_DB_HOST', False):
|
|
458
|
+
console.print('Installing external database for the Apache Airflow metastore...')
|
|
459
|
+
result = subprocess.run(
|
|
460
|
+
[
|
|
461
|
+
"kubectl",
|
|
462
|
+
"create",
|
|
463
|
+
"secret",
|
|
464
|
+
"generic",
|
|
465
|
+
f"{airflow_values_override_config['data']['metadataSecretName']}",
|
|
466
|
+
f"--from-literal=connection=postgresql://{airflow_db_user}:{airflow_db_password}@{airflow_db_host}:{airflow_db_port}/{airflow_db_name}",
|
|
467
|
+
f"--from-literal=username={airflow_db_user}",
|
|
468
|
+
f"--from-literal=password={airflow_db_password}",
|
|
469
|
+
]
|
|
470
|
+
)
|
|
471
|
+
if result.returncode != 0:
|
|
472
|
+
error_message = result.stderr.strip() if result.stderr else result.stdout.strip()
|
|
473
|
+
|
|
474
|
+
console.print("Adding CloudNativePG repository...")
|
|
475
|
+
subprocess.run(["helm", "repo", "add", "cnpg", "https://cloudnative-pg.github.io/charts"])
|
|
476
|
+
|
|
477
|
+
console.print("Updating helm repositories...")
|
|
478
|
+
subprocess.run(["helm", "repo", "update", "cnpg"])
|
|
479
|
+
|
|
480
|
+
console.print("Installing CloudNativePG operator...")
|
|
481
|
+
subprocess.run(["helm", "install", "cnpg", "--namespace", "default", "--set", "config.clusterWide=false", "cnpg/cloudnative-pg", "--hide-notes"])
|
|
482
|
+
|
|
483
|
+
console.print("Waiting fot the CloudNativePG operator to be ready...")
|
|
484
|
+
subprocess.run(["kubectl", "wait", "--namespace", "default", "--for", "condition=Available", "deployment/cnpg-cloudnative-pg", "--timeout=60s"])
|
|
485
|
+
|
|
486
|
+
# deploy Airflow metastore database
|
|
487
|
+
airflow_db_image = platform_config['airflow_db'].get('AIRFLOW_DB_IMAGE', 'ghcr.io/cloudnative-pg/postgresql')
|
|
488
|
+
airflow_db_image_tag = platform_config['airflow_db'].get('AIRFLOW_DB_IMAGE_TAG', '13')
|
|
489
|
+
airflow_db_manifest = [
|
|
490
|
+
{
|
|
491
|
+
"apiVersion": "postgresql.cnpg.io/v1",
|
|
492
|
+
"kind": "Cluster",
|
|
493
|
+
"metadata": {
|
|
494
|
+
"name": "airflow-postgres",
|
|
495
|
+
"namespace": "default"
|
|
497
496
|
},
|
|
498
|
-
"
|
|
499
|
-
"
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
"
|
|
503
|
-
|
|
497
|
+
"spec": {
|
|
498
|
+
"instances": 1,
|
|
499
|
+
"imageName": f"{airflow_db_image}:{airflow_db_image_tag}",
|
|
500
|
+
"storage": {
|
|
501
|
+
"size": "1Gi"
|
|
502
|
+
},
|
|
503
|
+
"bootstrap": {
|
|
504
|
+
"initdb": {
|
|
505
|
+
"database": f"{airflow_db_name}",
|
|
506
|
+
"owner": f"{airflow_db_user}",
|
|
507
|
+
"secret": {
|
|
508
|
+
"name": f"{airflow_values_override_config['data']['metadataSecretName']}"
|
|
509
|
+
},
|
|
510
|
+
"encoding": "UTF-8"
|
|
504
511
|
}
|
|
505
512
|
}
|
|
506
513
|
}
|
|
507
514
|
}
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
"apiVersion": "v1",
|
|
511
|
-
"kind": "Service",
|
|
512
|
-
"metadata": {
|
|
513
|
-
"name": "airflow-postgres-service",
|
|
514
|
-
"namespace": "default"
|
|
515
|
-
},
|
|
516
|
-
"spec": {
|
|
517
|
-
"type": "ClusterIP",
|
|
518
|
-
"selector": {
|
|
519
|
-
"app": "airflow-postgres"
|
|
520
|
-
},
|
|
521
|
-
"ports": [
|
|
522
|
-
{
|
|
523
|
-
"protocol": "TCP",
|
|
524
|
-
"port": 5432,
|
|
525
|
-
"targetPort": 5432
|
|
526
|
-
}
|
|
527
|
-
]
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
]
|
|
531
|
-
|
|
532
|
-
with NamedTemporaryFile(suffix='.yaml', mode="w", delete_on_close=False) as fp:
|
|
533
|
-
# Dump as separate YAML documents
|
|
534
|
-
yaml_output = "\n---\n".join(
|
|
535
|
-
yaml.safe_dump(doc, sort_keys=False) for doc in airflow_db_manifest
|
|
536
|
-
)
|
|
537
|
-
fp.write(yaml_output)
|
|
538
|
-
fp.close()
|
|
539
|
-
commands = [
|
|
540
|
-
"kubectl", "apply", "-f", str(fp.name), "--validate=false"
|
|
541
|
-
]
|
|
542
|
-
subprocess.run(commands, stdout=subprocess.DEVNULL)
|
|
543
|
-
commands = [
|
|
544
|
-
"kubectl", "wait", "--namespace", "default", "--for", "condition=Ready", "cluster/airflow-postgres", "--timeout=60s"
|
|
545
515
|
]
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
516
|
+
|
|
517
|
+
with NamedTemporaryFile(suffix='.yaml', mode="w", delete_on_close=False) as fp:
|
|
518
|
+
# Dump as separate YAML documents
|
|
519
|
+
yaml_output = "\n---\n".join(
|
|
520
|
+
yaml.safe_dump(doc, sort_keys=False) for doc in airflow_db_manifest
|
|
521
|
+
)
|
|
522
|
+
fp.write(yaml_output)
|
|
523
|
+
fp.close()
|
|
524
|
+
subprocess.run(["kubectl", "apply", "-f", str(fp.name)], stdout=subprocess.DEVNULL)
|
|
525
|
+
result = subprocess.run(["kubectl", "wait", "--namespace", "default", "--for", "condition=Ready", "cluster/airflow-postgres", "--timeout=60s"])
|
|
526
|
+
if result.returncode != 0:
|
|
527
|
+
error_message = result.stderr.strip() if result.stderr else result.stdout.strip() if result.stdout else 'no details given'
|
|
528
|
+
raise Exception(f"An error occurred while installing database for Apache Airflow metastore: {error_message}")
|
|
529
|
+
|
|
530
|
+
console.print("database for the Apache Airflow metastore installed successfully!", style=f"bold {COLOR_PALETTE.get('success')}")
|
|
531
|
+
console.print("")
|
|
553
532
|
|
|
554
533
|
# Create temporary file with airflow values
|
|
555
534
|
with NamedTemporaryFile(suffix='.yaml', mode="w") as fp:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: domino-py-iisas
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Fork of the original Python package for Domino.
|
|
5
5
|
Author-email: Stefan Dlugolinsky <stefan.dlugolinsky@savba.sk>, Luiz Tauffer <luiz@taufferconsulting.com>, Vinicius Vaz <vinicius@taufferconsulting.com>
|
|
6
6
|
License:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
domino/VERSION,sha256=
|
|
1
|
+
domino/VERSION,sha256=tp2sshlQpVXDKBLvZuwhU-NA7V8OSwIrMCMAVoiQe2s,6
|
|
2
2
|
domino/__init__.py,sha256=I3dmIBqKnlYjo-VFCDdA_7YUqsNT-i9QtQqXnV9pW4U,233
|
|
3
3
|
domino/base_piece.py,sha256=LZE08XqU63Zq_W7G9DuFk8ZEjKNhgSE7pumXBctW9BE,17610
|
|
4
4
|
domino/logger.py,sha256=08Km3_NmgYH3HrxJjZJWGSmOv7dE5E5xvo9_ZnKut_o,889
|
|
@@ -12,7 +12,7 @@ domino/cli/utils/config-domino-local.toml,sha256=9Mu2GBHeYNLxt9o3be_7Hzl-li2USNC
|
|
|
12
12
|
domino/cli/utils/constants.py,sha256=8CbuNpXqCFCFjtcRt1X3_2i0udPerdUbIs4Z35AFRhc,252
|
|
13
13
|
domino/cli/utils/docker-compose.yaml,sha256=r2M5-Unp5MXvkCYLVy9Z4qXVN1onYlncTqlHHJaKJQc,12667
|
|
14
14
|
domino/cli/utils/pieces_repository.py,sha256=5lkUZtY3PH5pSwenNDi2kGfxWLL4v2uWLNYI62Sd16Q,22760
|
|
15
|
-
domino/cli/utils/platform.py,sha256=
|
|
15
|
+
domino/cli/utils/platform.py,sha256=OV_YHfmfznC8JJuywyO6Ni5fyl5abQjEtyjhsP_cMCs,48330
|
|
16
16
|
domino/cli/utils/templates.py,sha256=b7YhxqblrWeFhxmYiFh_iqRcJxIUZgPiaWhOHeb0shY,1982
|
|
17
17
|
domino/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
domino/client/domino_backend_client.py,sha256=GuE4nZYt7Ke8vrnSa7o2VRAUYvy19RdyYwJD6WpoAik,2861
|
|
@@ -63,9 +63,9 @@ domino/utils/__init__.py,sha256=7CET-zz6y1EBuBJQLgF3rXNhKOSj32Z3X_3mKUAirII,231
|
|
|
63
63
|
domino/utils/metadata_default.py,sha256=4tbmWoVuoRMxd2c2vkwKYLkTTDf1I0OooXB_P5DGWXM,455
|
|
64
64
|
domino/utils/piece_generator.py,sha256=Yww5PwH-EDLqNrnWAinCgpG5-uQSVi_3UbMw4HZCE-E,514
|
|
65
65
|
domino/utils/workflow_shared_storage.py,sha256=USt_Q6nRGrtbcgrWHjtEvBDMSGSDd3BwUrZVe0RItH0,272
|
|
66
|
-
domino_py_iisas-1.0.
|
|
67
|
-
domino_py_iisas-1.0.
|
|
68
|
-
domino_py_iisas-1.0.
|
|
69
|
-
domino_py_iisas-1.0.
|
|
70
|
-
domino_py_iisas-1.0.
|
|
71
|
-
domino_py_iisas-1.0.
|
|
66
|
+
domino_py_iisas-1.0.11.dist-info/licenses/LICENSE,sha256=ZOzivsSTOmVUr23IVL-IMv2nDRhWBp4hVxwYTNe4fBc,11353
|
|
67
|
+
domino_py_iisas-1.0.11.dist-info/METADATA,sha256=XQR3hkWFu2gtuwwAH-bjv_SM3I9SiSpBP9mqQX-ovbw,17096
|
|
68
|
+
domino_py_iisas-1.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
domino_py_iisas-1.0.11.dist-info/entry_points.txt,sha256=EBX10akoWncqaYPjad7nTNFpge2bbooLSZJGPT-Ivzk,46
|
|
70
|
+
domino_py_iisas-1.0.11.dist-info/top_level.txt,sha256=Mo0jr96Ke1GnB5Qa_U9nSu_7yRSWsu5dvPJk8RFiwRw,7
|
|
71
|
+
domino_py_iisas-1.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|