domino-py-iisas 1.0.6__tar.gz → 1.0.8__tar.gz
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_py_iisas-1.0.6/src/domino_py_iisas.egg-info → domino_py_iisas-1.0.8}/PKG-INFO +1 -1
- domino_py_iisas-1.0.8/src/domino/VERSION +1 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/cli.py +24 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/config-domino-local.toml +10 -5
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/platform.py +133 -24
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8/src/domino_py_iisas.egg-info}/PKG-INFO +1 -1
- domino_py_iisas-1.0.6/src/domino/VERSION +0 -1
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/LICENSE +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/README.md +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/pyproject.toml +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/setup.cfg +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/actions/github_actions.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/base_piece.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/tests/test_create_piece.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/constants.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/docker-compose.yaml +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/pieces_repository.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/templates.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/domino_backend_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/github_rest_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/legacy/fs_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/legacy/s3_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/client/local_files_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/deprecated/base_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/deprecated/external_python_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/docker_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/k8s_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/python_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/fuse.conf +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/logger.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/mount.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/rclone.conf +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/sidecar_lifecycle.sh +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/worker_operator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/exceptions/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/exceptions/exceptions.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/logger.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/models/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/models/output_modifier.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/container_resources.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/deploy_mode.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/display_result.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/piece_metadata.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/schemas/shared_storage.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/build_docker_images_pieces.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/create_docker_compose_file.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/deprecated_piece_dry_run.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/docker_compose_constants.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/docker_compose_scripts.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/run_piece_bash.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/load_piece.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/run_piece_docker.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/storage/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/storage/s3.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/task.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/testing/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/testing/dry_run.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/testing/http_client.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/testing/http_server.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/testing/utils.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/utils/__init__.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/utils/metadata_default.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/utils/piece_generator.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/utils/workflow_shared_storage.py +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/SOURCES.txt +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/dependency_links.txt +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/entry_points.txt +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/requires.txt +0 -0
- {domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: domino-py-iisas
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
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:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.8
|
|
@@ -48,6 +48,14 @@ def get_cluster_name_from_env():
|
|
|
48
48
|
return cluster_name
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
def get_cluster_http_port_from_env():
|
|
52
|
+
return os.environ.get("DOMINO_KIND_CLUSTER_HTTP_PORT", 80)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def get_cluster_https_port_from_env():
|
|
56
|
+
return int(os.environ.get("DOMINO_KIND_CLUSTER_HTTPS_PORT", 443))
|
|
57
|
+
|
|
58
|
+
|
|
51
59
|
def get_github_workflows_ssh_private_key_from_env():
|
|
52
60
|
return os.environ.get("DOMINO_GITHUB_WORKFLOWS_SSH_PRIVATE_KEY", "")
|
|
53
61
|
|
|
@@ -83,6 +91,18 @@ def get_github_token_pieces_from_config_or_env():
|
|
|
83
91
|
default=get_cluster_name_from_env,
|
|
84
92
|
help='Define the name for the local k8s cluster.'
|
|
85
93
|
)
|
|
94
|
+
@click.option(
|
|
95
|
+
'--http-port',
|
|
96
|
+
prompt='Local cluster HTTP port',
|
|
97
|
+
default=get_cluster_http_port_from_env,
|
|
98
|
+
help='Define the HTTP port for the local k8s cluster.'
|
|
99
|
+
)
|
|
100
|
+
@click.option(
|
|
101
|
+
'--https-port',
|
|
102
|
+
prompt='Local cluster HTTPS port',
|
|
103
|
+
default=get_cluster_https_port_from_env,
|
|
104
|
+
help='Define the HTTPS port for the local k8s cluster.'
|
|
105
|
+
)
|
|
86
106
|
@click.option(
|
|
87
107
|
'--workflows-repository',
|
|
88
108
|
prompt='Workflows repository',
|
|
@@ -145,6 +165,8 @@ def get_github_token_pieces_from_config_or_env():
|
|
|
145
165
|
)
|
|
146
166
|
def cli_prepare_platform(
|
|
147
167
|
cluster_name,
|
|
168
|
+
http_port,
|
|
169
|
+
https_port,
|
|
148
170
|
workflows_repository,
|
|
149
171
|
github_workflows_ssh_private_key,
|
|
150
172
|
github_default_pieces_repository_token,
|
|
@@ -160,6 +182,8 @@ def cli_prepare_platform(
|
|
|
160
182
|
"""Prepare local folder for running a Domino platform."""
|
|
161
183
|
platform.prepare_platform(
|
|
162
184
|
cluster_name=cluster_name,
|
|
185
|
+
http_port=int(http_port),
|
|
186
|
+
https_port=int(https_port),
|
|
163
187
|
workflows_repository=workflows_repository,
|
|
164
188
|
github_workflows_ssh_private_key=github_workflows_ssh_private_key,
|
|
165
189
|
github_default_pieces_repository_token=github_default_pieces_repository_token,
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/cli/utils/config-domino-local.toml
RENAMED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
# Configuration file for running Domino platform locally
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
[airflow_db]
|
|
3
|
+
AIRFLOW_DB_IMAGE = "ghcr.io/cloudnative-pg/postgresql"
|
|
4
|
+
AIRFLOW_DB_IMAGE_TAG = "13"
|
|
5
|
+
AIRFLOW_DB_HOST = "airflow-postgresql"
|
|
6
|
+
AIRFLOW_DB_PORT = 5432
|
|
7
|
+
AIRFLOW_DB_USER = "airflow"
|
|
8
|
+
AIRFLOW_DB_PASSWORD = "airflow"
|
|
9
|
+
AIRFLOW_DB_NAME = "postgres"
|
|
5
10
|
|
|
6
11
|
[path]
|
|
7
12
|
DOMINO_LOCAL_RUNNING_PATH = ""
|
|
8
13
|
|
|
9
14
|
[kind]
|
|
10
15
|
DOMINO_KIND_CLUSTER_NAME = "domino-cluster"
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
DOMINO_KIND_CLUSTER_HTTP_PORT = 80
|
|
17
|
+
DOMINO_KIND_CLUSTER_HTTPS_PORT = 443
|
|
13
18
|
|
|
14
19
|
[github]
|
|
15
20
|
DOMINO_GITHUB_WORKFLOWS_REPOSITORY = ""
|
|
@@ -9,6 +9,7 @@ import requests
|
|
|
9
9
|
import time
|
|
10
10
|
from concurrent.futures import ThreadPoolExecutor
|
|
11
11
|
import base64
|
|
12
|
+
import sys
|
|
12
13
|
from pathlib import Path
|
|
13
14
|
from rich.console import Console
|
|
14
15
|
from yaml.resolver import BaseResolver
|
|
@@ -58,6 +59,8 @@ def create_ssh_pair_key() -> None:
|
|
|
58
59
|
|
|
59
60
|
def prepare_platform(
|
|
60
61
|
cluster_name: str,
|
|
62
|
+
http_port: int,
|
|
63
|
+
https_port: int,
|
|
61
64
|
workflows_repository: str,
|
|
62
65
|
github_workflows_ssh_private_key: str,
|
|
63
66
|
github_default_pieces_repository_token: str,
|
|
@@ -78,6 +81,10 @@ def prepare_platform(
|
|
|
78
81
|
config_dict["path"]["DOMINO_LOCAL_RUNNING_PATH"] = running_path
|
|
79
82
|
config_dict["kind"]["DOMINO_KIND_CLUSTER_NAME"] = cluster_name
|
|
80
83
|
config_dict['kind']['DOMINO_DEPLOY_MODE'] = deploy_mode
|
|
84
|
+
config_dict["kind"]["DOMINO_KIND_CLUSTER_HTTP_PORT"] = http_port
|
|
85
|
+
config_dict["kind"]["DOMINO_KIND_CLUSTER_HTTPS_PORT"] = https_port
|
|
86
|
+
|
|
87
|
+
config_dict["domino_frontend"]["API_URL"] = "http://localhost{}/api".format(f":{http_port}")
|
|
81
88
|
|
|
82
89
|
if deploy_mode == 'local-k8s-dev':
|
|
83
90
|
config_dict['dev']['DOMINO_AIRFLOW_IMAGE'] = local_airflow_image
|
|
@@ -171,19 +178,13 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
171
178
|
extraPortMappings=[
|
|
172
179
|
dict(
|
|
173
180
|
containerPort=80,
|
|
174
|
-
hostPort=platform_config['kind'].get('
|
|
181
|
+
hostPort=platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTP_PORT', 80),
|
|
175
182
|
listenAddress="0.0.0.0",
|
|
176
183
|
protocol="TCP"
|
|
177
184
|
),
|
|
178
185
|
dict(
|
|
179
186
|
containerPort=443,
|
|
180
|
-
hostPort=platform_config['kind'].get('
|
|
181
|
-
listenAddress="0.0.0.0",
|
|
182
|
-
protocol="TCP"
|
|
183
|
-
),
|
|
184
|
-
dict(
|
|
185
|
-
containerPort=8080,
|
|
186
|
-
hostPort=platform_config['airflow'].get('AIRFLOW_API_SERVER_PORT_HOST', 8080),
|
|
187
|
+
hostPort=platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTPS_PORT', 443),
|
|
187
188
|
listenAddress="0.0.0.0",
|
|
188
189
|
protocol="TCP"
|
|
189
190
|
)
|
|
@@ -263,7 +264,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
263
264
|
|
|
264
265
|
if local_domino_rest_image:
|
|
265
266
|
console.print(f"Loading local REST image {local_domino_rest_image} to Kind cluster...")
|
|
266
|
-
subprocess.run(["kind", "load", "docker-image", local_domino_rest_image
|
|
267
|
+
subprocess.run(["kind", "load", "docker-image", local_domino_rest_image, "--name", cluster_name, "--nodes", f"{cluster_name}-worker"])
|
|
267
268
|
domino_rest_image = f'docker.io/library/{local_domino_rest_image}'
|
|
268
269
|
elif platform_config['kind']["DOMINO_DEPLOY_MODE"] == 'local-k8s-dev':
|
|
269
270
|
domino_rest_image = "ghcr.io/iisas/domino-rest:latest-dev"
|
|
@@ -301,7 +302,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
301
302
|
"image": domino_frontend_image,
|
|
302
303
|
"apiEnv": "dev" if platform_config['kind']["DOMINO_DEPLOY_MODE"] in ['local-k8s-dev', 'local-k8s'] else 'prod',
|
|
303
304
|
"deployMode": platform_config['kind']["DOMINO_DEPLOY_MODE"],
|
|
304
|
-
"apiUrl": platform_config['domino_frontend'].get('API_URL', 'http://localhost:{}/api'.format(platform_config['kind'].get('
|
|
305
|
+
"apiUrl": platform_config['domino_frontend'].get('API_URL', 'http://localhost:{}/api'.format(platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTP_PORT', 80))),
|
|
305
306
|
"baseName": platform_config['domino_frontend'].get('BASE_NAME', '/')
|
|
306
307
|
},
|
|
307
308
|
"rest": {
|
|
@@ -309,14 +310,6 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
309
310
|
"image": domino_rest_image,
|
|
310
311
|
"workflowsRepository": platform_config['github']['DOMINO_GITHUB_WORKFLOWS_REPOSITORY'],
|
|
311
312
|
"createDefaultUser": platform_config['domino_db'].get('DOMINO_CREATE_DEFAULT_USER', True)
|
|
312
|
-
},
|
|
313
|
-
"database": {
|
|
314
|
-
"enabled": db_enabled,
|
|
315
|
-
"image": "postgres:13",
|
|
316
|
-
"name": "postgres",
|
|
317
|
-
"user": "postgres",
|
|
318
|
-
"password": "postgres",
|
|
319
|
-
"port": "5432",
|
|
320
313
|
}
|
|
321
314
|
}
|
|
322
315
|
|
|
@@ -326,7 +319,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
326
319
|
domino_values_override_config['database'] = {
|
|
327
320
|
**domino_values_override_config['database'],
|
|
328
321
|
"host": platform_config['domino_db']["DOMINO_DB_HOST"],
|
|
329
|
-
"name":
|
|
322
|
+
"name": platform_config['domino_db']["DOMINO_DB_NAME"],
|
|
330
323
|
"user": platform_config['domino_db']["DOMINO_DB_USER"],
|
|
331
324
|
"password": platform_config['domino_db']["DOMINO_DB_PASSWORD"],
|
|
332
325
|
"port": str(platform_config['domino_db'].get("DOMINO_DB_PORT", 5432))
|
|
@@ -430,6 +423,12 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
430
423
|
"sidecar.istio.io/inject": "false"
|
|
431
424
|
},
|
|
432
425
|
},
|
|
426
|
+
"postgresql": {
|
|
427
|
+
"enabled": False,
|
|
428
|
+
},
|
|
429
|
+
"data": {
|
|
430
|
+
"metadataSecretName": 'airflow-metadata-secret'
|
|
431
|
+
},
|
|
433
432
|
**workers,
|
|
434
433
|
**scheduler,
|
|
435
434
|
}
|
|
@@ -442,6 +441,116 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
442
441
|
# Install Airflow Helm Chart
|
|
443
442
|
if install_airflow:
|
|
444
443
|
console.print('Installing Apache Airflow...')
|
|
444
|
+
|
|
445
|
+
# 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
|
+
if not airflow_values_override_config['postgresql']['enabled']:
|
|
447
|
+
console.print('Installing external database for the Apache Airflow metastore...')
|
|
448
|
+
|
|
449
|
+
# create secret for the Airflow metastore
|
|
450
|
+
airflow_db_host = platform_config['airflow_db'].get('AIRFLOW_DB_HOST', 'airflow-postgres')
|
|
451
|
+
airflow_db_port = platform_config['airflow_db'].get('AIRFLOW_DB_PORT', 5432)
|
|
452
|
+
airflow_db_user = platform_config['airflow_db'].get('AIRFLOW_DB_USER', 'airflow')
|
|
453
|
+
airflow_db_password = platform_config['airflow_db'].get('AIRFLOW_DB_PASSWORD', 'airflow')
|
|
454
|
+
airflow_db_name = platform_config['airflow_db'].get('AIRFLOW_DB_NAME', 'postgres')
|
|
455
|
+
result = subprocess.run(["kubectl", "create", "secret", "generic",
|
|
456
|
+
f"{airflow_values_override_config['data']['metadataSecretName']}",
|
|
457
|
+
f"--from-literal=connection=postgresql://{airflow_db_user}:{airflow_db_password}@{airflow_db_host}:{airflow_db_port}/{airflow_db_name}"])
|
|
458
|
+
if result.returncode != 0:
|
|
459
|
+
error_message = result.stderr.strip() if result.stderr else result.stdout.strip()
|
|
460
|
+
|
|
461
|
+
# deploy Airflow metastore database
|
|
462
|
+
airflow_db_image = platform_config['airflow_db'].get('AIRFLOW_DB_IMAGE',
|
|
463
|
+
'ghcr.io/cloudnative-pg/postgresql')
|
|
464
|
+
airflow_db_image_tag = platform_config['airflow_db'].get('AIRFLOW_DB_IMAGE_TAG', '13')
|
|
465
|
+
cnpg_operator_add_repo_command = [
|
|
466
|
+
"helm", "repo", "add", "cnpg", "https://cloudnative-pg.github.io/charts"
|
|
467
|
+
]
|
|
468
|
+
console.print("Adding CloudNativePG repository...")
|
|
469
|
+
subprocess.run(cnpg_operator_add_repo_command)
|
|
470
|
+
helm_update_command = ["helm", "repo", "update", "cnpg"]
|
|
471
|
+
console.print("Updating helm repositories...")
|
|
472
|
+
subprocess.run(helm_update_command)
|
|
473
|
+
cnpg_operator_install_command = [
|
|
474
|
+
"helm", "install", "cnpg",
|
|
475
|
+
"--namespace", "cnpg-system",
|
|
476
|
+
"--create-namespace",
|
|
477
|
+
"--set", "config.clusterWide=false",
|
|
478
|
+
"cnpg/cloudnative-pg",
|
|
479
|
+
"--hide-notes"
|
|
480
|
+
]
|
|
481
|
+
console.print("Installing CloudNativePG operator...")
|
|
482
|
+
subprocess.run(cnpg_operator_install_command)
|
|
483
|
+
|
|
484
|
+
airflow_db_manifest = [
|
|
485
|
+
{
|
|
486
|
+
"apiVersion": "postgresql.cnpg.io/v1",
|
|
487
|
+
"kind": "Cluster",
|
|
488
|
+
"metadata": {
|
|
489
|
+
"name": "airflow-postgres",
|
|
490
|
+
"namespace": "default"
|
|
491
|
+
},
|
|
492
|
+
"spec": {
|
|
493
|
+
"instances": 1,
|
|
494
|
+
"imageName": f"{airflow_db_image}:{airflow_db_image_tag}",
|
|
495
|
+
"storage": {
|
|
496
|
+
"size": "1Gi"
|
|
497
|
+
},
|
|
498
|
+
"bootstrap": {
|
|
499
|
+
"initdb": {
|
|
500
|
+
"database": f"{airflow_db_name}",
|
|
501
|
+
"owner": f"{airflow_db_user}",
|
|
502
|
+
"secret": {
|
|
503
|
+
"name": f"{airflow_values_override_config['data']['metadataSecretName']}"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
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
|
+
]
|
|
546
|
+
result = subprocess.run(commands)
|
|
547
|
+
if result.returncode != 0:
|
|
548
|
+
error_message = result.stderr.strip() if result.stderr else result.stdout.strip() if result.stdout else 'no details given'
|
|
549
|
+
raise Exception(f"An error occurred while installing database for Apache Airflow metastore: {error_message}")
|
|
550
|
+
|
|
551
|
+
console.print("database for the Apache Airflow metastore installed successfully!", style=f"bold {COLOR_PALETTE.get('success')}")
|
|
552
|
+
console.print("")
|
|
553
|
+
|
|
445
554
|
# Create temporary file with airflow values
|
|
446
555
|
with NamedTemporaryFile(suffix='.yaml', mode="w") as fp:
|
|
447
556
|
yaml.dump(airflow_values_override_config, fp)
|
|
@@ -464,7 +573,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
464
573
|
commands = [
|
|
465
574
|
"helm", "install",
|
|
466
575
|
"-f", str(fp.name),
|
|
467
|
-
"domino
|
|
576
|
+
"domino",
|
|
468
577
|
helm_domino_path
|
|
469
578
|
]
|
|
470
579
|
subprocess.run(commands)
|
|
@@ -486,7 +595,7 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
486
595
|
commands = [
|
|
487
596
|
"helm", "install",
|
|
488
597
|
"-f", str(fp.name),
|
|
489
|
-
"domino
|
|
598
|
+
"domino",
|
|
490
599
|
f"{tmp_dir}/domino",
|
|
491
600
|
]
|
|
492
601
|
subprocess.run(commands)
|
|
@@ -653,9 +762,9 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None
|
|
|
653
762
|
|
|
654
763
|
console.print("")
|
|
655
764
|
console.print("K8s resources created successfully!", style=f"bold {COLOR_PALETTE.get('success')}")
|
|
656
|
-
console.print("You can now access the Domino frontend at: http://localhost:{}/".format(platform_config['kind'].get('
|
|
657
|
-
console.print("Domino's REST API: http://localhost:{}/api/".format(platform_config['kind'].get('
|
|
658
|
-
console.print("Domino's REST API Swagger: http://localhost:{}/api/docs".format(platform_config['kind'].get('
|
|
765
|
+
console.print("You can now access the Domino frontend at: http://localhost:{}/".format(platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTP_PORT')))
|
|
766
|
+
console.print("Domino's REST API: http://localhost:{}/api/".format(platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTP_PORT')))
|
|
767
|
+
console.print("Domino's REST API Swagger: http://localhost:{}/api/docs".format(platform_config['kind'].get('DOMINO_KIND_CLUSTER_HTTP_PORT')))
|
|
659
768
|
console.print("")
|
|
660
769
|
|
|
661
770
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: domino-py-iisas
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
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 +0,0 @@
|
|
|
1
|
-
1.0.6
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/docker_operator.py
RENAMED
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/python_operator.py
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/__init__.py
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/fuse.conf
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/logger.py
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/mount.py
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/sidecar/rclone.conf
RENAMED
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/custom_operators/worker_operator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/build_docker_images_pieces.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino/scripts/deprecated/run_piece_bash.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{domino_py_iisas-1.0.6 → domino_py_iisas-1.0.8}/src/domino_py_iisas.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|