-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Ferlab-Ste-Justine/cqdg-642
feat: CQDG-642 Use docker image from variables
- Loading branch information
Showing
34 changed files
with
1,201 additions
and
1,307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
from airflow import DAG | ||
from airflow.models import Variable | ||
from datetime import datetime | ||
from lib.config import env, Env, K8sContext | ||
from lib.operators.arranger import ArrangerOperator | ||
from lib.config import keycloak_client_secret_name, env, Env, kube_config, es_url, es_port, es_credentials_secret_name,es_credentials_secret_key_password, es_credentials_secret_key_username | ||
from lib.operators.arranger import ArrangerConfig | ||
|
||
arranger_config = ArrangerConfig( | ||
es_url = es_url, | ||
node_environment= 'production' if env == Env.PROD else env, | ||
kube_config = kube_config, | ||
image = Variable.get('arranger_image'), | ||
es_port = es_port, | ||
es_cert_secret_name = 'opensearch-ca-certificate', | ||
es_credentials_secret_name = es_credentials_secret_name, | ||
es_credentials_secret_key_username = es_credentials_secret_key_username, | ||
es_credentials_secret_key_password = es_credentials_secret_key_password, | ||
keycloak_client_secret_name = keycloak_client_secret_name, | ||
) | ||
|
||
def arranger_task(): | ||
return arranger_config.args( | ||
'--experimental-modules=node', | ||
'--es-module-specifier-resolution=node', | ||
'admin/run.mjs') \ | ||
.operator( | ||
task_id='arranger_update_project', | ||
name='etl-publish-arranger-update-project', | ||
) | ||
with DAG( | ||
dag_id='update_arranger_project', | ||
dag_id='update-arranger-project', | ||
start_date=datetime(2022, 1, 1), | ||
schedule_interval=None, | ||
params={}, | ||
) as dag: | ||
arranger_task() | ||
|
||
|
||
arranger_update_project = ArrangerOperator( | ||
task_id='arranger_update_project', | ||
name='etl-publish-arranger-update-project', | ||
k8s_context=K8sContext.DEFAULT, | ||
cmds=['node', | ||
'--experimental-modules=node', | ||
'--es-module-specifier-resolution=node', | ||
'admin/run.mjs', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.