fast2dev 1.0.0__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.
Files changed (543) hide show
  1. f2dev/__init__.py +1 -0
  2. f2dev/__main__.py +5 -0
  3. f2dev/_bundle/platform/.dockerignore +80 -0
  4. f2dev/_bundle/platform/.gitignore +82 -0
  5. f2dev/_bundle/platform/LICENSE +202 -0
  6. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/template_values.yaml +1731 -0
  7. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/Chart.yaml +9 -0
  8. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-airflow-deploy.yaml +60 -0
  9. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-bi-sync.yaml +46 -0
  10. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-checkout.yaml +49 -0
  11. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-console-sync.yaml +41 -0
  12. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-label.yaml +48 -0
  13. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-run.yaml +43 -0
  14. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-teardown.yaml +47 -0
  15. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-governance.yaml +40 -0
  16. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-lint.yaml +37 -0
  17. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-notify.yaml +32 -0
  18. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-quality.yaml +38 -0
  19. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-refresh.yaml +36 -0
  20. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-supersede.yaml +30 -0
  21. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-tags.yaml +44 -0
  22. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-branch.yaml +138 -0
  23. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-main.yaml +150 -0
  24. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-pr.yaml +184 -0
  25. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/NOTES.txt +18 -0
  26. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/settings-configmap.yaml +14 -0
  27. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/workflowtemplates.yaml +31 -0
  28. f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/values.yaml +41 -0
  29. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml +436 -0
  30. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml +49 -0
  31. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml +551 -0
  32. f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml +9 -0
  33. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/lightdash/template_values.yaml +359 -0
  34. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/metabase/template_values.yaml +384 -0
  35. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/superset/template_values.yaml +1562 -0
  36. f2dev/_bundle/platform/charts/data_services_charts/data_analysis/template_values.yaml +269 -0
  37. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/.helmignore +15 -0
  38. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/Chart.yaml +20 -0
  39. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/template_values.yaml.j2 +175 -0
  40. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/NOTES.txt +19 -0
  41. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/_helpers.tpl +50 -0
  42. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/cicd-rbac.yaml +30 -0
  43. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/configmap.yaml +142 -0
  44. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/extras.yaml +14 -0
  45. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/ingress.yaml +69 -0
  46. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/promtail-configmap.yaml +68 -0
  47. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/secret.yaml +31 -0
  48. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/service.yaml +15 -0
  49. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/serviceaccount.yaml +12 -0
  50. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/statefulset.yaml +276 -0
  51. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/valkey.yaml +113 -0
  52. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/warehouse-stats-cronjob.yaml +107 -0
  53. f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/values.yaml +828 -0
  54. f2dev/_bundle/platform/charts/data_services_charts/data_dbt_server/template_values.yaml +385 -0
  55. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_prerequisites_values.yaml +118 -0
  56. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_values.yaml +1671 -0
  57. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_kafka_values.yaml +112 -0
  58. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_opensearch_values.yaml +662 -0
  59. f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_values.yaml +738 -0
  60. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/Chart.yaml +6 -0
  61. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/files/argo-openapi.json +681 -0
  62. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/_helpers.tpl +17 -0
  63. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/argo-rbac.yaml +35 -0
  64. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/backends.yaml +327 -0
  65. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/gateway.yaml +150 -0
  66. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/values.yaml +91 -0
  67. f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/template_values.yaml +142 -0
  68. f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values.yaml +1167 -0
  69. f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values_extra.yaml +99 -0
  70. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/Dockerfile +10 -0
  71. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/build.sh +38 -0
  72. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/cleanup.py +452 -0
  73. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/requirements.txt +3 -0
  74. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/docs/keycloak-oidc-setup.md +106 -0
  75. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values.yaml +5536 -0
  76. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values_extra.yaml +379 -0
  77. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml +459 -0
  78. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_auth.py +285 -0
  79. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_mcp_plugin.py +24 -0
  80. f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/webserver_config.py +130 -0
  81. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/Dockerfile +10 -0
  82. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/build.sh +38 -0
  83. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/cleanup.py +749 -0
  84. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/configmap.yaml +24 -0
  85. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/cronjob.yaml +137 -0
  86. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/requirements.txt +3 -0
  87. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/.helmignore +26 -0
  88. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.lock +3 -0
  89. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.yaml +15 -0
  90. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/README.md +243 -0
  91. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/NOTES.txt +31 -0
  92. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_helpers.tpl +245 -0
  93. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_images.tpl +17 -0
  94. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-auth-secret.yaml +35 -0
  95. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/bootloader-secrets.yaml +19 -0
  96. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/pod.yaml +126 -0
  97. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-connector-rollout-worker/deployment.yaml +171 -0
  98. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/cron-secrets.yaml +19 -0
  99. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/deployment.yaml +149 -0
  100. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-db.yaml +88 -0
  101. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/_helpers.tpl +111 -0
  102. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/deployment.yaml +169 -0
  103. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/hpa.yaml +23 -0
  104. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/pdb.yaml +17 -0
  105. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/service.yaml +25 -0
  106. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/serviceaccount.yaml +10 -0
  107. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/deployment.yaml +161 -0
  108. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/service.yaml +25 -0
  109. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/service.yaml +62 -0
  110. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/statefulset.yaml +182 -0
  111. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/_helpers.tpl +54 -0
  112. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/deployment.yaml +152 -0
  113. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/service.yaml +23 -0
  114. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/serviceaccount.yaml +10 -0
  115. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-metrics/deployment.yaml +124 -0
  116. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/deployment.yaml +227 -0
  117. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/service.yaml +29 -0
  118. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/deployment.yaml +184 -0
  119. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/service.yaml +21 -0
  120. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/configmap.yaml +55 -0
  121. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/deployment.yaml +220 -0
  122. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/service.yaml +21 -0
  123. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/deployment.yaml +122 -0
  124. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/service.yaml +23 -0
  125. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/deployment.yaml +146 -0
  126. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/ingress.yaml +63 -0
  127. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/service.yaml +32 -0
  128. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-worker/deployment.yaml +229 -0
  129. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/deployment.yaml +191 -0
  130. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/service.yaml +25 -0
  131. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/deployment.yaml +232 -0
  132. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/jobs-secrets.yaml +21 -0
  133. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_auth.tpl +944 -0
  134. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_aws.tpl +109 -0
  135. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cluster.tpl +82 -0
  136. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_common.tpl +370 -0
  137. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connector.tpl +58 -0
  138. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRollout.tpl +141 -0
  139. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRolloutWorker.tpl +56 -0
  140. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cron.tpl +62 -0
  141. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_customerio.tpl +56 -0
  142. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_database.tpl +375 -0
  143. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_dataplaneGroups.tpl +38 -0
  144. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_directJobRunner.tpl +122 -0
  145. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_featureFlags.tpl +126 -0
  146. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_java.tpl +38 -0
  147. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_jobs.tpl +422 -0
  148. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_keycloak.tpl +542 -0
  149. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_logging.tpl +38 -0
  150. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_metrics.tpl +214 -0
  151. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_micronaut.tpl +43 -0
  152. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_minio.tpl +64 -0
  153. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_secretsManager.tpl +628 -0
  154. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_server.tpl +533 -0
  155. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_shopify.tpl +83 -0
  156. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_stigg.tpl +157 -0
  157. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_storage.tpl +468 -0
  158. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_temporal.tpl +943 -0
  159. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_topology.tpl +98 -0
  160. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_tracking.tpl +82 -0
  161. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_webapp.tpl +38 -0
  162. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_worker.tpl +366 -0
  163. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadApiServer.tpl +62 -0
  164. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadLauncher.tpl +395 -0
  165. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloads.tpl +770 -0
  166. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/env-configmap.yaml +62 -0
  167. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/gcs-log-creds-secret.yaml +19 -0
  168. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/ingress.yaml +69 -0
  169. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/minio.yaml +161 -0
  170. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/secret.yaml +31 -0
  171. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/serviceaccount.yaml +50 -0
  172. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/telemetry-configmap.yaml +32 -0
  173. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/tests/test-webapp.yaml +34 -0
  174. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/values.yaml +3158 -0
  175. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/.helmignore +12 -0
  176. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/Chart.yaml +16 -0
  177. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/README.md +172 -0
  178. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/_helpers.tpl +42 -0
  179. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/deployment.yaml +105 -0
  180. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/externalsecret.yaml +23 -0
  181. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/pdb.yaml +15 -0
  182. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/service.yaml +18 -0
  183. f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/values.yaml +97 -0
  184. f2dev/_bundle/platform/charts/data_services_charts/data_replication/feature-flags-configmap.yaml +16 -0
  185. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_metrics_values.yaml +13 -0
  186. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_oauth2proxy_values.yaml +1200 -0
  187. f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_values.yaml +3255 -0
  188. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/Chart.yaml +7 -0
  189. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-client.yaml +27 -0
  190. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-master.yaml +38 -0
  191. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-worker.yaml +29 -0
  192. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_client_options +24 -0
  193. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_master_options +6 -0
  194. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_worker_options +6 -0
  195. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/log4j2.properties +109 -0
  196. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/seatunnel.yaml +36 -0
  197. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/_helpers.tpl +70 -0
  198. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/configmap.yaml +11 -0
  199. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-master.yaml +120 -0
  200. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-worker.yaml +118 -0
  201. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/rbac.yaml +32 -0
  202. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/services.yaml +33 -0
  203. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/values.yaml +101 -0
  204. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_oauth2proxy_values.yaml +196 -0
  205. f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_values.yaml +75 -0
  206. f2dev/_bundle/platform/charts/data_services_charts/object_storage_operator/template_values.yaml +506 -0
  207. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/csi_driver_values.yaml +193 -0
  208. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml +91 -0
  209. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values.yaml +1777 -0
  210. f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values_extra.yaml +253 -0
  211. f2dev/_bundle/platform/charts/infra_services_charts/cluster_cleaner/template_values.yaml +57 -0
  212. f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values.yaml +476 -0
  213. f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values_extra.yaml +131 -0
  214. f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/realm_template.json +4785 -0
  215. f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/template_values.yaml +657 -0
  216. f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values.yaml +36 -0
  217. f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values_extra.yaml +352 -0
  218. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values.yaml +1218 -0
  219. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values_extra.yaml +845 -0
  220. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values.yaml +561 -0
  221. f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values_extra.yaml +23 -0
  222. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_events_values.yaml +59 -0
  223. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_values.yaml +185 -0
  224. f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_loki_values.yaml +108 -0
  225. f2dev/_bundle/platform/charts/infra_services_charts/services_metrics/template_values.yaml +1530 -0
  226. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/.gitkeep +0 -0
  227. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/f2d-main.json +2871 -0
  228. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/.gitkeep +0 -0
  229. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-k8s-cluster.json +1751 -0
  230. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-microservices.json +1682 -0
  231. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-pvc-storage.json +1320 -0
  232. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-service.json +1193 -0
  233. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/.gitkeep +0 -0
  234. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-cert-manager.json +755 -0
  235. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-keycloak.json +746 -0
  236. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-object-storage.json +881 -0
  237. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-postgresql.json +1590 -0
  238. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-traefik.json +1375 -0
  239. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/.gitkeep +0 -0
  240. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows-trends.json +1916 -0
  241. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows.json +1330 -0
  242. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-analysis.json +631 -0
  243. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-freshness.json +1362 -0
  244. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-governance.json +1958 -0
  245. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-modeling.json +764 -0
  246. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration-trends.json +2352 -0
  247. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration.json +1506 -0
  248. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-quality.json +1549 -0
  249. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication-trends.json +2799 -0
  250. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication.json +2153 -0
  251. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming-trends.json +1536 -0
  252. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming.json +1209 -0
  253. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse/.gitkeep +0 -0
  254. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/.gitkeep +0 -0
  255. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/f2d-bigquery.json +990 -0
  256. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/.gitkeep +0 -0
  257. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/f2d-logs.json +630 -0
  258. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/folders.yaml +17 -0
  259. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/requirements.yaml +8 -0
  260. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml +2031 -0
  261. f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_values.yaml +1315 -0
  262. f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values.yaml +550 -0
  263. f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values_extra.yaml +742 -0
  264. f2dev/_bundle/platform/charts/infra_services_charts/traefik_lb/template_values.yaml +1758 -0
  265. f2dev/_bundle/platform/cli/README.md +866 -0
  266. f2dev/_bundle/platform/cli/__init__.py +42 -0
  267. f2dev/_bundle/platform/cli/__main__.py +17 -0
  268. f2dev/_bundle/platform/cli/cert_providers.py +369 -0
  269. f2dev/_bundle/platform/cli/command_record.py +144 -0
  270. f2dev/_bundle/platform/cli/config/data_services_config.json +217 -0
  271. f2dev/_bundle/platform/cli/config/environment_profiles.yaml +183 -0
  272. f2dev/_bundle/platform/cli/config/images.json +129 -0
  273. f2dev/_bundle/platform/cli/config/infrastructure_services_config.json +141 -0
  274. f2dev/_bundle/platform/cli/config.py +252 -0
  275. f2dev/_bundle/platform/cli/deployment_configuration_aws_example.yaml +117 -0
  276. f2dev/_bundle/platform/cli/deployment_configuration_gcp_example.yaml +130 -0
  277. f2dev/_bundle/platform/cli/deployment_configuration_onprem_example.yaml +71 -0
  278. f2dev/_bundle/platform/cli/destroy.py +677 -0
  279. f2dev/_bundle/platform/cli/dns_check.py +27 -0
  280. f2dev/_bundle/platform/cli/dns_providers.py +405 -0
  281. f2dev/_bundle/platform/cli/exit_codes.py +32 -0
  282. f2dev/_bundle/platform/cli/fixers.py +56 -0
  283. f2dev/_bundle/platform/cli/generate_only.py +336 -0
  284. f2dev/_bundle/platform/cli/health_report.py +114 -0
  285. f2dev/_bundle/platform/cli/logging.py +206 -0
  286. f2dev/_bundle/platform/cli/main.py +5293 -0
  287. f2dev/_bundle/platform/cli/precheck.py +1523 -0
  288. f2dev/_bundle/platform/cli/prerequisites/README.md +208 -0
  289. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.bat +107 -0
  290. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.ps1 +343 -0
  291. f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.sh +207 -0
  292. f2dev/_bundle/platform/cli/prerequisites/linux/install-linux.sh +775 -0
  293. f2dev/_bundle/platform/cli/prerequisites/macos/install-macos.sh +634 -0
  294. f2dev/_bundle/platform/cli/prerequisites/requirements.txt +41 -0
  295. f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.ps1 +150 -0
  296. f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.sh +418 -0
  297. f2dev/_bundle/platform/cli/prerequisites/versions.yaml +43 -0
  298. f2dev/_bundle/platform/cli/prerequisites/windows/install-windows.ps1 +1005 -0
  299. f2dev/_bundle/platform/cli/restore.py +179 -0
  300. f2dev/_bundle/platform/cli/service_gates.py +160 -0
  301. f2dev/_bundle/platform/cli/state.py +332 -0
  302. f2dev/_bundle/platform/cli/wizard.py +782 -0
  303. f2dev/_bundle/platform/cli.py +235 -0
  304. f2dev/_bundle/platform/deployers/__init__.py +4 -0
  305. f2dev/_bundle/platform/deployers/base_deployer.py +8 -0
  306. f2dev/_bundle/platform/deployers/clouds/__init__.py +0 -0
  307. f2dev/_bundle/platform/deployers/clouds/aws_cloud.py +619 -0
  308. f2dev/_bundle/platform/deployers/clouds/azure_cloud.py +0 -0
  309. f2dev/_bundle/platform/deployers/clouds/google_cloud.py +785 -0
  310. f2dev/_bundle/platform/deployers/clouds/terragrunt_progress.py +56 -0
  311. f2dev/_bundle/platform/deployers/services/data_services/1.0_cicd_workload_runner.py +644 -0
  312. f2dev/_bundle/platform/deployers/services/data_services/12.0_control_plane.py +321 -0
  313. f2dev/_bundle/platform/deployers/services/data_services/13.0_data_mcp_hub.py +362 -0
  314. f2dev/_bundle/platform/deployers/services/data_services/2.0_object_storage_operator.py +416 -0
  315. f2dev/_bundle/platform/deployers/services/data_services/2.5_services_logs.py +482 -0
  316. f2dev/_bundle/platform/deployers/services/data_services/3.0_data_cicd_workflows.py +361 -0
  317. f2dev/_bundle/platform/deployers/services/data_services/4.0_data_replication.py +534 -0
  318. f2dev/_bundle/platform/deployers/services/data_services/4.5_data_streaming.py +303 -0
  319. f2dev/_bundle/platform/deployers/services/data_services/5.0_data_orchestration.py +760 -0
  320. f2dev/_bundle/platform/deployers/services/data_services/6.0_data_modeling.py +753 -0
  321. f2dev/_bundle/platform/deployers/services/data_services/7.0_data_governance.py +795 -0
  322. f2dev/_bundle/platform/deployers/services/data_services/8.0_data_analysis.py +587 -0
  323. f2dev/_bundle/platform/deployers/services/infra_services/1.0_secret_operator.py +467 -0
  324. f2dev/_bundle/platform/deployers/services/infra_services/10.0_cluster_pvc_autoscaller.py +500 -0
  325. f2dev/_bundle/platform/deployers/services/infra_services/2.0_cert_manager.py +963 -0
  326. f2dev/_bundle/platform/deployers/services/infra_services/3.0_external_dns.py +823 -0
  327. f2dev/_bundle/platform/deployers/services/infra_services/4.0_traefik_lb.py +604 -0
  328. f2dev/_bundle/platform/deployers/services/infra_services/5.0_stackgres_postgresql.py +652 -0
  329. f2dev/_bundle/platform/deployers/services/infra_services/6.0_services_metrics.py +515 -0
  330. f2dev/_bundle/platform/deployers/services/infra_services/7.0_services_monitoring.py +787 -0
  331. f2dev/_bundle/platform/deployers/services/infra_services/8.0_cluster_cleaner.py +439 -0
  332. f2dev/_bundle/platform/deployers/services/infra_services/9.0_idp_sso_manager.py +790 -0
  333. f2dev/_bundle/platform/readme.md +47 -0
  334. f2dev/_bundle/platform/requirements.txt +14 -0
  335. f2dev/_bundle/platform/terraform/aws_cloud/templates/backend.tf_template +10 -0
  336. f2dev/_bundle/platform/terraform/aws_cloud/templates/defaults.yaml_template +11 -0
  337. f2dev/_bundle/platform/terraform/aws_cloud/templates/env.yaml_template +2 -0
  338. f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_advanced_template +134 -0
  339. f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_basic_template +134 -0
  340. f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_advanced_template +134 -0
  341. f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_basic_template +134 -0
  342. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/01-apps-vpc/terragrunt.hcl +26 -0
  343. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/02-create-dns-ns-record/terragrunt.hcl +16 -0
  344. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/03-eks-cluster/terragrunt.hcl +21 -0
  345. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/04-external_dns_sa/terragrunt.hcl +28 -0
  346. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/01-apps-vpc/terragrunt.hcl +25 -0
  347. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/02-eks-cluster/terragrunt.hcl +32 -0
  348. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/03-external-dns-irsa/terragrunt.hcl +34 -0
  349. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/04-cert-manager-irsa/terragrunt.hcl +34 -0
  350. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +22 -0
  351. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +44 -0
  352. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/empty.yaml +1 -0
  353. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/empty.yaml +1 -0
  354. f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/env.hcl +2 -0
  355. f2dev/_bundle/platform/terraform/azure_cloud/README.md +3 -0
  356. f2dev/_bundle/platform/terraform/azure_cloud/templates/_keep_structure.txt +0 -0
  357. f2dev/_bundle/platform/terraform/google_cloud/README.md +20 -0
  358. f2dev/_bundle/platform/terraform/google_cloud/templates/backend.tf_template +7 -0
  359. f2dev/_bundle/platform/terraform/google_cloud/templates/defaults.yaml_template +12 -0
  360. f2dev/_bundle/platform/terraform/google_cloud/templates/env.yaml_template +2 -0
  361. f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_advanced_template +114 -0
  362. f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_basic_template +116 -0
  363. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/.gitignore +3 -0
  364. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/00-create-ou-folder/terragrunt.hcl +15 -0
  365. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/01-create-project/terragrunt.hcl +30 -0
  366. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/02-enable-apis/terragrunt.hcl +25 -0
  367. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/03-0-apps-vpc/terragrunt.hcl +134 -0
  368. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/04-external-ip-traefik/terragrunt.hcl +29 -0
  369. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +25 -0
  370. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +43 -0
  371. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/07-gke-cluster/terragrunt.hcl +103 -0
  372. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/08-dbt_deploy_sa/terragrunt.hcl +36 -0
  373. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/09-dbt_sa/terragrunt.hcl +40 -0
  374. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/10-cert_manager_sa/terragrunt.hcl +34 -0
  375. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/11-external_dns_sa/terragrunt.hcl +30 -0
  376. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/12-monitoring_sa/terragrunt.hcl +52 -0
  377. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/13-data_replication_sa/terragrunt.hcl +35 -0
  378. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/14-data_orchestration_sa/terragrunt.hcl +35 -0
  379. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/15-bi_data_sa/terragrunt.hcl +43 -0
  380. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/16-whitelist-external-ip-on-common/terragrunt.hcl +30 -0
  381. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/17-kubeconfig/terragrunt.hcl +23 -0
  382. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/18-data_streaming_sa/terragrunt.hcl +24 -0
  383. f2dev/_bundle/platform/terraform/google_cloud/terragrunt/empty.yaml +1 -0
  384. f2dev/_bundle/platform/utils/__init__.py +0 -0
  385. f2dev/_bundle/platform/utils/customer_data_platform_repository_operator.py +1098 -0
  386. f2dev/_bundle/platform/utils/customer_secret_manager_operations.py +1635 -0
  387. f2dev/_bundle/platform/utils/environment_profiles.py +58 -0
  388. f2dev/_bundle/platform/utils/helm_utils.py +215 -0
  389. f2dev/_bundle/platform/utils/infrastructure_deployment_operator.py +1532 -0
  390. f2dev/_bundle/platform/utils/keycloak_realm_reconcile.py +320 -0
  391. f2dev/_bundle/platform/utils/kubeconfig_fixer.py +265 -0
  392. f2dev/_bundle/platform/utils/raw_extras.py +34 -0
  393. f2dev/_bundle/platform/utils/readiness.py +330 -0
  394. f2dev/_bundle/platform/utils/secret_structure_upgrade.py +194 -0
  395. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/.gitignore +7 -0
  396. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/README.md +33 -0
  397. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/analyses/.gitkeep +0 -0
  398. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/dbt_project.yml +52 -0
  399. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/.gitkeep +0 -0
  400. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_bq_time_zones.sql +12 -0
  401. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_monitoring_grain.sql +23 -0
  402. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.sql +19 -0
  403. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.yml +25 -0
  404. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.sql +16 -0
  405. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.yml +24 -0
  406. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.sql +12 -0
  407. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.yml +21 -0
  408. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.sql +14 -0
  409. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.yml +22 -0
  410. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.sql +52 -0
  411. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.yml +42 -0
  412. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.sql +74 -0
  413. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.yml +49 -0
  414. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/sources/billing_export.yml +9 -0
  415. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.sql +9 -0
  416. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.yml +4 -0
  417. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/packages.yml +5 -0
  418. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/profiles.yml +15 -0
  419. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/scripts/run_monitoring.py +201 -0
  420. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/seeds/.gitkeep +0 -0
  421. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/snapshots/.gitkeep +0 -0
  422. f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/tests/.gitkeep +0 -0
  423. f2dev/_bundle/platform/utils/templates/dry_run/gcp_sa.json +12 -0
  424. f2dev/_bundle/platform/utils/templates/dry_run/kubeconfig.yaml +18 -0
  425. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/README.MD +50 -0
  426. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/dbt/README.MD +47 -0
  427. f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/fast2dev_healthcheck.py_template_airflow_3.x +158 -0
  428. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/bitbucket/bitbucket-pipelines.yml_template +144 -0
  429. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/PR_VALIDATION.md +52 -0
  430. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/pull_request_template.md +48 -0
  431. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/argo-workflows.yml_template +143 -0
  432. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/pr-agent.yml +30 -0
  433. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/validate-pr-description.yml +38 -0
  434. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/PR_VALIDATION.md +52 -0
  435. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/pull_request_template.md +48 -0
  436. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/argo-workflows.yml_template +143 -0
  437. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/pr-agent.yml +37 -0
  438. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/validate-pr-description.yml +157 -0
  439. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/PR_VALIDATION.md +43 -0
  440. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/merge_request_templates/Default.md +48 -0
  441. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab-ci.yml_template +181 -0
  442. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.gitignore +21 -0
  443. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.pr_agent.toml +82 -0
  444. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/AGENTS.md +126 -0
  445. f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/README.MD +101 -0
  446. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/DR.md +341 -0
  447. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/README.md.j2 +81 -0
  448. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/decrypt_files.py +331 -0
  449. f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/encrypt_files.py +321 -0
  450. f2dev/_bundle/platform/utils/templates/secret_structure_template/customer_vault_structure.json +502 -0
  451. f2dev/_bundle/platform/utils/vault_structure_sync.py +96 -0
  452. f2dev/_bundle/terraform-modules/README.md +12 -0
  453. f2dev/_bundle/terraform-modules/aws_cloud/README.md +7 -0
  454. f2dev/_bundle/terraform-modules/aws_cloud/eks/addons-roles.tf +298 -0
  455. f2dev/_bundle/terraform-modules/aws_cloud/eks/main.tf +313 -0
  456. f2dev/_bundle/terraform-modules/aws_cloud/eks/outputs.tf +3 -0
  457. f2dev/_bundle/terraform-modules/aws_cloud/eks/policies/lb-controller-policy.json +219 -0
  458. f2dev/_bundle/terraform-modules/aws_cloud/eks/provider.tf +36 -0
  459. f2dev/_bundle/terraform-modules/aws_cloud/eks/variables.tf +107 -0
  460. f2dev/_bundle/terraform-modules/aws_cloud/eks/versions.tf +10 -0
  461. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/main.tf +25 -0
  462. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/provider.tf +17 -0
  463. f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/variables.tf +41 -0
  464. f2dev/_bundle/terraform-modules/aws_cloud/vpc/main.tf +34 -0
  465. f2dev/_bundle/terraform-modules/aws_cloud/vpc/outputs.tf +44 -0
  466. f2dev/_bundle/terraform-modules/aws_cloud/vpc/provider.tf +12 -0
  467. f2dev/_bundle/terraform-modules/aws_cloud/vpc/variables.tf +118 -0
  468. f2dev/_bundle/terraform-modules/aws_cloud/vpc/versions.tf +10 -0
  469. f2dev/_bundle/terraform-modules/azure_cloud/README.md +3 -0
  470. f2dev/_bundle/terraform-modules/google_cloud/README.md +17 -0
  471. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/main.tf +8 -0
  472. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/providers.tf +6 -0
  473. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/variables.tf +17 -0
  474. f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/versions.tf +8 -0
  475. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/main.tf +24 -0
  476. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/outputs.tf +25 -0
  477. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/providers.tf +7 -0
  478. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/variables.tf +17 -0
  479. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/versions.tf +9 -0
  480. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/main.tf +38 -0
  481. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/variables.tf +73 -0
  482. f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/versions.tf +39 -0
  483. f2dev/_bundle/terraform-modules/google_cloud/composer/main.tf +213 -0
  484. f2dev/_bundle/terraform-modules/google_cloud/composer/outputs.tf +31 -0
  485. f2dev/_bundle/terraform-modules/google_cloud/composer/provider.tf +4 -0
  486. f2dev/_bundle/terraform-modules/google_cloud/composer/variables.tf +192 -0
  487. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/main.tf +29 -0
  488. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/output.tf +4 -0
  489. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/providers.tf +6 -0
  490. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/variables.tf +40 -0
  491. f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/versions.tf +8 -0
  492. f2dev/_bundle/terraform-modules/google_cloud/create-project/main.tf +18 -0
  493. f2dev/_bundle/terraform-modules/google_cloud/create-project/output.tf +8 -0
  494. f2dev/_bundle/terraform-modules/google_cloud/create-project/providers.tf +6 -0
  495. f2dev/_bundle/terraform-modules/google_cloud/create-project/variables.tf +27 -0
  496. f2dev/_bundle/terraform-modules/google_cloud/create-project/versions.tf +9 -0
  497. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/README.md +188 -0
  498. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/main.tf +135 -0
  499. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/output.tf +16 -0
  500. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/providers.tf +6 -0
  501. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/variables.tf +54 -0
  502. f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/versions.tf +17 -0
  503. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/main.tf +14 -0
  504. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/provider.tf +7 -0
  505. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/variables.tf +13 -0
  506. f2dev/_bundle/terraform-modules/google_cloud/enable_apis/versions.tf +10 -0
  507. f2dev/_bundle/terraform-modules/google_cloud/external-ip/README.md +89 -0
  508. f2dev/_bundle/terraform-modules/google_cloud/external-ip/main.tf +17 -0
  509. f2dev/_bundle/terraform-modules/google_cloud/external-ip/outputs.tf +19 -0
  510. f2dev/_bundle/terraform-modules/google_cloud/external-ip/variables.tf +43 -0
  511. f2dev/_bundle/terraform-modules/google_cloud/fw-add/main.tf +24 -0
  512. f2dev/_bundle/terraform-modules/google_cloud/fw-add/providers.tf +6 -0
  513. f2dev/_bundle/terraform-modules/google_cloud/fw-add/variables.tf +37 -0
  514. f2dev/_bundle/terraform-modules/google_cloud/fw-add/versions.tf +9 -0
  515. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/README.md +10 -0
  516. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/main.tf +459 -0
  517. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/outputs.tf +44 -0
  518. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/provider.tf +19 -0
  519. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/variables.tf +354 -0
  520. f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/versions.tf +22 -0
  521. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/README.md +40 -0
  522. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/main.tf +54 -0
  523. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/outputs.tf +10 -0
  524. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/variables.tf +24 -0
  525. f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/versions.tf +10 -0
  526. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/README.md +47 -0
  527. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/main.tf +51 -0
  528. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/README.md +103 -0
  529. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/main.tf +71 -0
  530. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/outputs.tf +71 -0
  531. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/variables.tf +82 -0
  532. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/versions.tf +27 -0
  533. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/outputs.tf +35 -0
  534. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/provider.tf +4 -0
  535. f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/variables.tf +237 -0
  536. f2dev/_bundle/terraform-modules/oracle_cloud/README.md +3 -0
  537. f2dev/launcher.py +153 -0
  538. fast2dev-1.0.0.dist-info/METADATA +201 -0
  539. fast2dev-1.0.0.dist-info/RECORD +543 -0
  540. fast2dev-1.0.0.dist-info/WHEEL +4 -0
  541. fast2dev-1.0.0.dist-info/entry_points.txt +2 -0
  542. fast2dev-1.0.0.dist-info/licenses/LICENSE +202 -0
  543. fast2dev-1.0.0.dist-info/licenses/NOTICE +6 -0
