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.
- f2dev/__init__.py +1 -0
- f2dev/__main__.py +5 -0
- f2dev/_bundle/platform/.dockerignore +80 -0
- f2dev/_bundle/platform/.gitignore +82 -0
- f2dev/_bundle/platform/LICENSE +202 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/template_values.yaml +1731 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/Chart.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-airflow-deploy.yaml +60 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-bi-sync.yaml +46 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-checkout.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-console-sync.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-label.yaml +48 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-run.yaml +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-teardown.yaml +47 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-governance.yaml +40 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-lint.yaml +37 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-notify.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-quality.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-refresh.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-supersede.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-tags.yaml +44 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-branch.yaml +138 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-main.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-pr.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/NOTES.txt +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/settings-configmap.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/workflowtemplates.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/values.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml +436 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml +551 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/lightdash/template_values.yaml +359 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/metabase/template_values.yaml +384 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/superset/template_values.yaml +1562 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/template_values.yaml +269 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/.helmignore +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/Chart.yaml +20 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/template_values.yaml.j2 +175 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/NOTES.txt +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/_helpers.tpl +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/cicd-rbac.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/configmap.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/extras.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/promtail-configmap.yaml +68 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/service.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/serviceaccount.yaml +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/statefulset.yaml +276 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/valkey.yaml +113 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/warehouse-stats-cronjob.yaml +107 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/values.yaml +828 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_dbt_server/template_values.yaml +385 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_prerequisites_values.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_values.yaml +1671 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_kafka_values.yaml +112 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_opensearch_values.yaml +662 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_values.yaml +738 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/Chart.yaml +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/files/argo-openapi.json +681 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/_helpers.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/argo-rbac.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/backends.yaml +327 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/gateway.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/values.yaml +91 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/template_values.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values.yaml +1167 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values_extra.yaml +99 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/cleanup.py +452 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/docs/keycloak-oidc-setup.md +106 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values.yaml +5536 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values_extra.yaml +379 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml +459 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_auth.py +285 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_mcp_plugin.py +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/webserver_config.py +130 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/cleanup.py +749 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/configmap.yaml +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/cronjob.yaml +137 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/.helmignore +26 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.lock +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/README.md +243 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/NOTES.txt +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_helpers.tpl +245 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_images.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-auth-secret.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/bootloader-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/pod.yaml +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-connector-rollout-worker/deployment.yaml +171 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/cron-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/deployment.yaml +149 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-db.yaml +88 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/_helpers.tpl +111 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/deployment.yaml +169 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/hpa.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/pdb.yaml +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/deployment.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/service.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/statefulset.yaml +182 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/_helpers.tpl +54 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/deployment.yaml +152 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-metrics/deployment.yaml +124 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/deployment.yaml +227 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/service.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/deployment.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/configmap.yaml +55 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/deployment.yaml +220 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/deployment.yaml +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/deployment.yaml +146 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/ingress.yaml +63 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/service.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-worker/deployment.yaml +229 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/deployment.yaml +191 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/deployment.yaml +232 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/jobs-secrets.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_auth.tpl +944 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_aws.tpl +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cluster.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_common.tpl +370 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connector.tpl +58 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRollout.tpl +141 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRolloutWorker.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cron.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_customerio.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_database.tpl +375 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_dataplaneGroups.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_directJobRunner.tpl +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_featureFlags.tpl +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_java.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_jobs.tpl +422 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_keycloak.tpl +542 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_logging.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_metrics.tpl +214 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_micronaut.tpl +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_minio.tpl +64 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_secretsManager.tpl +628 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_server.tpl +533 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_shopify.tpl +83 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_stigg.tpl +157 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_storage.tpl +468 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_temporal.tpl +943 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_topology.tpl +98 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_tracking.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_webapp.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_worker.tpl +366 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadApiServer.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadLauncher.tpl +395 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloads.tpl +770 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/env-configmap.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/gcs-log-creds-secret.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/minio.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/serviceaccount.yaml +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/telemetry-configmap.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/tests/test-webapp.yaml +34 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/values.yaml +3158 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/.helmignore +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/Chart.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/README.md +172 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/_helpers.tpl +42 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/deployment.yaml +105 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/externalsecret.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/pdb.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/service.yaml +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/values.yaml +97 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/feature-flags-configmap.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_metrics_values.yaml +13 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_oauth2proxy_values.yaml +1200 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_values.yaml +3255 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/Chart.yaml +7 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-client.yaml +27 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-master.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-worker.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_client_options +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_master_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_worker_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/log4j2.properties +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/seatunnel.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/_helpers.tpl +70 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/configmap.yaml +11 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-master.yaml +120 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-worker.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/rbac.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/services.yaml +33 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/values.yaml +101 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_oauth2proxy_values.yaml +196 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_values.yaml +75 -0
- f2dev/_bundle/platform/charts/data_services_charts/object_storage_operator/template_values.yaml +506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/csi_driver_values.yaml +193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml +91 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values.yaml +1777 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values_extra.yaml +253 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cluster_cleaner/template_values.yaml +57 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values.yaml +476 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values_extra.yaml +131 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/realm_template.json +4785 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/template_values.yaml +657 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values.yaml +36 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values_extra.yaml +352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values.yaml +1218 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values_extra.yaml +845 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values.yaml +561 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values_extra.yaml +23 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_events_values.yaml +59 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_values.yaml +185 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_loki_values.yaml +108 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_metrics/template_values.yaml +1530 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/f2d-main.json +2871 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-k8s-cluster.json +1751 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-microservices.json +1682 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-pvc-storage.json +1320 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-service.json +1193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-cert-manager.json +755 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-keycloak.json +746 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-object-storage.json +881 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-postgresql.json +1590 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-traefik.json +1375 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows-trends.json +1916 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows.json +1330 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-analysis.json +631 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-freshness.json +1362 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-governance.json +1958 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-modeling.json +764 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration-trends.json +2352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration.json +1506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-quality.json +1549 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication-trends.json +2799 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication.json +2153 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming-trends.json +1536 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming.json +1209 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/f2d-bigquery.json +990 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/f2d-logs.json +630 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/folders.yaml +17 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/requirements.yaml +8 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml +2031 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_values.yaml +1315 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values.yaml +550 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values_extra.yaml +742 -0
- f2dev/_bundle/platform/charts/infra_services_charts/traefik_lb/template_values.yaml +1758 -0
- f2dev/_bundle/platform/cli/README.md +866 -0
- f2dev/_bundle/platform/cli/__init__.py +42 -0
- f2dev/_bundle/platform/cli/__main__.py +17 -0
- f2dev/_bundle/platform/cli/cert_providers.py +369 -0
- f2dev/_bundle/platform/cli/command_record.py +144 -0
- f2dev/_bundle/platform/cli/config/data_services_config.json +217 -0
- f2dev/_bundle/platform/cli/config/environment_profiles.yaml +183 -0
- f2dev/_bundle/platform/cli/config/images.json +129 -0
- f2dev/_bundle/platform/cli/config/infrastructure_services_config.json +141 -0
- f2dev/_bundle/platform/cli/config.py +252 -0
- f2dev/_bundle/platform/cli/deployment_configuration_aws_example.yaml +117 -0
- f2dev/_bundle/platform/cli/deployment_configuration_gcp_example.yaml +130 -0
- f2dev/_bundle/platform/cli/deployment_configuration_onprem_example.yaml +71 -0
- f2dev/_bundle/platform/cli/destroy.py +677 -0
- f2dev/_bundle/platform/cli/dns_check.py +27 -0
- f2dev/_bundle/platform/cli/dns_providers.py +405 -0
- f2dev/_bundle/platform/cli/exit_codes.py +32 -0
- f2dev/_bundle/platform/cli/fixers.py +56 -0
- f2dev/_bundle/platform/cli/generate_only.py +336 -0
- f2dev/_bundle/platform/cli/health_report.py +114 -0
- f2dev/_bundle/platform/cli/logging.py +206 -0
- f2dev/_bundle/platform/cli/main.py +5293 -0
- f2dev/_bundle/platform/cli/precheck.py +1523 -0
- f2dev/_bundle/platform/cli/prerequisites/README.md +208 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.bat +107 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.ps1 +343 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.sh +207 -0
- f2dev/_bundle/platform/cli/prerequisites/linux/install-linux.sh +775 -0
- f2dev/_bundle/platform/cli/prerequisites/macos/install-macos.sh +634 -0
- f2dev/_bundle/platform/cli/prerequisites/requirements.txt +41 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.ps1 +150 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.sh +418 -0
- f2dev/_bundle/platform/cli/prerequisites/versions.yaml +43 -0
- f2dev/_bundle/platform/cli/prerequisites/windows/install-windows.ps1 +1005 -0
- f2dev/_bundle/platform/cli/restore.py +179 -0
- f2dev/_bundle/platform/cli/service_gates.py +160 -0
- f2dev/_bundle/platform/cli/state.py +332 -0
- f2dev/_bundle/platform/cli/wizard.py +782 -0
- f2dev/_bundle/platform/cli.py +235 -0
- f2dev/_bundle/platform/deployers/__init__.py +4 -0
- f2dev/_bundle/platform/deployers/base_deployer.py +8 -0
- f2dev/_bundle/platform/deployers/clouds/__init__.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/aws_cloud.py +619 -0
- f2dev/_bundle/platform/deployers/clouds/azure_cloud.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/google_cloud.py +785 -0
- f2dev/_bundle/platform/deployers/clouds/terragrunt_progress.py +56 -0
- f2dev/_bundle/platform/deployers/services/data_services/1.0_cicd_workload_runner.py +644 -0
- f2dev/_bundle/platform/deployers/services/data_services/12.0_control_plane.py +321 -0
- f2dev/_bundle/platform/deployers/services/data_services/13.0_data_mcp_hub.py +362 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.0_object_storage_operator.py +416 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.5_services_logs.py +482 -0
- f2dev/_bundle/platform/deployers/services/data_services/3.0_data_cicd_workflows.py +361 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.0_data_replication.py +534 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.5_data_streaming.py +303 -0
- f2dev/_bundle/platform/deployers/services/data_services/5.0_data_orchestration.py +760 -0
- f2dev/_bundle/platform/deployers/services/data_services/6.0_data_modeling.py +753 -0
- f2dev/_bundle/platform/deployers/services/data_services/7.0_data_governance.py +795 -0
- f2dev/_bundle/platform/deployers/services/data_services/8.0_data_analysis.py +587 -0
- f2dev/_bundle/platform/deployers/services/infra_services/1.0_secret_operator.py +467 -0
- f2dev/_bundle/platform/deployers/services/infra_services/10.0_cluster_pvc_autoscaller.py +500 -0
- f2dev/_bundle/platform/deployers/services/infra_services/2.0_cert_manager.py +963 -0
- f2dev/_bundle/platform/deployers/services/infra_services/3.0_external_dns.py +823 -0
- f2dev/_bundle/platform/deployers/services/infra_services/4.0_traefik_lb.py +604 -0
- f2dev/_bundle/platform/deployers/services/infra_services/5.0_stackgres_postgresql.py +652 -0
- f2dev/_bundle/platform/deployers/services/infra_services/6.0_services_metrics.py +515 -0
- f2dev/_bundle/platform/deployers/services/infra_services/7.0_services_monitoring.py +787 -0
- f2dev/_bundle/platform/deployers/services/infra_services/8.0_cluster_cleaner.py +439 -0
- f2dev/_bundle/platform/deployers/services/infra_services/9.0_idp_sso_manager.py +790 -0
- f2dev/_bundle/platform/readme.md +47 -0
- f2dev/_bundle/platform/requirements.txt +14 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/backend.tf_template +10 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/defaults.yaml_template +11 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/01-apps-vpc/terragrunt.hcl +26 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/02-create-dns-ns-record/terragrunt.hcl +16 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/03-eks-cluster/terragrunt.hcl +21 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/04-external_dns_sa/terragrunt.hcl +28 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/01-apps-vpc/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/02-eks-cluster/terragrunt.hcl +32 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/03-external-dns-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/04-cert-manager-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +22 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +44 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/env.hcl +2 -0
- f2dev/_bundle/platform/terraform/azure_cloud/README.md +3 -0
- f2dev/_bundle/platform/terraform/azure_cloud/templates/_keep_structure.txt +0 -0
- f2dev/_bundle/platform/terraform/google_cloud/README.md +20 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/backend.tf_template +7 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/defaults.yaml_template +12 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_advanced_template +114 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_basic_template +116 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/.gitignore +3 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/00-create-ou-folder/terragrunt.hcl +15 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/01-create-project/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/02-enable-apis/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/03-0-apps-vpc/terragrunt.hcl +134 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/04-external-ip-traefik/terragrunt.hcl +29 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/07-gke-cluster/terragrunt.hcl +103 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/08-dbt_deploy_sa/terragrunt.hcl +36 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/09-dbt_sa/terragrunt.hcl +40 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/10-cert_manager_sa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/11-external_dns_sa/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/12-monitoring_sa/terragrunt.hcl +52 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/13-data_replication_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/14-data_orchestration_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/15-bi_data_sa/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/16-whitelist-external-ip-on-common/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/17-kubeconfig/terragrunt.hcl +23 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/18-data_streaming_sa/terragrunt.hcl +24 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/utils/__init__.py +0 -0
- f2dev/_bundle/platform/utils/customer_data_platform_repository_operator.py +1098 -0
- f2dev/_bundle/platform/utils/customer_secret_manager_operations.py +1635 -0
- f2dev/_bundle/platform/utils/environment_profiles.py +58 -0
- f2dev/_bundle/platform/utils/helm_utils.py +215 -0
- f2dev/_bundle/platform/utils/infrastructure_deployment_operator.py +1532 -0
- f2dev/_bundle/platform/utils/keycloak_realm_reconcile.py +320 -0
- f2dev/_bundle/platform/utils/kubeconfig_fixer.py +265 -0
- f2dev/_bundle/platform/utils/raw_extras.py +34 -0
- f2dev/_bundle/platform/utils/readiness.py +330 -0
- f2dev/_bundle/platform/utils/secret_structure_upgrade.py +194 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/.gitignore +7 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/README.md +33 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/analyses/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/dbt_project.yml +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_bq_time_zones.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_monitoring_grain.sql +23 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.sql +19 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.yml +25 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.sql +16 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.yml +24 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.yml +21 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.sql +14 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.yml +22 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.sql +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.yml +42 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.sql +74 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.yml +49 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/sources/billing_export.yml +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.sql +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.yml +4 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/packages.yml +5 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/profiles.yml +15 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/scripts/run_monitoring.py +201 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/seeds/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/snapshots/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/tests/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/dry_run/gcp_sa.json +12 -0
- f2dev/_bundle/platform/utils/templates/dry_run/kubeconfig.yaml +18 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/README.MD +50 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/dbt/README.MD +47 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/fast2dev_healthcheck.py_template_airflow_3.x +158 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/bitbucket/bitbucket-pipelines.yml_template +144 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/pr-agent.yml +30 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/validate-pr-description.yml +38 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/pr-agent.yml +37 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/validate-pr-description.yml +157 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/PR_VALIDATION.md +43 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/merge_request_templates/Default.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab-ci.yml_template +181 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.gitignore +21 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.pr_agent.toml +82 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/AGENTS.md +126 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/README.MD +101 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/DR.md +341 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/README.md.j2 +81 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/decrypt_files.py +331 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/encrypt_files.py +321 -0
- f2dev/_bundle/platform/utils/templates/secret_structure_template/customer_vault_structure.json +502 -0
- f2dev/_bundle/platform/utils/vault_structure_sync.py +96 -0
- f2dev/_bundle/terraform-modules/README.md +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/README.md +7 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/addons-roles.tf +298 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/main.tf +313 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/outputs.tf +3 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/policies/lb-controller-policy.json +219 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/provider.tf +36 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/variables.tf +107 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/main.tf +25 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/provider.tf +17 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/variables.tf +41 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/main.tf +34 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/provider.tf +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/variables.tf +118 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/azure_cloud/README.md +3 -0
- f2dev/_bundle/terraform-modules/google_cloud/README.md +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/main.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/outputs.tf +25 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/providers.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/main.tf +38 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/variables.tf +73 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/versions.tf +39 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/main.tf +213 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/outputs.tf +31 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/variables.tf +192 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/main.tf +29 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/output.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/variables.tf +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/main.tf +18 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/output.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/variables.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/README.md +188 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/main.tf +135 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/output.tf +16 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/variables.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/versions.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/main.tf +14 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/provider.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/variables.tf +13 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/README.md +89 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/main.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/outputs.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/variables.tf +43 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/variables.tf +37 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/README.md +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/main.tf +459 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/provider.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/variables.tf +354 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/versions.tf +22 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/README.md +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/main.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/outputs.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/variables.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/README.md +47 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/main.tf +51 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/README.md +103 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/main.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/outputs.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/variables.tf +82 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/versions.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/outputs.tf +35 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/variables.tf +237 -0
- f2dev/_bundle/terraform-modules/oracle_cloud/README.md +3 -0
- f2dev/launcher.py +153 -0
- fast2dev-1.0.0.dist-info/METADATA +201 -0
- fast2dev-1.0.0.dist-info/RECORD +543 -0
- fast2dev-1.0.0.dist-info/WHEEL +4 -0
- fast2dev-1.0.0.dist-info/entry_points.txt +2 -0
- fast2dev-1.0.0.dist-info/licenses/LICENSE +202 -0
- fast2dev-1.0.0.dist-info/licenses/NOTICE +6 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
|
|
2
|
+
import subprocess
|
|
3
|
+
import os
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
import json
|
|
6
|
+
import logging
|
|
7
|
+
import sys
|
|
8
|
+
import argparse
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from jinja2 import Environment, FileSystemLoader, TemplateNotFound # type: ignore
|
|
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, wait_for_endpoints_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('cicd_workload_runner_deployer')
|
|
25
|
+
|
|
26
|
+
class Platformk8sGitRunner:
|
|
27
|
+
def __init__(self, chart_version, customer, metadata_collector, cloud_provider, domain_name, git_provider=None,
|
|
28
|
+
git_runner_access_token=None, git_runner_private_key=None, git_repo=None,
|
|
29
|
+
git_provider_url=None, project_id=None, cluster_name=None, kube_config_path=None,
|
|
30
|
+
namespace="data-cicd-runners", dry_run=False, platform_environment=None):
|
|
31
|
+
self.deployment_environment = "data-services"
|
|
32
|
+
self.namespace = namespace
|
|
33
|
+
self.customer = customer
|
|
34
|
+
self.domain_name = domain_name
|
|
35
|
+
self.cloud_provider = cloud_provider
|
|
36
|
+
self.metadata_collector = metadata_collector
|
|
37
|
+
self.dry_run = dry_run
|
|
38
|
+
self.platform_environment = resolve_environment(platform_environment, cloud_provider)
|
|
39
|
+
self.size = service_size("cicd_workload_runner", self.platform_environment)
|
|
40
|
+
self.git_provider = git_provider
|
|
41
|
+
self.git_repo = git_repo
|
|
42
|
+
self.git_provider_url = git_provider_url if git_provider_url else self._extract_git_provider_url(git_repo) if git_repo else "https://gitlab.fast2.dev"
|
|
43
|
+
self.git_runner_access_token = git_runner_access_token
|
|
44
|
+
self.git_runner_private_key = git_runner_private_key
|
|
45
|
+
self.full_domain_name = f"{customer}.{domain_name}"
|
|
46
|
+
self.ingress_host = f"gitwebhook.{self.full_domain_name}"
|
|
47
|
+
|
|
48
|
+
self.secret_file = str(vault_structure_path(customer))
|
|
49
|
+
if not os.path.exists(self.secret_file):
|
|
50
|
+
raise FileNotFoundError(f"Secret file not found: {self.secret_file}")
|
|
51
|
+
|
|
52
|
+
# Chart configuration Global
|
|
53
|
+
self.chart_version = chart_version
|
|
54
|
+
self.deployment_name = "fast2dev-cicd-trigger-runner"
|
|
55
|
+
self.values_path = "charts/data_services_charts/cicd_workload_runner/values.yaml"
|
|
56
|
+
self.values_extra_path = "charts/data_services_charts/cicd_workload_runner/values_extra.yaml"
|
|
57
|
+
|
|
58
|
+
# Extra values file chart configuration
|
|
59
|
+
self.extra_chart_version = "0.1.1"
|
|
60
|
+
self.extra_deployment_name = "fast2dev-cicd-trigger-runner-extra"
|
|
61
|
+
self.extra_chart_repo_name = "kube-core"
|
|
62
|
+
self.extra_chart_repo = "https://kube-core.github.io/helm-charts"
|
|
63
|
+
self.extra_chart_name = "kube-core/raw"
|
|
64
|
+
|
|
65
|
+
# Git Provider Specific
|
|
66
|
+
if not self.git_provider:
|
|
67
|
+
self.git_provider = self._detect_git_provider(self.git_provider_url)
|
|
68
|
+
|
|
69
|
+
if self.git_provider == "fast2dev":
|
|
70
|
+
self.chart_repo_name = "gitlab"
|
|
71
|
+
self.chart_repo = "https://charts.gitlab.io/"
|
|
72
|
+
self.chart_name = "gitlab/gitlab-runner"
|
|
73
|
+
self.render_template_values_path = "charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml"
|
|
74
|
+
self.render_template_values_extra_path = "charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml"
|
|
75
|
+
elif self.git_provider == "gitlab":
|
|
76
|
+
self.chart_repo_name = "gitlab"
|
|
77
|
+
self.chart_repo = "https://charts.gitlab.io/"
|
|
78
|
+
self.chart_name = "gitlab/gitlab-runner"
|
|
79
|
+
self.render_template_values_path = "charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml"
|
|
80
|
+
self.render_template_values_extra_path = "charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml"
|
|
81
|
+
elif self.git_provider == "github":
|
|
82
|
+
self.chart_repo_name = "github"
|
|
83
|
+
self.chart_repo = "https://actions-runner-controller.github.io/actions-runner-controller"
|
|
84
|
+
self.chart_name = "github/actions-runner-controller"
|
|
85
|
+
self.render_template_values_path = "charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml"
|
|
86
|
+
self.render_template_values_extra_path = "charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml"
|
|
87
|
+
elif self.git_provider in ("gitea", "bitbucket"):
|
|
88
|
+
raise NotImplementedError(
|
|
89
|
+
f"CI/CD runner for '{self.git_provider}' is planned but not implemented yet; "
|
|
90
|
+
"the deployment repository works with it, use GitHub or GitLab for the runner for now."
|
|
91
|
+
)
|
|
92
|
+
else:
|
|
93
|
+
raise ValueError(f"Unsupported git provider: {self.git_provider}")
|
|
94
|
+
|
|
95
|
+
# Cloud Provider Specific
|
|
96
|
+
try:
|
|
97
|
+
if self.cloud_provider == "gcp":
|
|
98
|
+
if project_id and project_id.strip():
|
|
99
|
+
self.project_id = project_id
|
|
100
|
+
logger.info(f"Using provided project_id: {self.project_id}")
|
|
101
|
+
else:
|
|
102
|
+
self.project_id = f"fast2dev-{customer}"
|
|
103
|
+
logger.warning(f"No project_id provided, using default: {self.project_id}")
|
|
104
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
105
|
+
logger.info(f"Configured for GCP with project ID: {self.project_id}")
|
|
106
|
+
elif self.cloud_provider == "aws":
|
|
107
|
+
self.project_id = None
|
|
108
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
109
|
+
logger.info(f"Configured for AWS with cluster: {self.cluster_name}")
|
|
110
|
+
elif self.cloud_provider == "azure":
|
|
111
|
+
self.project_id = None
|
|
112
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
113
|
+
logger.info(f"Configured for Azure with cluster: {self.cluster_name}")
|
|
114
|
+
elif self.cloud_provider == "self-managed":
|
|
115
|
+
self.project_id = None
|
|
116
|
+
self.cluster_name = cluster_name if cluster_name else f"fast2dev-{customer}-platform"
|
|
117
|
+
logger.info(f"Configured for self-managed with cluster: {self.cluster_name}")
|
|
118
|
+
else:
|
|
119
|
+
raise ValueError(f"Unsupported cloud provider: {self.cloud_provider}")
|
|
120
|
+
except Exception as e:
|
|
121
|
+
logger.error(f"Error during cloud provider configuration: {str(e)}")
|
|
122
|
+
raise
|
|
123
|
+
|
|
124
|
+
# Set kubeconfig path after cluster_name is properly initialized
|
|
125
|
+
self.kube_config = kube_config_path if kube_config_path else f'/tmp/{self.cluster_name}-kubeconfig.yaml'
|
|
126
|
+
logger.info(f"Using kubeconfig: {self.kube_config}")
|
|
127
|
+
|
|
128
|
+
# Check if kubeconfig exists
|
|
129
|
+
if not os.path.exists(self.kube_config):
|
|
130
|
+
logger.warning(f"Kubeconfig file not found at {self.kube_config}. Deployment may fail.")
|
|
131
|
+
|
|
132
|
+
# MetadataCollection
|
|
133
|
+
self.app_name = self.chart_name.split('/')[1]
|
|
134
|
+
|
|
135
|
+
# Validate template paths
|
|
136
|
+
self._validate_template_paths()
|
|
137
|
+
|
|
138
|
+
def _validate_template_paths(self):
|
|
139
|
+
"""Validate that all required template files exist"""
|
|
140
|
+
required_paths = [
|
|
141
|
+
self.render_template_values_path,
|
|
142
|
+
self.render_template_values_extra_path
|
|
143
|
+
]
|
|
144
|
+
for path in required_paths:
|
|
145
|
+
template_path = Path(path)
|
|
146
|
+
if not template_path.exists():
|
|
147
|
+
logger.error(f"Template file not found: {template_path}")
|
|
148
|
+
raise FileNotFoundError(f"Template file not found: {template_path}")
|
|
149
|
+
logger.debug(f"Template file validated: {template_path}")
|
|
150
|
+
|
|
151
|
+
def deploy_service(self, chart_repo_name, chart_repo, deployment_name, chart_name, chart_version, namespace, values_path):
|
|
152
|
+
"""Deploy a Helm chart service"""
|
|
153
|
+
logger.info(f"Deploying {deployment_name} in namespace {namespace}")
|
|
154
|
+
|
|
155
|
+
# Check if values file exists
|
|
156
|
+
if not os.path.exists(values_path):
|
|
157
|
+
logger.error(f"Values file not found: {values_path}")
|
|
158
|
+
raise FileNotFoundError(f"Values file not found: {values_path}")
|
|
159
|
+
|
|
160
|
+
try:
|
|
161
|
+
# Properly add and update the Helm repo
|
|
162
|
+
add_or_keep_helm_repo(chart_repo_name, chart_repo)
|
|
163
|
+
self.execute_command(["helm", "repo", "update", chart_repo_name])
|
|
164
|
+
|
|
165
|
+
# Formulate the Helm upgrade command properly as a list
|
|
166
|
+
helm_command = [
|
|
167
|
+
"helm", "upgrade", "-i", deployment_name, chart_name,
|
|
168
|
+
"--version", chart_version,
|
|
169
|
+
"--namespace", namespace,
|
|
170
|
+
"--create-namespace",
|
|
171
|
+
"--values", values_path,
|
|
172
|
+
"--kubeconfig", self.kube_config
|
|
173
|
+
]
|
|
174
|
+
self.execute_command(helm_command)
|
|
175
|
+
logger.info(f"Successfully deployed {deployment_name} in namespace {namespace}")
|
|
176
|
+
except Exception as e:
|
|
177
|
+
logger.error(f"Failed to deploy {deployment_name}: {str(e)}")
|
|
178
|
+
raise
|
|
179
|
+
|
|
180
|
+
def get_deployed_app_version(self, deployment_name, namespace):
|
|
181
|
+
"""Get the deployed application version from Helm"""
|
|
182
|
+
logger.info(f"Getting deployed version for {deployment_name} in namespace {namespace}")
|
|
183
|
+
try:
|
|
184
|
+
command = ["helm", "ls", "--deployed", "-f", deployment_name, "-n", namespace, "--kubeconfig", self.kube_config, "--output", "json"]
|
|
185
|
+
result = self.execute_command(command)
|
|
186
|
+
if result:
|
|
187
|
+
# Parse JSON output
|
|
188
|
+
deployments = json.loads(result)
|
|
189
|
+
if deployments and isinstance(deployments, list) and len(deployments) > 0:
|
|
190
|
+
app_version = deployments[0].get('app_version', "Unknown")
|
|
191
|
+
logger.info(f"Found app version: {app_version}")
|
|
192
|
+
return app_version
|
|
193
|
+
else:
|
|
194
|
+
logger.warning(f"No deployments found for {deployment_name}")
|
|
195
|
+
return "No deployed version found"
|
|
196
|
+
except json.JSONDecodeError as e:
|
|
197
|
+
logger.error(f"Failed to parse Helm output as JSON: {str(e)}")
|
|
198
|
+
return "Error parsing version"
|
|
199
|
+
except Exception as e:
|
|
200
|
+
logger.error(f"Error getting deployed version: {str(e)}")
|
|
201
|
+
return "Error getting version"
|
|
202
|
+
|
|
203
|
+
def execute_command(self, command):
|
|
204
|
+
"""Execute a shell command with proper error handling"""
|
|
205
|
+
cmd_str = ' '.join(command)
|
|
206
|
+
|
|
207
|
+
# Dry-run mode: show command without executing
|
|
208
|
+
if self.dry_run:
|
|
209
|
+
logger.info(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
210
|
+
print(f"[DRY-RUN] Would execute: {cmd_str}")
|
|
211
|
+
return "" # Return mock success
|
|
212
|
+
|
|
213
|
+
logger.debug(f"Executing command: {cmd_str}")
|
|
214
|
+
|
|
215
|
+
try:
|
|
216
|
+
result = subprocess.run(command, check=True, capture_output=True, text=True)
|
|
217
|
+
logger.debug(f"Command output: {result.stdout}")
|
|
218
|
+
return result.stdout
|
|
219
|
+
except subprocess.CalledProcessError as e:
|
|
220
|
+
logger.error(f"Command failed: {cmd_str}")
|
|
221
|
+
logger.error(f"Status code: {e.returncode}")
|
|
222
|
+
logger.error(f"Output: {e.stdout}")
|
|
223
|
+
logger.error(f"Error: {e.stderr}")
|
|
224
|
+
raise Exception(f"Execution failed for command {cmd_str}: {e.stderr}")
|
|
225
|
+
except Exception as e:
|
|
226
|
+
logger.error(f"Unexpected error executing command {cmd_str}: {str(e)}")
|
|
227
|
+
raise
|
|
228
|
+
|
|
229
|
+
def get_secret_from_vault(self, secret_name, secret_path):
|
|
230
|
+
"""Retrieve the secret from the local vault JSON file."""
|
|
231
|
+
try:
|
|
232
|
+
with open(self.secret_file, 'r') as f:
|
|
233
|
+
vault_data = json.load(f)
|
|
234
|
+
|
|
235
|
+
# Navigate through the JSON structure based on the secret path
|
|
236
|
+
current = vault_data
|
|
237
|
+
for part in secret_path.strip('/').split('/'):
|
|
238
|
+
if part not in current:
|
|
239
|
+
raise KeyError(f"Path {secret_path} not found in vault structure")
|
|
240
|
+
current = current[part]
|
|
241
|
+
|
|
242
|
+
if secret_name not in current:
|
|
243
|
+
raise KeyError(f"Secret {secret_name} not found at path {secret_path}")
|
|
244
|
+
|
|
245
|
+
return current[secret_name]
|
|
246
|
+
except Exception as e:
|
|
247
|
+
logger.error(f"Failed to get secret from local vault: {str(e)}")
|
|
248
|
+
raise
|
|
249
|
+
|
|
250
|
+
def render_values_file(self, git_runner_token, git_runner_private_key, git_repo):
|
|
251
|
+
"""Render the values file from template"""
|
|
252
|
+
logger.info("Rendering values file from template")
|
|
253
|
+
try:
|
|
254
|
+
context = {
|
|
255
|
+
'chart_name': self.chart_name,
|
|
256
|
+
'chart_repo': self.chart_repo,
|
|
257
|
+
'chart_version': self.chart_version,
|
|
258
|
+
'git_runner_token': git_runner_token,
|
|
259
|
+
'git_runner_private_key': git_runner_private_key,
|
|
260
|
+
'git_provider_url': self.git_provider_url,
|
|
261
|
+
'ingress_host': self.ingress_host,
|
|
262
|
+
'git_repo': git_repo,
|
|
263
|
+
'domain_name': self.domain_name,
|
|
264
|
+
'cloud_provider': self.cloud_provider
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
logger.info(f"Using git provider URL: {self.git_provider_url}")
|
|
268
|
+
|
|
269
|
+
# Ensure output directory exists
|
|
270
|
+
output_dir = os.path.dirname(self.values_path)
|
|
271
|
+
if not os.path.exists(output_dir):
|
|
272
|
+
logger.info(f"Creating output directory: {output_dir}")
|
|
273
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
274
|
+
|
|
275
|
+
self.render_template(self.render_template_values_path, self.values_path, context)
|
|
276
|
+
self.render_template(self.render_template_values_extra_path, self.values_extra_path, context)
|
|
277
|
+
logger.info("Successfully rendered values files")
|
|
278
|
+
except Exception as e:
|
|
279
|
+
logger.error(f"Failed to render values file: {str(e)}")
|
|
280
|
+
raise
|
|
281
|
+
|
|
282
|
+
def render_template(self, template_path, output_path, context):
|
|
283
|
+
"""Render a template file with the given context"""
|
|
284
|
+
try:
|
|
285
|
+
logger.debug(f"Rendering template {template_path} to {output_path}")
|
|
286
|
+
env = Environment(loader=FileSystemLoader(os.path.dirname(template_path)))
|
|
287
|
+
template = env.get_template(os.path.basename(template_path))
|
|
288
|
+
output = template.render({**context, 'size': self.size, 'platform_environment': self.platform_environment})
|
|
289
|
+
with open(output_path, 'w') as f:
|
|
290
|
+
f.write(output)
|
|
291
|
+
logger.debug("Template rendered successfully")
|
|
292
|
+
except TemplateNotFound as e:
|
|
293
|
+
logger.error(f"Template not found: {e}")
|
|
294
|
+
raise
|
|
295
|
+
except Exception as e:
|
|
296
|
+
logger.error(f"Error rendering template {template_path}: {str(e)}")
|
|
297
|
+
raise
|
|
298
|
+
|
|
299
|
+
def run(self):
|
|
300
|
+
"""Main execution method"""
|
|
301
|
+
logger.info(f"Starting CICD Workload Runner deployment for customer: {self.customer}")
|
|
302
|
+
try:
|
|
303
|
+
# Get secrets from vault
|
|
304
|
+
if self.git_runner_access_token:
|
|
305
|
+
git_runner_token = self.git_runner_access_token
|
|
306
|
+
else:
|
|
307
|
+
# Get git runner token from vault
|
|
308
|
+
git_runner_token = self.get_secret_from_vault(
|
|
309
|
+
secret_name="RUNNER-REGISTRATION-TOKEN",
|
|
310
|
+
secret_path="/data-platform-runner/ci-access-tokens/",
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
if self.git_runner_private_key:
|
|
314
|
+
git_runner_private_key = self.git_runner_private_key
|
|
315
|
+
else:
|
|
316
|
+
# Get git runner private key from vault
|
|
317
|
+
git_runner_private_key = self.get_secret_from_vault(
|
|
318
|
+
secret_name="private",
|
|
319
|
+
secret_path="/data-platform-runner/ssh-keys-data-model-repo/",
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
if self.git_repo:
|
|
323
|
+
git_repo = self.git_repo
|
|
324
|
+
else:
|
|
325
|
+
# Get git repo from vault
|
|
326
|
+
git_repo = self.get_secret_from_vault(
|
|
327
|
+
secret_name="data_repo_url",
|
|
328
|
+
secret_path="/data-platform-runner/git_provider_repo_urls/",
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
# Update git provider URL based on the repository URL
|
|
332
|
+
self.git_provider_url = self._extract_git_provider_url(git_repo)
|
|
333
|
+
|
|
334
|
+
# Extract the repository name from the URL, remove http://, https://, and .git
|
|
335
|
+
if self.git_provider == "github":
|
|
336
|
+
# For GitHub (including Enterprise), extract the path after the domain
|
|
337
|
+
# Remove protocol and .git suffix, then extract the path
|
|
338
|
+
clean_url = git_repo.replace("http://", "").replace("https://", "").replace(".git", "")
|
|
339
|
+
# Split by '/' and remove the domain part, keep the rest as org/repo
|
|
340
|
+
url_parts = clean_url.split("/")
|
|
341
|
+
if len(url_parts) >= 3:
|
|
342
|
+
git_repo_extact = "/".join(url_parts[1:]) # Skip domain, keep org/repo
|
|
343
|
+
else:
|
|
344
|
+
git_repo_extact = clean_url
|
|
345
|
+
else:
|
|
346
|
+
git_repo_extact = git_repo.split("/")[-1].replace("http://", "").replace("https://", "").replace(".git", "")
|
|
347
|
+
|
|
348
|
+
# Render and deploy
|
|
349
|
+
self.render_values_file(git_runner_token=git_runner_token, git_runner_private_key=git_runner_private_key, git_repo=git_repo_extact)
|
|
350
|
+
|
|
351
|
+
# Deploy service
|
|
352
|
+
logger.info("Deploying CICD workload runner service")
|
|
353
|
+
self.deploy_service(
|
|
354
|
+
chart_repo_name=self.chart_repo_name,
|
|
355
|
+
chart_repo=self.chart_repo,
|
|
356
|
+
deployment_name=self.deployment_name,
|
|
357
|
+
chart_name=self.chart_name,
|
|
358
|
+
chart_version=self.chart_version,
|
|
359
|
+
namespace=self.namespace,
|
|
360
|
+
values_path=self.values_path
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
# Deploy extra resources
|
|
364
|
+
if self.git_provider == "github":
|
|
365
|
+
wait_for_pods_ready(
|
|
366
|
+
label_selector="fast2dev=cicd-workload-runner",
|
|
367
|
+
namespace=self.namespace,
|
|
368
|
+
kubeconfig=self.kube_config,
|
|
369
|
+
timeout_seconds=300,
|
|
370
|
+
)
|
|
371
|
+
# The RunnerDeployment in the extra chart is guarded by the
|
|
372
|
+
# actions-runner-controller admission webhook. A Ready controller pod does
|
|
373
|
+
# not guarantee the webhook Service endpoint is serving yet, so applying the
|
|
374
|
+
# RunnerDeployment immediately races it and fails with "connection refused".
|
|
375
|
+
# Wait for the webhook endpoint to carry a ready address first.
|
|
376
|
+
wait_for_endpoints_ready(
|
|
377
|
+
service_name=f"{self.deployment_name}-actions-runner-controller-webhook",
|
|
378
|
+
namespace=self.namespace,
|
|
379
|
+
kubeconfig=self.kube_config,
|
|
380
|
+
timeout_seconds=180,
|
|
381
|
+
)
|
|
382
|
+
logger.info("Deploying CICD workload runner extra resources")
|
|
383
|
+
self.deploy_service(
|
|
384
|
+
chart_repo_name=self.extra_chart_repo_name,
|
|
385
|
+
chart_repo=self.extra_chart_repo,
|
|
386
|
+
deployment_name=self.extra_deployment_name,
|
|
387
|
+
chart_name=self.extra_chart_name,
|
|
388
|
+
chart_version=self.extra_chart_version,
|
|
389
|
+
namespace=self.namespace,
|
|
390
|
+
values_path=self.values_extra_path
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
# Metadata Collection
|
|
394
|
+
app_version = self.get_deployed_app_version(self.deployment_name, self.namespace)
|
|
395
|
+
deployment_record = {
|
|
396
|
+
"customer": self.customer,
|
|
397
|
+
"customer_main_domain": self.full_domain_name,
|
|
398
|
+
"deployment_environment": self.deployment_environment,
|
|
399
|
+
"deployment_name": self.deployment_name,
|
|
400
|
+
"chart_name": self.chart_name,
|
|
401
|
+
"chart_version": self.chart_version,
|
|
402
|
+
"app_name": self.app_name,
|
|
403
|
+
"app_version": app_version,
|
|
404
|
+
"deploy_date": datetime.now().strftime("%Y-%m-%d"),
|
|
405
|
+
"domain_name": self.domain_name,
|
|
406
|
+
"cloud_provider": self.cloud_provider,
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
logger.info("Adding deployment record to metadata collector")
|
|
410
|
+
self.metadata_collector.add_deployment_record(deployment_record)
|
|
411
|
+
logger.info("CICD Workload Runner deployment completed successfully")
|
|
412
|
+
return "CICD Workload Runner deployed successfully"
|
|
413
|
+
|
|
414
|
+
except Exception as e:
|
|
415
|
+
logger.error(f"Deployment failed: {str(e)}")
|
|
416
|
+
raise
|
|
417
|
+
|
|
418
|
+
@classmethod
|
|
419
|
+
def from_cli_args(cls, args):
|
|
420
|
+
"""Create an instance from CLI arguments."""
|
|
421
|
+
return cls(
|
|
422
|
+
chart_version=args.chart_version,
|
|
423
|
+
customer=args.customer,
|
|
424
|
+
metadata_collector=args.metadata_collector,
|
|
425
|
+
cloud_provider=args.cloud_provider,
|
|
426
|
+
domain_name=args.domain_name,
|
|
427
|
+
git_runner_access_token=args.git_runner_token,
|
|
428
|
+
git_runner_private_key=args.git_runner_private_key,
|
|
429
|
+
git_repo=args.git_repo,
|
|
430
|
+
git_provider=args.git_provider,
|
|
431
|
+
git_provider_url=args.git_url,
|
|
432
|
+
project_id=args.project_id,
|
|
433
|
+
cluster_name=args.cluster_name,
|
|
434
|
+
kube_config_path=args.kube_config_path,
|
|
435
|
+
platform_environment=getattr(args, 'environment', None),
|
|
436
|
+
namespace=args.namespace
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
def _extract_git_provider_url(self, git_repo_url):
|
|
440
|
+
"""Extract the git provider URL from the git repository URL."""
|
|
441
|
+
if not git_repo_url:
|
|
442
|
+
return "https://gitlab.fast2.dev"
|
|
443
|
+
|
|
444
|
+
url = git_repo_url.replace(".git", "")
|
|
445
|
+
|
|
446
|
+
if url.startswith("http://") or url.startswith("https://"):
|
|
447
|
+
parts = url.split("/")
|
|
448
|
+
if len(parts) >= 3:
|
|
449
|
+
return f"{parts[0]}//{parts[2]}"
|
|
450
|
+
|
|
451
|
+
return "https://gitlab.fast2.dev"
|
|
452
|
+
|
|
453
|
+
def _detect_git_provider(self, git_provider_url):
|
|
454
|
+
"""Detect the git provider based on the provider URL."""
|
|
455
|
+
if not git_provider_url:
|
|
456
|
+
return "fast2dev"
|
|
457
|
+
|
|
458
|
+
url = git_provider_url.lower()
|
|
459
|
+
|
|
460
|
+
if "gitlab" in url:
|
|
461
|
+
return "gitlab"
|
|
462
|
+
elif "github" in url:
|
|
463
|
+
return "github"
|
|
464
|
+
elif "gitea" in url:
|
|
465
|
+
return "gitea"
|
|
466
|
+
elif "bitbucket" in url:
|
|
467
|
+
return "bitbucket"
|
|
468
|
+
else:
|
|
469
|
+
return "fast2dev"
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
def main():
|
|
473
|
+
parser = argparse.ArgumentParser(
|
|
474
|
+
description="CICD Workload Runner Deployment Tool",
|
|
475
|
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
476
|
+
)
|
|
477
|
+
|
|
478
|
+
# Required core arguments
|
|
479
|
+
required_args = parser.add_argument_group('required core arguments')
|
|
480
|
+
required_args.add_argument(
|
|
481
|
+
'--customer',
|
|
482
|
+
required=True,
|
|
483
|
+
help='Customer tenant name (lowercase letters, numbers, and hyphens only)'
|
|
484
|
+
)
|
|
485
|
+
required_args.add_argument(
|
|
486
|
+
'--chart_version',
|
|
487
|
+
required=True,
|
|
488
|
+
help='Chart version for CICD Workload Runner'
|
|
489
|
+
)
|
|
490
|
+
required_args.add_argument(
|
|
491
|
+
'--cloud_provider',
|
|
492
|
+
required=True,
|
|
493
|
+
choices=['gcp', 'aws', 'azure', 'self-managed'],
|
|
494
|
+
help='Cloud provider where the cluster is running'
|
|
495
|
+
)
|
|
496
|
+
required_args.add_argument(
|
|
497
|
+
'--domain_name',
|
|
498
|
+
required=True,
|
|
499
|
+
help='Domain name for the customer'
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
# Optional arguments
|
|
503
|
+
optional_args = parser.add_argument_group('optional arguments')
|
|
504
|
+
optional_args.add_argument(
|
|
505
|
+
'--project_id',
|
|
506
|
+
help='Cloud provider project ID (default: fast2dev-{customer})'
|
|
507
|
+
)
|
|
508
|
+
optional_args.add_argument(
|
|
509
|
+
'--cluster_name',
|
|
510
|
+
help='Kubernetes cluster name (default: fast2dev-{customer}-platform)'
|
|
511
|
+
)
|
|
512
|
+
optional_args.add_argument(
|
|
513
|
+
'--kube_config_path',
|
|
514
|
+
help='Path to kubeconfig file (default: /tmp/{cluster_name}-kubeconfig.yaml)'
|
|
515
|
+
)
|
|
516
|
+
optional_args.add_argument(
|
|
517
|
+
'--namespace',
|
|
518
|
+
default='data-cicd-runners',
|
|
519
|
+
help='Kubernetes namespace for deployment (default: data-cicd-runners)'
|
|
520
|
+
)
|
|
521
|
+
optional_args.add_argument(
|
|
522
|
+
'--metadata_file',
|
|
523
|
+
default='deployment_metadata.json',
|
|
524
|
+
help='Path to metadata file (default: deployment_metadata.json)'
|
|
525
|
+
)
|
|
526
|
+
optional_args.add_argument(
|
|
527
|
+
'--skip_metadata',
|
|
528
|
+
action='store_true',
|
|
529
|
+
help='Skip metadata collection (for CLI usage)'
|
|
530
|
+
)
|
|
531
|
+
optional_args.add_argument(
|
|
532
|
+
'--debug',
|
|
533
|
+
action='store_true',
|
|
534
|
+
help='Enable debug logging'
|
|
535
|
+
)
|
|
536
|
+
|
|
537
|
+
# Git-specific arguments
|
|
538
|
+
git_args = parser.add_argument_group('git configuration')
|
|
539
|
+
git_args.add_argument(
|
|
540
|
+
'--git_provider',
|
|
541
|
+
default='fast2dev',
|
|
542
|
+
choices=['fast2dev', 'github', 'gitlab', 'gitea', 'bitbucket'],
|
|
543
|
+
help='Git provider to use (default: fast2dev)'
|
|
544
|
+
)
|
|
545
|
+
git_args.add_argument(
|
|
546
|
+
'--git_repo',
|
|
547
|
+
help='Git repository URL (optional, will be retrieved from vault if not provided)'
|
|
548
|
+
)
|
|
549
|
+
git_args.add_argument(
|
|
550
|
+
'--git_url',
|
|
551
|
+
help='Git provider URL (optional, will be extracted from git_repo if not provided)'
|
|
552
|
+
)
|
|
553
|
+
git_args.add_argument(
|
|
554
|
+
'--git_runner_token',
|
|
555
|
+
help='Git runner token (optional, will be retrieved from vault if not provided)'
|
|
556
|
+
)
|
|
557
|
+
git_args.add_argument(
|
|
558
|
+
'--git_runner_private_key',
|
|
559
|
+
help='Git runner private key (optional, will be retrieved from vault if not provided)'
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
parser.add_argument('--environment', choices=ENVIRONMENTS, default=None, help='Platform environment used for sizing (production or development)')
|
|
563
|
+
args = parser.parse_args()
|
|
564
|
+
|
|
565
|
+
# Set debug logging if requested
|
|
566
|
+
if args.debug:
|
|
567
|
+
logger.setLevel(logging.DEBUG)
|
|
568
|
+
logger.debug("Debug logging enabled")
|
|
569
|
+
|
|
570
|
+
# Create metadata collector based on skip_metadata flag
|
|
571
|
+
# Create a simple metadata collector for CLI usage
|
|
572
|
+
class SimpleMetadataCollector:
|
|
573
|
+
def __init__(self, metadata_file):
|
|
574
|
+
self.metadata_file = metadata_file
|
|
575
|
+
self.deployment_records = []
|
|
576
|
+
if os.path.exists(metadata_file):
|
|
577
|
+
try:
|
|
578
|
+
with open(metadata_file, 'r') as f:
|
|
579
|
+
self.deployment_records = json.load(f)
|
|
580
|
+
logger.info(f"Loaded {len(self.deployment_records)} existing deployment records")
|
|
581
|
+
except json.JSONDecodeError:
|
|
582
|
+
logger.warning(f"Could not parse {metadata_file}, starting with empty records")
|
|
583
|
+
self.deployment_records = []
|
|
584
|
+
else:
|
|
585
|
+
logger.info(f"Metadata file {metadata_file} not found, will create new file")
|
|
586
|
+
|
|
587
|
+
def add_deployment_record(self, record):
|
|
588
|
+
self.deployment_records.append(record)
|
|
589
|
+
try:
|
|
590
|
+
# Ensure directory exists
|
|
591
|
+
os.makedirs(os.path.dirname(os.path.abspath(self.metadata_file)), exist_ok=True)
|
|
592
|
+
with open(self.metadata_file, 'w') as f:
|
|
593
|
+
json.dump(self.deployment_records, f, indent=2)
|
|
594
|
+
logger.info(f"Deployment record added to {self.metadata_file}")
|
|
595
|
+
except Exception as e:
|
|
596
|
+
logger.error(f"Failed to write metadata to {self.metadata_file}: {str(e)}")
|
|
597
|
+
|
|
598
|
+
# Use the appropriate metadata collector
|
|
599
|
+
if args.skip_metadata:
|
|
600
|
+
logger.info("Metadata collection is disabled")
|
|
601
|
+
class DummyMetadataCollector:
|
|
602
|
+
def add_deployment_record(self, record):
|
|
603
|
+
logger.info("Metadata collection skipped")
|
|
604
|
+
metadata_collector = DummyMetadataCollector()
|
|
605
|
+
else:
|
|
606
|
+
logger.info(f"Using metadata file: {args.metadata_file}")
|
|
607
|
+
metadata_collector = SimpleMetadataCollector(args.metadata_file)
|
|
608
|
+
|
|
609
|
+
# Add metadata collector to args for from_cli_args method
|
|
610
|
+
args.metadata_collector = metadata_collector
|
|
611
|
+
|
|
612
|
+
try:
|
|
613
|
+
# Initialize the CICD Workload Runner
|
|
614
|
+
logger.info(f"Initializing CICD Workload Runner for customer {args.customer}")
|
|
615
|
+
runner = Platformk8sGitRunner.from_cli_args(args)
|
|
616
|
+
|
|
617
|
+
# Deploy the CICD Workload Runner
|
|
618
|
+
logger.info("Starting CICD Workload Runner deployment")
|
|
619
|
+
result = runner.run()
|
|
620
|
+
logger.info("CICD Workload Runner deployment completed successfully")
|
|
621
|
+
print("Execution Result:")
|
|
622
|
+
print(result)
|
|
623
|
+
|
|
624
|
+
except FileNotFoundError as e:
|
|
625
|
+
logger.error(f"File not found error: {str(e)}")
|
|
626
|
+
print(f"File not found error: {str(e)}")
|
|
627
|
+
sys.exit(1)
|
|
628
|
+
except ValueError as e:
|
|
629
|
+
logger.error(f"Invalid value error: {str(e)}")
|
|
630
|
+
print(f"Invalid value error: {str(e)}")
|
|
631
|
+
sys.exit(1)
|
|
632
|
+
except subprocess.CalledProcessError as e:
|
|
633
|
+
logger.error(f"Command execution failed: {str(e)}")
|
|
634
|
+
print(f"Command execution failed: {str(e)}")
|
|
635
|
+
sys.exit(1)
|
|
636
|
+
except Exception as e:
|
|
637
|
+
logger.error(f"Deployment failed: {str(e)}")
|
|
638
|
+
if args.debug:
|
|
639
|
+
logger.exception("Detailed error information:")
|
|
640
|
+
print(f"Deployment failed: {str(e)}")
|
|
641
|
+
sys.exit(1)
|
|
642
|
+
|
|
643
|
+
if __name__ == "__main__":
|
|
644
|
+
main()
|