From 65cf4df08ed994c6a065410893e01b54bfd72b87 Mon Sep 17 00:00:00 2001 From: ish Date: Tue, 12 Nov 2024 18:46:32 +0900 Subject: [PATCH] airflow: workflow_template: Re-struct infra migration with e-mail notification --- .../migrate_infra_workflow.json | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/lib/airflow/example/workflow_template/migrate_infra_workflow.json b/lib/airflow/example/workflow_template/migrate_infra_workflow.json index f453430..019f19d 100644 --- a/lib/airflow/example/workflow_template/migrate_infra_workflow.json +++ b/lib/airflow/example/workflow_template/migrate_infra_workflow.json @@ -8,43 +8,33 @@ "description": "Migrate Server", "tasks": [ { - "name": "infra_import", - "task_component": "honeybee_task_import_infra", - "request_body": "", + "name": "infra_migration", + "task_component": "beetle_task_infra_migration", + "request_body": "{\n \"name\": \"mmci01\",\n \"installMonAgent\": \"no\",\n \"description\": \"A cloud infra recommended by CM-Beetle\",\n \"vm\": [\n {\n \"name\": \"rehosted-test-cm-nfs\",\n \"subGroupSize\": \"\",\n \"label\": null,\n \"description\": \"a recommended virtual machine\",\n \"commonSpec\": \"azure+koreacentral+standard_b2ls_v2\",\n \"commonImage\": \"azure+koreacentral+ubuntu22.04\"\n },\n {\n \"name\": \"rehosted-test-cm-web\",\n \"subGroupSize\": \"\",\n \"label\": null,\n \"description\": \"a recommended virtual machine\",\n \"commonSpec\": \"azure+koreacentral+standard_b2ls_v2\",\n \"commonImage\": \"azure+koreacentral+ubuntu22.04\"\n }\n ]\n}\n\n", "path_params": { - "sgId": "3e635238-0c4b-4f6e-9062-906f3dd5f571" - }, - "dependencies": [] + "nsId": "mig01" + } }, { - "name": "infra_recommend", - "task_component": "beetle_task_recommend_infra", - "request_body": "infra_import", - "query_params": { - "CSP": "aws", - "region": "ap-northeast-2" + "name": "register_target_to_source_group", + "task_component": "honeybee_register_target_info_to_source_group", + "request_body": "infra_migration", + "path_params": { + "sgId": "ddcfa917-17e0-4718-a878-f1e99f97ed6d" }, "dependencies": [ - "infra_get" - ] - }, - { - "name": "infra_migration", - "task_component": "beetle_task_infra_migration", - "request_body": "infra_recommend", - "dependencies": [ - "infra_recommend" + "infra_migration" ] }, { - "name": "register_target_to_source_group", - "task_component": "honeybee_register_target_info_to_source_group", + "name": "send_result_via_email", + "task_component": "trigger_email", "request_body": "infra_migration", "path_params": { - "sgId": "3e635238-0c4b-4f6e-9062-906f3dd5f571" + "sgId": "ddcfa917-17e0-4718-a878-f1e99f97ed6d" }, "dependencies": [ - "infra_migration" + "register_target_to_source_group" ] } ]