@@ -0,0 +1,760 @@
1
+ import subprocess
2
+ import os
3
+ from datetime import datetime
4
+ import json
5
+ import logging
6
+ import sys
7
+ import argparse
8
+ from pathlib import Path
9
+ from jinja2 import Environment, FileSystemLoader, TemplateNotFound # type: ignore
10
+ import base64
11
+ from cli.state import vault_structure_path
12
+ from utils.helm_utils import add_or_keep_helm_repo
13
+ from utils.helm_utils import wait_for_pods_ready
14
+ from utils.environment_profiles import ENVIRONMENTS, resolve_environment, service_size
15
+
16
+ # Configure logging
17
+ logging.basicConfig(
18
+ level=logging.INFO,
19
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
20
+ handlers=[
21
+ logging.StreamHandler(sys.stdout)
22
+ ]
23
+ )
24
+ logger = logging.getLogger('data_orchestration_deployer')
25
+
26
+ class PlatformDataOrchestration:
27
+ def __init__(self, chart_version, customer, metadata_collector, cloud_provider, domain_name, app_version,
28
+ project_id=None, cluster_name=None, kube_config_path=None,
29
+ namespace="data-orchestration", dry_run=False, platform_environment=None, state=None):
30
+ self.deployment_environment = "data-services"
31
+ self.cloud_provider = cloud_provider
32
+ self.domain_name = domain_name
33
+ self.state = state
34
+ self.namespace = namespace
35
+ self.customer = customer
36
+ self.metadata_collector = metadata_collector
37
+ self.app_version = app_version
38
+ self.dry_run = dry_run
39
+ self.platform_environment = resolve_environment(platform_environment, cloud_provider)
40
+ self.size = service_size("data_orchestration", self.platform_environment)
41
+
42
+ # Cloud Provider Specific
43
+ try:
44
+ if self.cloud_provider == "gcp":
45
+ if project_id and project_id.strip():
46
+ self.project_id = project_id
47
+ logger.info(f"Using provided project_id: {self.project_id}")
48
+ else:
49
+ self.project_id = f"fast2dev-{customer}"
50
+ logger.warning(f"No project_id provided, using default: {self.project_id}")
51
+ self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
52
+ self.data_orchestration_k8s_sa = f"data-orchestration-k8s-sa@{self.project_id}.iam.gserviceaccount.com" if self.project_id else None
53
+ self.data_orchestration_dbt_server_k8s_sa = f"dbt-sa@{self.project_id}.iam.gserviceaccount.com" if self.project_id else None
54
+ logger.info(f"Configured for GCP with project ID: {self.project_id}")
55
+ elif self.cloud_provider == "aws":
56
+ self.project_id = None
57
+ self.data_orchestration_k8s_sa = None
58
+ self.data_orchestration_dbt_server_k8s_sa = None
59
+ self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
60
+ logger.info(f"Configured for AWS with cluster: {self.cluster_name}")
61
+ elif self.cloud_provider == "azure":
62
+ self.project_id = None
63
+ self.data_orchestration_k8s_sa = None
64
+ self.data_orchestration_dbt_server_k8s_sa = None
65
+ self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
66
+ logger.info(f"Configured for Azure with cluster: {self.cluster_name}")
67
+ elif self.cloud_provider == "self-managed":
68
+ self.project_id = None
69
+ self.data_orchestration_k8s_sa = None
70
+ self.data_orchestration_dbt_server_k8s_sa = None
71
+ self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
72
+ logger.info(f"Configured for self-managed with cluster: {self.cluster_name}")
73
+ else:
74
+ raise ValueError(f"Unsupported cloud provider: {self.cloud_provider}")
75
+ except Exception as e:
76
+ logger.error(f"Error during cloud provider configuration: {str(e)}")
77
+ raise
78
+
79
+ # Set kubeconfig path after cluster_name is properly initialized
80
+ self.kube_config = kube_config_path if kube_config_path else f'/tmp/{self.cluster_name}-kubeconfig.yaml'
81
+ logger.info(f"Using kubeconfig: {self.kube_config}")
82
+
83
+ # Check if kubeconfig exists
84
+ if not os.path.exists(self.kube_config):
85
+ logger.warning(f"Kubeconfig file not found at {self.kube_config}. Deployment may fail.")
86
+
87
+ self.secret_file = str(vault_structure_path(customer))
88
+ if not os.path.exists(self.secret_file):
89
+ raise FileNotFoundError(f"Secret file not found: {self.secret_file}")
90
+
91
+ # Service specific
92
+ self.customer_root_domain = f"{self.customer}.{self.domain_name}"
93
+ self.ingress_host = f"airflow.{self.customer_root_domain}"
94
+ self.data_services_admin_email = f"root-fast2dev-airflow-admin@{self.customer_root_domain}"
95
+ self.data_orchestration_basic_user_role = "Admin"
96
+ self.data_orchestration_basic_user_name = "Administrator"
97
+ self.data_orchestration_basic_user_last_name = "Data-Orchestrator"
98
+ self.oauth_realm_url = f"https://login.{self.customer_root_domain}/realms/{self.customer}"
99
+ self.oauth_callback_url = f"https://{self.ingress_host}/oauth2/callback"
100
+
101
+ # Chart versions
102
+ self.data_orchestration_chart_version = chart_version
103
+ self.data_orchestration_app_version = self.app_version
104
+ self.data_orchestration_image_tag = self._load_image_tag()
105
+
106
+ # Deployment names
107
+ self.data_orchestration_deployment_name = "data-orchestration"
108
+
109
+ # Chart repositories
110
+ self.data_orchestration_chart_repo_name = "apache-airflow"
111
+ self.data_orchestration_chart_name = "apache-airflow/airflow"
112
+ self.data_orchestration_chart_repo = "https://airflow.apache.org"
113
+
114
+ # Values paths
115
+ self.data_orchestration_values_path = "charts/data_services_charts/data_orchestration/values.yaml"
116
+ self.data_orchestration_render_template_values_path = "charts/data_services_charts/data_orchestration/template_values.yaml"
117
+ self.data_orchestration_extra_values_path = "charts/data_services_charts/data_orchestration/values_extra.yaml"
118
+ self.data_orchestration_extra_render_template_values_path = "charts/data_services_charts/data_orchestration/template_values_extra.yaml"
119
+
120
+ # Data Dbt Server
121
+ self.data_dbt_server_chart_repo_name = "kube-core"
122
+ self.data_dbt_server_chart_name = "kube-core/raw"
123
+ self.data_dbt_server_chart_repo = "https://kube-core.github.io/helm-charts"
124
+ self.data_dbt_server_chart_version = "0.1.1"
125
+ self.data_dbt_server_values_path = "charts/data_services_charts/data_dbt_server/values.yaml"
126
+ self.data_dbt_server_render_template_values_path = "charts/data_services_charts/data_dbt_server/template_values.yaml"
127
+ self.data_dbt_server_deployment_name = "data-dbt-server-prerequisites"
128
+ self.data_dbt_server_namespace = "data-dbt-server"
129
+
130
+
131
+ # MetadataCollection
132
+ self.app_name = self.data_orchestration_chart_name.split('/')[1]
133
+
134
+ # Validate template paths
135
+ self._validate_template_paths()
136
+
137
+ def _validate_template_paths(self):
138
+ """Validate that all required template files exist"""
139
+ for path in (self.data_orchestration_render_template_values_path,
140
+ self.data_orchestration_extra_render_template_values_path):
141
+ template_path = Path(path)
142
+ if not template_path.exists():
143
+ logger.error(f"Template file not found: {template_path}")
144
+ raise FileNotFoundError(f"Template file not found: {template_path}")
145
+ logger.debug(f"Template file validated: {template_path}")
146
+
147
+ def deploy_service(self, chart_repo_name, chart_repo, deployment_name, chart_name, chart_version, namespace, values_path):
148
+ """Deploy a Helm chart service"""
149
+ logger.info(f"Deploying {deployment_name} in namespace {namespace}")
150
+
151
+ # Check if values file exists
152
+ if not os.path.exists(values_path):
153
+ logger.error(f"Values file not found: {values_path}")
154
+ raise FileNotFoundError(f"Values file not found: {values_path}")
155
+
156
+ try:
157
+ # Properly add and update the Helm repo
158
+ add_or_keep_helm_repo(chart_repo_name, chart_repo)
159
+ self.execute_command(["helm", "repo", "update", chart_repo_name])
160
+
161
+ # Formulate the Helm upgrade command properly as a list
162
+ helm_command = [
163
+ "helm", "upgrade", "-i", deployment_name, chart_name,
164
+ "--version", chart_version,
165
+ "--namespace", namespace,
166
+ "--create-namespace",
167
+ "--wait",
168
+ "--timeout", "30m",
169
+ "--values", values_path,
170
+ "--kubeconfig", self.kube_config
171
+ ]
172
+ self.execute_command(helm_command)
173
+ logger.info(f"Successfully deployed {deployment_name} in namespace {namespace}")
174
+ except Exception as e:
175
+ logger.error(f"Failed to deploy {deployment_name}: {str(e)}")
176
+ raise
177
+
178
+ def deploy_extra_resources(self):
179
+ """Deploy additional Kubernetes resources from extra values file"""
180
+ logger.info(f"Deploying extra resources from {self.data_orchestration_extra_values_path} in namespace {self.namespace}")
181
+
182
+ # Check if extra values file exists
183
+ if not os.path.exists(self.data_orchestration_extra_values_path):
184
+ logger.error(f"Extra values file not found: {self.data_orchestration_extra_values_path}")
185
+ raise FileNotFoundError(f"Extra values file not found: {self.data_orchestration_extra_values_path}")
186
+
187
+ try:
188
+ kubectl_command = [
189
+ "kubectl", "apply", "-f", self.data_orchestration_extra_values_path,
190
+ "--namespace", self.namespace,
191
+ "--kubeconfig", self.kube_config
192
+ ]
193
+ self.execute_command(kubectl_command)
194
+ logger.info(f"Successfully deployed extra resources in namespace {self.namespace}")
195
+ except Exception as e:
196
+ logger.error(f"Failed to deploy extra resources: {str(e)}")
197
+ raise
198
+
199
+ def _load_image_tag(self):
200
+ config_path = os.path.join(os.path.dirname(__file__), '..', '..', '..', 'cli', 'config', 'data_services_config.json')
201
+ with open(config_path) as f:
202
+ config = json.load(f)
203
+ return config['data_services']['5.0_data_orchestration'].get('image_tag', self.app_version)
204
+
205
+ def get_deployed_app_version(self, deployment_name, namespace):
206
+ """Get the deployed application version from Helm"""
207
+ logger.info(f"Getting deployed version for {deployment_name} in namespace {namespace}")
208
+ try:
209
+ command = ["helm", "ls", "--deployed", "-f", deployment_name, "-n", namespace, "--kubeconfig", self.kube_config, "--output", "json"]
210
+ result = self.execute_command(command)
211
+ if result:
212
+ # Parse JSON output
213
+ deployments = json.loads(result)
214
+ if deployments and isinstance(deployments, list) and len(deployments) > 0:
215
+ app_version = deployments[0].get('app_version', "Unknown")
216
+ logger.info(f"Found app version: {app_version}")
217
+ return app_version
218
+ else:
219
+ logger.warning(f"No deployments found for {deployment_name}")
220
+ return "No deployed version found"
221
+ except json.JSONDecodeError as e:
222
+ logger.error(f"Failed to parse Helm output as JSON: {str(e)}")
223
+ return "Error parsing version"
224
+ except Exception as e:
225
+ logger.error(f"Error getting deployed version: {str(e)}")
226
+ return "Error getting version"
227
+
228
+ def execute_command(self, command, check=True, acceptable_statuses=(0,)):
229
+ """Execute a shell command with proper error handling.
230
+
231
+ Args:
232
+ command: Command list to execute.
233
+ check: If True (default), non-zero exit raises. If False, the exit status
234
+ is ignored as long as it is in acceptable_statuses.
235
+ acceptable_statuses: Tuple of exit statuses treated as success when
236
+ check=False. Default (0,) means only exit 0 succeeds silently.
237
+ """
238
+ cmd_str = ' '.join(command)
239
+
240
+ # Dry-run mode: show command without executing
241
+ if self.dry_run:
242
+ logger.info(f"[DRY-RUN] Would execute: {cmd_str}")
243
+ print(f"[DRY-RUN] Would execute: {cmd_str}")
244
+ return "" # Return mock success
245
+
246
+ logger.debug(f"Executing command: {cmd_str}")
247
+
248
+ try:
249
+ result = subprocess.run(command, check=False, capture_output=True, text=True)
250
+ logger.debug(f"Command output: {result.stdout}")
251
+ if check and result.returncode not in acceptable_statuses:
252
+ logger.error(f"Command failed: {cmd_str}")
253
+ logger.error(f"Status code: {result.returncode}")
254
+ logger.error(f"Output: {result.stdout}")
255
+ logger.error(f"Error: {result.stderr}")
256
+ raise Exception(f"Execution failed for command {cmd_str}: {result.stderr}")
257
+ return result.stdout
258
+ except subprocess.CalledProcessError as e:
259
+ logger.error(f"Command failed: {cmd_str}")
260
+ logger.error(f"Status code: {e.returncode}")
261
+ logger.error(f"Output: {e.stdout}")
262
+ logger.error(f"Error: {e.stderr}")
263
+ raise Exception(f"Execution failed for command {cmd_str}: {e.stderr}")
264
+ except Exception as e:
265
+ logger.error(f"Unexpected error executing command {cmd_str}: {str(e)}")
266
+ raise
267
+
268
+ def render_values_file(self, remote_base_log_folder, customer_git_repo, default_git_branch, keycloak_token_exchange_clients=""):
269
+ """Render the data orchestration values file from template"""
270
+ logger.info("Rendering data orchestration values file from template")
271
+ try:
272
+
273
+ context = {
274
+ 'chart_name': self.data_orchestration_chart_repo_name,
275
+ 'chart_repo': self.data_orchestration_chart_repo,
276
+ 'chart_version': self.data_orchestration_chart_version,
277
+ 'data_orchestration_app_version': self.data_orchestration_app_version,
278
+ 'data_orchestration_image_tag': self.data_orchestration_image_tag,
279
+ 'ingress_host': self.ingress_host,
280
+ 'data_orchestration_k8s_sa': self.data_orchestration_k8s_sa,
281
+ 'data_orchestration_dbt_server_k8s_sa': self.data_orchestration_dbt_server_k8s_sa,
282
+ 'oauth_realm_url': self.oauth_realm_url,
283
+ 'namespace': self.namespace,
284
+ 'remote_base_log_folder': remote_base_log_folder,
285
+ 'customer_dags_git_repo': customer_git_repo,
286
+ 'data_services_admin_email': self.data_services_admin_email,
287
+ 'data_orchestration_basic_user_name': self.data_orchestration_basic_user_name,
288
+ 'data_orchestration_basic_user_last_name': self.data_orchestration_basic_user_last_name,
289
+ 'data_orchestration_basic_user_role': self.data_orchestration_basic_user_role,
290
+ 'cloud_provider': self.cloud_provider,
291
+ 'customer': self.customer,
292
+ 'default_git_branch': default_git_branch,
293
+ 'keycloak_token_exchange_clients': keycloak_token_exchange_clients
294
+ }
295
+
296
+ # Ensure output directory exists
297
+ output_dir = os.path.dirname(self.data_orchestration_values_path)
298
+ if not os.path.exists(output_dir):
299
+ logger.info(f"Creating output directory: {output_dir}")
300
+ os.makedirs(output_dir, exist_ok=True)
301
+
302
+ self.render_template(self.data_orchestration_render_template_values_path,
303
+ self.data_orchestration_values_path, context)
304
+ logger.info(f"Successfully rendered data orchestration values file to {self.data_orchestration_values_path}")
305
+ except Exception as e:
306
+ logger.error(f"Failed to render data orchestration values file: {str(e)}")
307
+ raise
308
+
309
+ def _ide_keycloak_client_id(self):
310
+ """Keycloak client of the IDE (JupyterHub) whose user tokens may be exchanged for Airflow JWTs."""
311
+ try:
312
+ return self.get_secret_from_vault(
313
+ secret_name="client_id",
314
+ secret_path="/data-modeling/sso-clients-secrets/",
315
+ ) or ""
316
+ except Exception as e:
317
+ logger.warning(f"IDE Keycloak client id not available, Airflow MCP token exchange limited to the Airflow client: {e}")
318
+ return ""
319
+
320
+ def render_extra_values_file(self, airflow_database_metadata_connection, airflow_redis_metadata_connection, cleanup_bucket=None):
321
+ """Render the extra values file from template"""
322
+ logger.info("Rendering extra values file from template")
323
+ try:
324
+ context = {
325
+ 'chart_name': self.data_orchestration_chart_repo_name,
326
+ 'chart_repo': self.data_orchestration_chart_repo,
327
+ 'chart_version': self.data_orchestration_chart_version,
328
+ 'namespace': self.namespace,
329
+ 'customer': self.customer,
330
+ 'domain_name': self.domain_name,
331
+ 'cloud_provider': self.cloud_provider,
332
+ 'data_orchestration_dbt_server_k8s_sa': self.data_orchestration_dbt_server_k8s_sa,
333
+ 'airflow_database_metadata_connection': airflow_database_metadata_connection,
334
+ 'airflow_redis_metadata_connection': airflow_redis_metadata_connection,
335
+ 'cleanup_bucket': cleanup_bucket or '',
336
+ }
337
+
338
+ # Ensure output directory exists
339
+ output_dir = os.path.dirname(self.data_orchestration_extra_values_path)
340
+ if not os.path.exists(output_dir):
341
+ logger.info(f"Creating output directory: {output_dir}")
342
+ os.makedirs(output_dir, exist_ok=True)
343
+
344
+ self.render_template(self.data_orchestration_extra_render_template_values_path,
345
+ self.data_orchestration_extra_values_path, context)
346
+ logger.info(f"Successfully rendered extra values file to {self.data_orchestration_extra_values_path}")
347
+ except Exception as e:
348
+ logger.error(f"Failed to render extra values file: {str(e)}")
349
+ raise
350
+
351
+ def render_dbt_server_values_file(self):
352
+ """Render the dbt server values file from template"""
353
+ logger.info("Rendering dbt server values file from template")
354
+ try:
355
+ context = {
356
+ 'chart_name': self.data_dbt_server_chart_repo_name,
357
+ 'chart_repo': self.data_dbt_server_chart_repo,
358
+ 'chart_version': self.data_dbt_server_chart_version,
359
+ 'namespace': self.data_dbt_server_namespace,
360
+ 'customer': self.customer,
361
+ 'domain_name': self.domain_name,
362
+ 'cloud_provider': self.cloud_provider
363
+ }
364
+
365
+ # Ensure output directory exists
366
+ output_dir = os.path.dirname(self.data_dbt_server_values_path)
367
+ if not os.path.exists(output_dir):
368
+ logger.info(f"Creating output directory: {output_dir}")
369
+ os.makedirs(output_dir, exist_ok=True)
370
+
371
+ self.render_template(self.data_dbt_server_render_template_values_path, self.data_dbt_server_values_path, context)
372
+ logger.info(f"Successfully rendered dbt server values file to {self.data_dbt_server_values_path}")
373
+ except Exception as e:
374
+ logger.error(f"Failed to render dbt server values file: {str(e)}")
375
+ raise
376
+
377
+ def render_template(self, template_path, output_path, context):
378
+ """Render a Jinja2 template to a file"""
379
+ try:
380
+ logger.debug(f"Rendering template {template_path} to {output_path}")
381
+ env = Environment(loader=FileSystemLoader(os.path.dirname(template_path)))
382
+ template = env.get_template(os.path.basename(template_path))
383
+ output = template.render({**context, 'size': self.size, 'platform_environment': self.platform_environment})
384
+
385
+ with open(output_path, 'w') as f:
386
+ f.write(output)
387
+ logger.debug("Template rendered successfully")
388
+ except TemplateNotFound:
389
+ logger.error(f"Template not found: {template_path}")
390
+ raise FileNotFoundError(f"Template not found: {template_path}")
391
+ except Exception as e:
392
+ logger.error(f"Error rendering template {template_path}: {str(e)}")
393
+ raise
394
+
395
+ def get_secret_from_vault(self, secret_name, secret_path):
396
+ """Retrieve the secret from the local vault JSON file."""
397
+ try:
398
+ with open(self.secret_file, 'r') as f:
399
+ vault_data = json.load(f)
400
+
401
+ # Navigate through the JSON structure based on the secret path
402
+ current = vault_data
403
+ for part in secret_path.strip('/').split('/'):
404
+ if part not in current:
405
+ raise KeyError(f"Path {secret_path} not found in vault structure")
406
+ current = current[part]
407
+
408
+ if secret_name not in current:
409
+ raise KeyError(f"Secret {secret_name} not found at path {secret_path}")
410
+
411
+ return current[secret_name]
412
+ except Exception as e:
413
+ logger.error(f"Failed to get secret from local vault: {str(e)}")
414
+ raise
415
+
416
+ def run(self):
417
+ """Main execution method"""
418
+ logger.info(f"Starting Platform Data Orchestration deployment for customer: {self.customer}")
419
+ try:
420
+
421
+ # Get secrets from vault
422
+ remote_base_log_folder_bucketname = self.get_secret_from_vault(
423
+ secret_name="bucket",
424
+ secret_path="/data-orchestration/buckets-secrets/",
425
+ )
426
+ customer_git_repo_https = self.get_secret_from_vault(
427
+ secret_name="data-orchestration-dag_repo_url",
428
+ secret_path="/data-orchestration/git-secrets/",
429
+ )
430
+
431
+ default_git_branch = self.get_secret_from_vault(
432
+ secret_name="GIT_BRANCH_MAIN",
433
+ secret_path="/data-cicd-workflows/customer-cicd-variables/",
434
+ )
435
+
436
+ airflow_database_user = self.get_secret_from_vault(
437
+ secret_name="username",
438
+ secret_path="/data-orchestration/database-secrets/",
439
+ )
440
+ airflow_database_password = self.get_secret_from_vault(
441
+ secret_name="password",
442
+ secret_path="/data-orchestration/database-secrets/",
443
+ )
444
+ airflow_database_name = self.get_secret_from_vault(
445
+ secret_name="database",
446
+ secret_path="/data-orchestration/database-secrets/",
447
+ )
448
+
449
+ airflow_redis_password = self.get_secret_from_vault(
450
+ secret_name="password",
451
+ secret_path="/data-orchestration/cache-secrets/",
452
+ )
453
+
454
+ # git-sync v4 accepts scp-style SSH URLs directly: ssh://git@host/owner/repo.git
455
+ # (no colon between host and owner). Accept vault values in https://, ssh://git@,
456
+ # or git@ form and normalize to ssh://git@host/owner/repo.git.
457
+ if customer_git_repo_https.startswith("https://"):
458
+ tail = customer_git_repo_https[len("https://"):]
459
+ customer_git_repo = "ssh://git@" + tail
460
+ elif customer_git_repo_https.startswith("ssh://git@"):
461
+ customer_git_repo = customer_git_repo_https
462
+ elif customer_git_repo_https.startswith("git@"):
463
+ tail = customer_git_repo_https[len("git@"):]
464
+ customer_git_repo = "ssh://git@" + tail
465
+ else:
466
+ customer_git_repo = customer_git_repo_https
467
+ remote_base_log_folder = f"s3://{remote_base_log_folder_bucketname}/airflow/logs/"
468
+
469
+ airflow_database_metadata_connection = f"postgresql://{airflow_database_user}:{airflow_database_password}@fast2dev-global-psql.global-postgresql.svc.cluster.local:5432/{airflow_database_name}?sslmode=prefer"
470
+
471
+ airflow_redis_metadata_connection = f"redis://:{airflow_redis_password}@data-orchestration-redis.{self.namespace}.svc.cluster.local:6379/0"
472
+
473
+
474
+ # Render values files
475
+ keycloak_token_exchange_clients = ",".join(
476
+ c for c in (self._ide_keycloak_client_id(), "data-mcp-hub-fast2dev-data-platform", "user-console-fast2dev-data-platform") if c
477
+ )
478
+ self.render_values_file(remote_base_log_folder=remote_base_log_folder,customer_git_repo=customer_git_repo, default_git_branch=default_git_branch, keycloak_token_exchange_clients=keycloak_token_exchange_clients)
479
+ self.render_extra_values_file(
480
+ airflow_database_metadata_connection=base64.b64encode(airflow_database_metadata_connection.encode()).decode(),
481
+ airflow_redis_metadata_connection=base64.b64encode(airflow_redis_metadata_connection.encode()).decode(),
482
+ cleanup_bucket=remote_base_log_folder_bucketname,
483
+ )
484
+
485
+ self.render_dbt_server_values_file()
486
+
487
+ # Deploy extra resources
488
+ logger.info("Deploying extra resources")
489
+ self.deploy_extra_resources()
490
+
491
+ # Airflow 3 api-server mounts webserver_config.py from this ConfigMap
492
+ # (apiServer.apiServerConfigConfigMapName). It is not part of the chart.
493
+ self.execute_command([
494
+ "kubectl", "apply",
495
+ "-f", "charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml",
496
+ "--namespace", self.namespace,
497
+ "--kubeconfig", self.kube_config,
498
+ ])
499
+
500
+ # migrate-database / create-user Jobs are plain resources (useHelmHooks:
501
+ # false, required with `helm --wait`). Job specs are immutable, so remove
502
+ # the finished ones before upgrading; the chart recreates them.
503
+ for job in (f"{self.data_orchestration_deployment_name}-run-airflow-migrations",
504
+ f"{self.data_orchestration_deployment_name}-create-user"):
505
+ if self.dry_run:
506
+ break
507
+ subprocess.run(
508
+ ["kubectl", "delete", "job", job, "--namespace", self.namespace,
509
+ "--ignore-not-found", "--kubeconfig", self.kube_config],
510
+ capture_output=True, text=True,
511
+ )
512
+
513
+ # Deploy Data Orchestration
514
+ logger.info("Deploying Data Orchestration")
515
+ self.deploy_service(
516
+ chart_repo_name=self.data_orchestration_chart_repo_name,
517
+ chart_repo=self.data_orchestration_chart_repo,
518
+ deployment_name=self.data_orchestration_deployment_name,
519
+ chart_name=self.data_orchestration_chart_name,
520
+ chart_version=self.data_orchestration_chart_version,
521
+ namespace=self.namespace,
522
+ values_path=self.data_orchestration_values_path
523
+ )
524
+
525
+ # Wait for Data Orchestration components (skip one-shot Jobs which finish Completed).
526
+ # Both labels are checked because:
527
+ # - Airflow chart <=1.16 (used by data_replication/airbyte etc.) labels pods with `airflow=<component>`
528
+ # - Airflow chart >=1.22 (Airflow 3) labels pods with `component=<component>`
529
+ # One of the two `kubectl wait` calls will match; the other returns exit 1 (no matching
530
+ # resources) which is harmless. Exit 124 = kubectl wait timed out (e.g. triggerer-1 stuck
531
+ # on a Multi-Attach PVC) — also tolerated so deployment doesn't hang.
532
+ logger.info("Waiting for Data Orchestration components to be ready...")
533
+ for component in ("api-server", "scheduler", "worker", "triggerer", "dag-processor", "webserver"):
534
+ for label_selector in (f"component={component}", f"airflow={component}"):
535
+ # Only one label style matches per chart version (and e.g.
536
+ # "webserver" does not exist in Airflow 3) -- skip selectors
537
+ # with no pods instead of waiting for pods that never appear.
538
+ from utils.helm_utils import pods_exist
539
+ if not pods_exist(label_selector, self.namespace, self.kube_config):
540
+ continue
541
+ wait_for_pods_ready(
542
+ label_selector=label_selector,
543
+ namespace=self.namespace,
544
+ kubeconfig=self.kube_config,
545
+ timeout_seconds=300,
546
+ )
547
+
548
+ # Deploy Data Dbt Server
549
+ logger.info("Deploying Data Dbt Server")
550
+ self.deploy_service(
551
+ chart_repo_name=self.data_dbt_server_chart_repo_name,
552
+ chart_repo=self.data_dbt_server_chart_repo,
553
+ deployment_name=self.data_dbt_server_deployment_name,
554
+ chart_name=self.data_dbt_server_chart_name,
555
+ chart_version=self.data_dbt_server_chart_version,
556
+ namespace=self.data_dbt_server_namespace,
557
+ values_path=self.data_dbt_server_values_path
558
+ )
559
+
560
+ # Metadata Collection
561
+ app_version_data_orchestration = self.get_deployed_app_version(self.data_orchestration_deployment_name, self.namespace)
562
+ app_version = {
563
+ "data_orchestration": app_version_data_orchestration,
564
+ "fast2dev_data_orchestration": self.data_orchestration_app_version
565
+ }
566
+ deployment_record = {
567
+ "customer": self.customer,
568
+ "customer_main_domain": self.customer_root_domain,
569
+ "deployment_environment": self.deployment_environment,
570
+ "deployment_name": self.data_orchestration_deployment_name,
571
+ "chart_name": self.data_orchestration_chart_name,
572
+ "chart_version": self.data_orchestration_chart_version,
573
+ "app_name": self.app_name,
574
+ "app_version": app_version,
575
+ "deploy_date": datetime.now().strftime("%Y-%m-%d")
576
+ }
577
+
578
+ logger.info("Adding deployment record to metadata collector")
579
+ self.metadata_collector.add_deployment_record(deployment_record)
580
+ logger.info("Platform Data Orchestration deployment completed successfully")
581
+ return "Platform Data Orchestration deployed successfully"
582
+
583
+ except Exception as e:
584
+ logger.error(f"Deployment failed: {str(e)}")
585
+ raise
586
+
587
+ @classmethod
588
+ def from_cli_args(cls, args):
589
+ """Create a PlatformDataOrchestration instance from CLI arguments"""
590
+ logger.info("Creating PlatformDataOrchestration instance from CLI arguments")
591
+ return cls(
592
+ chart_version=args.chart_version,
593
+ app_version=args.app_version,
594
+ customer=args.customer,
595
+ metadata_collector=args.metadata_collector,
596
+ cloud_provider=args.cloud_provider,
597
+ domain_name=args.domain_name,
598
+ platform_environment=getattr(args, 'environment', None),
599
+ )
600
+
601
+ if __name__ == "__main__":
602
+ # Configure file logging if running as main script
603
+ log_file = "data_orchestration_deployment.log"
604
+ file_handler = logging.FileHandler(log_file)
605
+ file_handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
606
+ logger.addHandler(file_handler)
607
+ logger.info(f"Starting Platform Data Orchestration deployment script, logging to {log_file}")
608
+
609
+ parser = argparse.ArgumentParser(
610
+ description="Platform Data Orchestration Deployment Tool",
611
+ formatter_class=argparse.RawDescriptionHelpFormatter
612
+ )
613
+
614
+ # Required core arguments
615
+ required_args = parser.add_argument_group('required core arguments')
616
+ required_args.add_argument(
617
+ '--customer',
618
+ required=True,
619
+ help='Customer tenant name (lowercase letters, numbers, and hyphens only)'
620
+ )
621
+ required_args.add_argument(
622
+ '--chart_version',
623
+ required=True,
624
+ help='Chart version for Data Orchestration'
625
+ )
626
+ required_args.add_argument(
627
+ '--app_version',
628
+ required=True,
629
+ help='Application version for Data Orchestration'
630
+ )
631
+ required_args.add_argument(
632
+ '--cloud_provider',
633
+ required=True,
634
+ choices=['gcp', 'aws', 'azure', 'self-managed'],
635
+ help='Cloud provider where the cluster is running'
636
+ )
637
+ required_args.add_argument(
638
+ '--domain_name',
639
+ required=True,
640
+ help='Domain name for the customer'
641
+ )
642
+
643
+ # Optional arguments
644
+ optional_args = parser.add_argument_group('optional arguments')
645
+ optional_args.add_argument(
646
+ '--project_id',
647
+ help='Cloud provider project ID (default: fast2dev-{customer})'
648
+ )
649
+ optional_args.add_argument(
650
+ '--cluster_name',
651
+ help='Kubernetes cluster name (default: fast2dev-{customer}-platform)'
652
+ )
653
+ optional_args.add_argument(
654
+ '--kube_config_path',
655
+ help='Path to kubeconfig file (default: /tmp/{cluster_name}-kubeconfig.yaml)'
656
+ )
657
+ optional_args.add_argument(
658
+ '--namespace',
659
+ default='data-orchestration',
660
+ help='Kubernetes namespace for deployment (default: data-orchestration)'
661
+ )
662
+ optional_args.add_argument(
663
+ '--metadata_file',
664
+ default='deployment_metadata.json',
665
+ help='Path to metadata file (default: deployment_metadata.json)'
666
+ )
667
+ optional_args.add_argument(
668
+ '--skip_metadata',
669
+ action='store_true',
670
+ help='Skip metadata collection (for CLI usage)'
671
+ )
672
+ optional_args.add_argument(
673
+ '--debug',
674
+ action='store_true',
675
+ help='Enable debug logging'
676
+ )
677
+
678
+ # Parse arguments
679
+ parser.add_argument('--environment', choices=ENVIRONMENTS, default=None, help='Platform environment used for sizing (production or development)')
680
+ args = parser.parse_args()
681
+
682
+ # Set debug level if requested
683
+ if args.debug:
684
+ logger.setLevel(logging.DEBUG)
685
+ logger.debug("Debug logging enabled")
686
+
687
+ try:
688
+ logger.info(f"Deploying Platform Data Orchestration for customer: {args.customer}")
689
+
690
+ # Create a simple metadata collector for CLI usage
691
+ class SimpleMetadataCollector:
692
+ def __init__(self, metadata_file):
693
+ self.metadata_file = metadata_file
694
+ self.deployment_records = []
695
+ if os.path.exists(metadata_file):
696
+ try:
697
+ with open(metadata_file, 'r') as f:
698
+ self.deployment_records = json.load(f)
699
+ logger.info(f"Loaded {len(self.deployment_records)} existing deployment records")
700
+ except json.JSONDecodeError:
701
+ logger.warning(f"Could not parse {metadata_file}, starting with empty records")
702
+ self.deployment_records = []
703
+ else:
704
+ logger.info(f"Metadata file {metadata_file} not found, will create new file")
705
+
706
+ def add_deployment_record(self, record):
707
+ self.deployment_records.append(record)
708
+ try:
709
+ # Ensure directory exists
710
+ os.makedirs(os.path.dirname(os.path.abspath(self.metadata_file)), exist_ok=True)
711
+ with open(self.metadata_file, 'w') as f:
712
+ json.dump(self.deployment_records, f, indent=2)
713
+ logger.info(f"Deployment record added to {self.metadata_file}")
714
+ except Exception as e:
715
+ logger.error(f"Failed to write metadata to {self.metadata_file}: {str(e)}")
716
+
717
+ # Use the appropriate metadata collector
718
+ if args.skip_metadata:
719
+ logger.info("Metadata collection is disabled")
720
+ class DummyMetadataCollector:
721
+ def add_deployment_record(self, record):
722
+ logger.info("Metadata collection skipped")
723
+ metadata_collector = DummyMetadataCollector()
724
+ else:
725
+ logger.info(f"Using metadata file: {args.metadata_file}")
726
+ metadata_collector = SimpleMetadataCollector(args.metadata_file)
727
+
728
+ # Add metadata collector to args for from_cli_args method
729
+ args.metadata_collector = metadata_collector
730
+
731
+ # Create manager instance using the CLI factory method
732
+ logger.info("Creating PlatformDataOrchestration instance")
733
+ manager = PlatformDataOrchestration.from_cli_args(args)
734
+
735
+ # Run the deployment
736
+ logger.info("Starting deployment process")
737
+ result = manager.run()
738
+
739
+ logger.info("Execution Result: " + str(result))
740
+ print("Execution Result:")
741
+ print(result)
742
+
743
+ except FileNotFoundError as e:
744
+ logger.error(f"File not found error: {str(e)}")
745
+ print(f"File not found error: {str(e)}")
746
+ sys.exit(1)
747
+ except ValueError as e:
748
+ logger.error(f"Invalid value error: {str(e)}")
749
+ print(f"Invalid value error: {str(e)}")
750
+ sys.exit(1)
751
+ except subprocess.CalledProcessError as e:
752
+ logger.error(f"Command execution failed: {str(e)}")
753
+ print(f"Command execution failed: {str(e)}")
754
+ sys.exit(1)
755
+ except Exception as e:
756
+ logger.error(f"An unexpected error occurred: {str(e)}", exc_info=True)
757
+ print(f"An unexpected error occurred: {str(e)}")
758
+ sys.exit(1)
759
+ finally:
760
+ logger.info("Platform Data Orchestration deployment script completed")