dbt-platform-helper 15.9.0__tar.gz → 15.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbt-platform-helper might be problematic. Click here for more details.
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/PKG-INFO +5 -3
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/COMMANDS.md +41 -0
- dbt_platform_helper-15.10.0/dbt_platform_helper/commands/internal.py +23 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/service.py +61 -1
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/entities/platform_config_schema.py +4 -2
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/platform_helper.py +2 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/pyproject.toml +2 -2
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/LICENSE +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/README.md +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/application.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/codebase.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/conduit.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/config.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/copilot.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/database.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/environment.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/generate.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/notify.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/pipeline.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/secrets.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/service.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/version.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/constants.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/default-extensions.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/codebase.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/conduit.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/config.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/copilot.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/copilot_environment.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/database_copy.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/maintenance_page.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/notify.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/pipelines.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/plans.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/terraform_environment.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/versioning.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/entities/semantic_version.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/entities/service.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/jinja2_tags.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/platform_exception.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/exceptions.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/interfaces.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/opensearch.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/redis.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/aws/sso_auth.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/cache.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/cloudformation.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/config.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/config_validator.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/copilot.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/ecr.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/ecs.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/environment_variable.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/files.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/io.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/kms.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/load_balancers.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/parameter_store.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/schema_migrations/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/schema_migrations/schema_v0_to_v1_migration.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/schema_migrator.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/secrets.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/slack_channel_notifier.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/terraform_manifest.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/validation.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/version.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/version_status.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/vpc.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/yaml_file.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/config.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/image_build_run.sh +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/phases/build.sh +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/phases/install.sh +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/phases/post_build.sh +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/.copilot/phases/pre_build.sh +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/COMMANDS.md.jinja +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addon-instructions.txt +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/README.md +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/svc/appconfig-ipfilter.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/svc/prometheus-policy.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/svc/s3-cross-account-policy.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/svc/s3-policy.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/addons/svc/subscription-filter.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/ci-codebuild-role-policy.json +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/create-codebuild-role.json +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/custom-codebuild-role-policy.json +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/env/manifest.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/env/terraform-overrides/cfn.patches.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/environment-pipelines/main.tf +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/svc/maintenance_pages/default.html +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/svc/maintenance_pages/dmas-migration.html +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/svc/maintenance_pages/migration.html +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/templates/svc/overrides/cfn.patches.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utilities/decorators.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/__init__.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/application.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/arn_parser.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/aws.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/click.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/deep_merge.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/git.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/messages.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/template.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/validation.py +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/terraform/elasticache-redis/plans.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/terraform/opensearch/plans.yml +0 -0
- {dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/terraform/postgres/plans.yml +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-platform-helper
|
|
3
|
-
Version: 15.
|
|
3
|
+
Version: 15.10.0
|
|
4
4
|
Summary: Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot.
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Department for Business and Trade Platform Team
|
|
7
8
|
Author-email: sre-team@digital.trade.gov.uk
|
|
8
9
|
Requires-Python: >3.9.1,<4.0
|
|
@@ -12,12 +13,13 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
17
|
Requires-Dist: Jinja2 (==3.1.6)
|
|
16
18
|
Requires-Dist: boto3 (>=1.35.2,<2.0.0)
|
|
17
19
|
Requires-Dist: botocore (>=1.34.85,<2.0.0)
|
|
18
20
|
Requires-Dist: cfn-flip (>=1.3.0,<2.0.0)
|
|
19
21
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
20
|
-
Requires-Dist: jinja2-simple-tags (>=0.5
|
|
22
|
+
Requires-Dist: jinja2-simple-tags (>=0.5,<0.7)
|
|
21
23
|
Requires-Dist: prettytable (>=3.9.0,<4.0.0)
|
|
22
24
|
Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
|
|
23
25
|
Requires-Dist: pydantic (>=2.11.7,<3.0.0)
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
- [platform-helper environment generate](#platform-helper-environment-generate)
|
|
23
23
|
- [platform-helper environment generate-terraform](#platform-helper-environment-generate-terraform)
|
|
24
24
|
- [platform-helper generate](#platform-helper-generate)
|
|
25
|
+
- [platform-helper internal](#platform-helper-internal)
|
|
26
|
+
- [platform-helper internal migrate-service-manifests](#platform-helper-internal-migrate-service-manifests)
|
|
25
27
|
- [platform-helper pipeline](#platform-helper-pipeline)
|
|
26
28
|
- [platform-helper pipeline generate](#platform-helper-pipeline-generate)
|
|
27
29
|
- [platform-helper secrets](#platform-helper-secrets)
|
|
@@ -65,6 +67,7 @@ platform-helper <command> [--version]
|
|
|
65
67
|
- [`database` ↪](#platform-helper-database)
|
|
66
68
|
- [`environment` ↪](#platform-helper-environment)
|
|
67
69
|
- [`generate` ↪](#platform-helper-generate)
|
|
70
|
+
- [`internal` ↪](#platform-helper-internal)
|
|
68
71
|
- [`notify` ↪](#platform-helper-notify)
|
|
69
72
|
- [`pipeline` ↪](#platform-helper-pipeline)
|
|
70
73
|
- [`secrets` ↪](#platform-helper-secrets)
|
|
@@ -539,6 +542,44 @@ platform-helper generate
|
|
|
539
542
|
|
|
540
543
|
## Options
|
|
541
544
|
|
|
545
|
+
- `--help <boolean>` _Defaults to False._
|
|
546
|
+
- Show this message and exit.
|
|
547
|
+
|
|
548
|
+
# platform-helper internal
|
|
549
|
+
|
|
550
|
+
[↩ Parent](#platform-helper)
|
|
551
|
+
|
|
552
|
+
Internal commands for use within pipelines or by Platform Team.
|
|
553
|
+
|
|
554
|
+
## Usage
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
platform-helper internal migrate-service-manifests
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
## Options
|
|
561
|
+
|
|
562
|
+
- `--help <boolean>` _Defaults to False._
|
|
563
|
+
- Show this message and exit.
|
|
564
|
+
|
|
565
|
+
## Commands
|
|
566
|
+
|
|
567
|
+
- [`migrate-service-manifests` ↪](#platform-helper-internal-migrate-service-manifests)
|
|
568
|
+
|
|
569
|
+
# platform-helper internal migrate-service-manifests
|
|
570
|
+
|
|
571
|
+
[↩ Parent](#platform-helper-internal)
|
|
572
|
+
|
|
573
|
+
Migrate copilot manifests to service manifests.
|
|
574
|
+
|
|
575
|
+
## Usage
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
platform-helper internal migrate-service-manifests
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
## Options
|
|
582
|
+
|
|
542
583
|
- `--help <boolean>` _Defaults to False._
|
|
543
584
|
- Show this message and exit.
|
|
544
585
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
from dbt_platform_helper.domain.service import ServiceManager
|
|
4
|
+
from dbt_platform_helper.platform_exception import PlatformException
|
|
5
|
+
from dbt_platform_helper.providers.io import ClickIOProvider
|
|
6
|
+
from dbt_platform_helper.utils.click import ClickDocOptGroup
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@click.group(cls=ClickDocOptGroup)
|
|
10
|
+
def internal():
|
|
11
|
+
"""Internal commands for use within pipelines or by Platform Team."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@internal.command()
|
|
15
|
+
def migrate_service_manifests():
|
|
16
|
+
"""Migrate copilot manifests to service manifests."""
|
|
17
|
+
click_io = ClickIOProvider()
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
service_manager = ServiceManager()
|
|
21
|
+
service_manager.migrate_copilot_manifests()
|
|
22
|
+
except PlatformException as error:
|
|
23
|
+
click_io.abort_with_error(str(error))
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/service.py
RENAMED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from collections import OrderedDict
|
|
3
|
+
from copy import deepcopy
|
|
1
4
|
from datetime import datetime
|
|
2
5
|
from importlib.metadata import version
|
|
3
6
|
from pathlib import Path
|
|
4
7
|
|
|
5
8
|
from dbt_platform_helper.constants import IMAGE_TAG_ENV_VAR
|
|
9
|
+
from dbt_platform_helper.constants import PLATFORM_HELPER_PACKAGE_NAME
|
|
6
10
|
from dbt_platform_helper.constants import PLATFORM_HELPER_VERSION_OVERRIDE_KEY
|
|
7
11
|
from dbt_platform_helper.constants import SERVICE_CONFIG_FILE
|
|
8
12
|
from dbt_platform_helper.constants import SERVICE_DIRECTORY
|
|
@@ -21,15 +25,18 @@ from dbt_platform_helper.providers.config_validator import ConfigValidator
|
|
|
21
25
|
from dbt_platform_helper.providers.environment_variable import (
|
|
22
26
|
EnvironmentVariableProvider,
|
|
23
27
|
)
|
|
28
|
+
from dbt_platform_helper.providers.files import FileProvider
|
|
24
29
|
from dbt_platform_helper.providers.io import ClickIOProvider
|
|
25
30
|
from dbt_platform_helper.providers.terraform_manifest import TerraformManifestProvider
|
|
31
|
+
from dbt_platform_helper.providers.version import InstalledVersionProvider
|
|
26
32
|
from dbt_platform_helper.providers.yaml_file import YamlFileProvider
|
|
27
33
|
from dbt_platform_helper.utils.application import load_application
|
|
28
34
|
from dbt_platform_helper.utils.deep_merge import deep_merge
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
SERVICE_TYPES = ["Load Balanced Web Service", "Backend Service"]
|
|
31
37
|
|
|
32
38
|
|
|
39
|
+
# TODO add schema version to service config
|
|
33
40
|
class ServiceManager:
|
|
34
41
|
def __init__(
|
|
35
42
|
self,
|
|
@@ -41,6 +48,7 @@ class ServiceManager:
|
|
|
41
48
|
manifest_provider: TerraformManifestProvider = None,
|
|
42
49
|
platform_helper_version_override: str = None,
|
|
43
50
|
load_application=load_application,
|
|
51
|
+
installed_version_provider: InstalledVersionProvider = InstalledVersionProvider(),
|
|
44
52
|
):
|
|
45
53
|
|
|
46
54
|
self.file_provider = file_provider
|
|
@@ -56,6 +64,7 @@ class ServiceManager:
|
|
|
56
64
|
or self.environment_variable_provider.get(PLATFORM_HELPER_VERSION_OVERRIDE_KEY)
|
|
57
65
|
)
|
|
58
66
|
self.load_application = load_application
|
|
67
|
+
self.installed_version_provider = installed_version_provider
|
|
59
68
|
|
|
60
69
|
def generate(self, environments: list[str], services: list[str], image_tag_flag: str = None):
|
|
61
70
|
|
|
@@ -151,3 +160,54 @@ class ServiceManager:
|
|
|
151
160
|
config,
|
|
152
161
|
module_source_override,
|
|
153
162
|
)
|
|
163
|
+
|
|
164
|
+
def migrate_copilot_manifests(self) -> None:
|
|
165
|
+
service_directory = Path("services/")
|
|
166
|
+
service_directory.mkdir(parents=True, exist_ok=True)
|
|
167
|
+
|
|
168
|
+
for dirname, _, filenames in os.walk("copilot"):
|
|
169
|
+
if "manifest.yml" in filenames and "environments" not in dirname:
|
|
170
|
+
copilot_manifest = self.file_provider.load(f"{dirname}/manifest.yml")
|
|
171
|
+
service_manifest = OrderedDict(deepcopy(copilot_manifest))
|
|
172
|
+
|
|
173
|
+
if service_manifest["type"] not in SERVICE_TYPES:
|
|
174
|
+
continue
|
|
175
|
+
|
|
176
|
+
if "environments" in service_manifest:
|
|
177
|
+
for env in service_manifest["environments"]:
|
|
178
|
+
env_config = service_manifest["environments"][env]
|
|
179
|
+
if "http" in env_config:
|
|
180
|
+
if "alb" in env_config["http"]:
|
|
181
|
+
del env_config["http"]["alb"]
|
|
182
|
+
|
|
183
|
+
service_manifest = self.file_provider.find_and_replace(
|
|
184
|
+
service_manifest,
|
|
185
|
+
"${COPILOT_APPLICATION_NAME}",
|
|
186
|
+
"${PLATFORM_APPLICATION_NAME}",
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
service_manifest = self.file_provider.find_and_replace(
|
|
190
|
+
service_manifest,
|
|
191
|
+
"${COPILOT_ENVIRONMENT_NAME}",
|
|
192
|
+
"${PLATFORM_ENVIRONMENT_NAME}",
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
service_manifest = self.file_provider.remove_empty_keys(service_manifest)
|
|
196
|
+
|
|
197
|
+
service_path = service_directory / service_manifest["name"]
|
|
198
|
+
|
|
199
|
+
self.io.info(
|
|
200
|
+
FileProvider.mkfile(
|
|
201
|
+
service_path,
|
|
202
|
+
"service-config.yml",
|
|
203
|
+
"",
|
|
204
|
+
overwrite=True,
|
|
205
|
+
)
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
current_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
209
|
+
message = f"# Generated by platform-helper {self.installed_version_provider.get_semantic_version(PLATFORM_HELPER_PACKAGE_NAME)} / {current_date}.\n\n"
|
|
210
|
+
|
|
211
|
+
self.file_provider.write(
|
|
212
|
+
f"{service_path}/service-config.yml", dict(service_manifest), message
|
|
213
|
+
)
|
|
@@ -114,7 +114,6 @@ class PlatformConfigSchema:
|
|
|
114
114
|
Optional("default_waf"): str,
|
|
115
115
|
Optional("domain_prefix"): str,
|
|
116
116
|
Optional("enable_logging"): bool,
|
|
117
|
-
Optional("env_root"): str,
|
|
118
117
|
Optional("forwarded_values_forward"): str,
|
|
119
118
|
Optional("forwarded_values_headers"): [str],
|
|
120
119
|
Optional("forwarded_values_query_string"): bool,
|
|
@@ -293,6 +292,7 @@ class PlatformConfigSchema:
|
|
|
293
292
|
@staticmethod
|
|
294
293
|
def __postgres_schema() -> dict:
|
|
295
294
|
_valid_postgres_plans = Or(*plan_manager.get_plan_names("postgres"))
|
|
295
|
+
_valid_postgres_version = Or(int, float)
|
|
296
296
|
|
|
297
297
|
# TODO: DBTP-1943: Move to Postgres provider?
|
|
298
298
|
_valid_postgres_storage_types = Or("gp2", "gp3", "io1", "io2")
|
|
@@ -305,11 +305,13 @@ class PlatformConfigSchema:
|
|
|
305
305
|
|
|
306
306
|
return {
|
|
307
307
|
"type": "postgres",
|
|
308
|
-
"version":
|
|
308
|
+
Optional("version"): _valid_postgres_version,
|
|
309
309
|
Optional("deletion_policy"): PlatformConfigSchema.__valid_postgres_deletion_policy(),
|
|
310
310
|
Optional("environments"): {
|
|
311
311
|
PlatformConfigSchema.__valid_environment_name(): {
|
|
312
|
+
Optional("apply_immediately"): bool,
|
|
312
313
|
Optional("plan"): _valid_postgres_plans,
|
|
314
|
+
Optional("version"): (Or(int, float)),
|
|
313
315
|
Optional("volume_size"): PlatformConfigSchema.is_integer_between(20, 10000),
|
|
314
316
|
Optional("iops"): PlatformConfigSchema.is_integer_between(1000, 9950),
|
|
315
317
|
Optional("snapshot_id"): str,
|
|
@@ -12,6 +12,7 @@ from dbt_platform_helper.commands.copilot import copilot as copilot_commands
|
|
|
12
12
|
from dbt_platform_helper.commands.database import database as database_commands
|
|
13
13
|
from dbt_platform_helper.commands.environment import environment as environment_commands
|
|
14
14
|
from dbt_platform_helper.commands.generate import generate as generate_commands
|
|
15
|
+
from dbt_platform_helper.commands.internal import internal as internal_commands
|
|
15
16
|
from dbt_platform_helper.commands.notify import notify as notify_commands
|
|
16
17
|
from dbt_platform_helper.commands.pipeline import pipeline as pipeline_commands
|
|
17
18
|
from dbt_platform_helper.commands.secrets import secrets as secrets_commands
|
|
@@ -36,6 +37,7 @@ platform_helper.add_command(config_commands)
|
|
|
36
37
|
platform_helper.add_command(copilot_commands)
|
|
37
38
|
platform_helper.add_command(environment_commands)
|
|
38
39
|
platform_helper.add_command(generate_commands)
|
|
40
|
+
platform_helper.add_command(internal_commands)
|
|
39
41
|
platform_helper.add_command(pipeline_commands)
|
|
40
42
|
platform_helper.add_command(secrets_commands)
|
|
41
43
|
platform_helper.add_command(service_commands)
|
|
@@ -3,7 +3,7 @@ line-length = 100
|
|
|
3
3
|
|
|
4
4
|
[tool.poetry]
|
|
5
5
|
name = "dbt-platform-helper"
|
|
6
|
-
version = "15.
|
|
6
|
+
version = "15.10.0"
|
|
7
7
|
description = "Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot."
|
|
8
8
|
authors = ["Department for Business and Trade Platform Team <sre-team@digital.trade.gov.uk>"]
|
|
9
9
|
license = "MIT"
|
|
@@ -27,7 +27,7 @@ botocore = "^1.34.85"
|
|
|
27
27
|
click = "^8.1.3"
|
|
28
28
|
python = ">3.9.1,<4.0"
|
|
29
29
|
schema = "0.7.5"
|
|
30
|
-
jinja2-simple-tags = "
|
|
30
|
+
jinja2-simple-tags = ">=0.5,<0.7"
|
|
31
31
|
requests = "^2.31.0"
|
|
32
32
|
prettytable = "^3.9.0"
|
|
33
33
|
slack-sdk = "^3.27.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/codebase.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/conduit.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/config.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/copilot.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/database.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/generate.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/notify.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/pipeline.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/secrets.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/service.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/commands/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/__init__.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/codebase.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/conduit.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/config.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/copilot.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/notify.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/pipelines.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/plans.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/domain/versioning.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/entities/service.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/jinja2_tags.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/platform_exception.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/cache.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/config.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/copilot.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/ecr.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/ecs.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/files.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/io.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/kms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/secrets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/version.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/providers/vpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/__init__.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/application.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/arn_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/click.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/deep_merge.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/messages.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/template.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/dbt_platform_helper/utils/validation.py
RENAMED
|
File without changes
|
{dbt_platform_helper-15.9.0 → dbt_platform_helper-15.10.0}/terraform/elasticache-redis/plans.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|