From 68e69bdea8b7a0e4fc740f1b930943f634998b82 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 20 May 2026 13:12:54 -0400 Subject: [PATCH 1/2] [CHORE] remove AWS CDK. * the CDK deployment has been replaced by a reusable Terraform/OpenTofu module in https://github.com/OvertureMaps/terraform-aws-overture-tiles Fixes #78 Signed-off-by: Brandon Liu --- .github/dependabot.yml | 19 - justfile | 24 - overture-tiles-cdk/.gitignore | 7 - overture-tiles-cdk/.npmignore | 6 - overture-tiles-cdk/README.md | 14 - overture-tiles-cdk/bin/overture-tiles-cdk.ts | 30 - overture-tiles-cdk/cdk.json | 72 -- .../lib/overture-tiles-cdk-stack.ts | 159 ---- overture-tiles-cdk/package-lock.json | 707 ------------------ overture-tiles-cdk/package.json | 23 - overture-tiles-cdk/tsconfig.json | 31 - 11 files changed, 1092 deletions(-) delete mode 100644 overture-tiles-cdk/.gitignore delete mode 100644 overture-tiles-cdk/.npmignore delete mode 100644 overture-tiles-cdk/README.md delete mode 100644 overture-tiles-cdk/bin/overture-tiles-cdk.ts delete mode 100644 overture-tiles-cdk/cdk.json delete mode 100644 overture-tiles-cdk/lib/overture-tiles-cdk-stack.ts delete mode 100644 overture-tiles-cdk/package-lock.json delete mode 100644 overture-tiles-cdk/package.json delete mode 100644 overture-tiles-cdk/tsconfig.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2987853..878ebb6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,25 +2,6 @@ version: 2 updates: - # Maintain NPM dependencies for overture-tiles-cdk - - package-ecosystem: "npm" - directory: "/overture-tiles-cdk" - schedule: - interval: "weekly" - open-pull-requests-limit: 5 - labels: - - "bot" - commit-message: - prefix: "[CHORE](deps)" - include: "scope" - groups: - aws: - patterns: - - "aws*" - - "@aws-cdk*" - cooldown: - default-days: 7 - # Maintain GitHub Actions dependencies - package-ecosystem: "github-actions" directory: "/" diff --git a/justfile b/justfile index 4858400..1132946 100644 --- a/justfile +++ b/justfile @@ -1,35 +1,11 @@ #!/usr/bin/env just --justfile -cdk_dir := 'overture-tiles-cdk' latest_release := `curl -s https://stac.overturemaps.org | jq -r '.latest'` overture_bucket := 's3://overturemaps-us-west-2' @_default: {{ just_executable() }} --list -# Bootstrap the CDK environment -[group('setup')] -bootstrap-cdk: - cd {{ cdk_dir }} && npm install && npm run build - -# Deploy the CDK stack -[group('setup')] -deploy-cdk bucket_name account region create_bucket='false': - cd {{ cdk_dir }} && npm run cdk deploy -- \ - -c bucketName={{ bucket_name }} \ - -c account={{ account }} \ - -c region={{ region }} \ - -c createBucket={{ create_bucket }} - -# Destroy the CDK stack -[group('setup')] -destroy-cdk account region bucket_name='' delete_bucket='false': - cd {{ cdk_dir }} && npm run cdk destroy -- \ - -c bucketName={{ bucket_name }} \ - -c account={{ account }} \ - -c region={{ region }} \ - -c deleteBucket={{ delete_bucket }} - # Run a local test of the Docker container with the city of San Francisco. It skips uploading the generated PMTiles [arg('theme', pattern='base|transportation|buildings|addresses|places|divisions')] [group('test')] diff --git a/overture-tiles-cdk/.gitignore b/overture-tiles-cdk/.gitignore deleted file mode 100644 index a633556..0000000 --- a/overture-tiles-cdk/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.js -*.d.ts -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/overture-tiles-cdk/.npmignore b/overture-tiles-cdk/.npmignore deleted file mode 100644 index c1d6d45..0000000 --- a/overture-tiles-cdk/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/overture-tiles-cdk/README.md b/overture-tiles-cdk/README.md deleted file mode 100644 index eff8fbf..0000000 --- a/overture-tiles-cdk/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Overture Tiles CDK - -Overture Tiles CDK creates the AWS infrastructure for generating tiles from Overture data. - -## Useful commands - -* `npm run build` compile typescript to js -* `npm run watch` watch for changes and compile -* `npx cdk deploy` deploy this stack to your default AWS account/region -* `npx cdk diff` compare deployed stack with current state -* `npx cdk synth` emits the synthesized CloudFormation template - -## Deploying -- See the [overture-tiles docs](https://docs.overturemaps.org/examples/overture-tiles) diff --git a/overture-tiles-cdk/bin/overture-tiles-cdk.ts b/overture-tiles-cdk/bin/overture-tiles-cdk.ts deleted file mode 100644 index ea504cd..0000000 --- a/overture-tiles-cdk/bin/overture-tiles-cdk.ts +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node -import 'source-map-support/register'; -import * as cdk from 'aws-cdk-lib'; -import { - OvertureTilesCdkStack, - OvertureTilesCdkStackProps -} from '../lib/overture-tiles-cdk-stack'; - -const props: OvertureTilesCdkStackProps = { - bucketName: 'overturemaps-tiles-us-west-2-beta' -} - -const app = new cdk.App(); -new OvertureTilesCdkStack(app, 'OvertureTilesCdkStack', { - ...props, - - /* If you don't specify 'env', this stack will be environment-agnostic. - * Account/Region-dependent features and context lookups will not work, - * but a single synthesized template can be deployed anywhere. */ - - /* Uncomment the next line to specialize this stack for the AWS Account - * and Region that are implied by the current CLI configuration. */ - // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, - - /* Uncomment the next line if you know exactly what Account and Region you - * want to deploy the stack to. */ - // env: { account: '123456789012', region: 'us-east-1' }, - - /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ -}); \ No newline at end of file diff --git a/overture-tiles-cdk/cdk.json b/overture-tiles-cdk/cdk.json deleted file mode 100644 index 60a0973..0000000 --- a/overture-tiles-cdk/cdk.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "app": "npx ts-node --prefer-ts-exts bin/overture-tiles-cdk.ts", - "watch": { - "include": [ - "**" - ], - "exclude": [ - "README.md", - "cdk*.json", - "**/*.d.ts", - "**/*.js", - "tsconfig.json", - "package*.json", - "yarn.lock", - "node_modules", - "test" - ] - }, - "context": { - "@aws-cdk/aws-lambda:recognizeLayerVersion": true, - "@aws-cdk/core:checkSecretUsage": true, - "@aws-cdk/core:target-partitions": [ - "aws", - "aws-cn" - ], - "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, - "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, - "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, - "@aws-cdk/aws-iam:minimizePolicies": true, - "@aws-cdk/core:validateSnapshotRemovalPolicy": true, - "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, - "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, - "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, - "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, - "@aws-cdk/core:enablePartitionLiterals": true, - "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, - "@aws-cdk/aws-iam:standardizedServicePrincipals": true, - "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, - "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, - "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, - "@aws-cdk/aws-route53-patters:useCertificate": true, - "@aws-cdk/customresources:installLatestAwsSdkDefault": false, - "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, - "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, - "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, - "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, - "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, - "@aws-cdk/aws-redshift:columnId": true, - "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, - "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, - "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, - "@aws-cdk/aws-kms:aliasNameRef": true, - "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, - "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, - "@aws-cdk/aws-efs:denyAnonymousAccess": true, - "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, - "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, - "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true, - "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, - "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, - "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, - "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, - "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, - "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, - "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true, - "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true, - "@aws-cdk/aws-eks:nodegroupNameAttribute": true, - "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true, - "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true, - "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false - } -} diff --git a/overture-tiles-cdk/lib/overture-tiles-cdk-stack.ts b/overture-tiles-cdk/lib/overture-tiles-cdk-stack.ts deleted file mode 100644 index f5c8684..0000000 --- a/overture-tiles-cdk/lib/overture-tiles-cdk-stack.ts +++ /dev/null @@ -1,159 +0,0 @@ -import * as cdk from "aws-cdk-lib"; -import { Construct } from "constructs"; -import { aws_s3 as s3, aws_ec2 as ec2 } from "aws-cdk-lib"; -import { - aws_cloudfront as cloudfront, - aws_cloudfront_origins as origins, -} from "aws-cdk-lib"; -import { aws_batch as batch, aws_ecs as ecs } from "aws-cdk-lib"; -import { aws_iam as iam } from "aws-cdk-lib"; - -const ID = "OvertureTiles"; - -export type OvertureTilesCdkStackProps = cdk.StackProps & { - bucketName: string; -}; - -export class OvertureTilesCdkStack extends cdk.Stack { - constructor(scope: Construct, id: string, props: OvertureTilesCdkStackProps) { - super(scope, id, props); - - const userData = ec2.UserData.forLinux(); - userData.addCommands( - "#!/bin/bash", - "volume_name=`lsblk -x SIZE -o NAME | tail -n 1`", - "mkfs -t ext4 /dev/$volume_name", - "mkdir /docker", - "mount /dev/$volume_name /docker", - 'echo \'{"data-root": "/docker"}\' > /etc/docker/daemon.json', - "systemctl restart docker", - ); - - const multipartUserData = new ec2.MultipartUserData(); - multipartUserData.addPart(ec2.MultipartBody.fromUserData(userData)); - - const launchTemplate = new ec2.LaunchTemplate(this, `${ID}LaunchTemplate`, { - machineImage: ecs.EcsOptimizedImage.amazonLinux2023( - ecs.AmiHardwareType.ARM, - ), - userData: multipartUserData, - }); - - const bucket = new s3.Bucket(this, `${ID}Bucket`, { - bucketName: props.bucketName, - blockPublicAccess: new s3.BlockPublicAccess({ - blockPublicAcls: false, - blockPublicPolicy: false, - ignorePublicAcls: false, - restrictPublicBuckets: false, - }), - publicReadAccess: true, - cors: [ - { - allowedMethods: [s3.HttpMethods.GET], - allowedOrigins: ["*"], - }, - ], - }); - bucket.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN); - - const distribution = new cloudfront.Distribution( - this, - `${ID}Distribution`, - { - defaultBehavior: { - origin: origins.S3BucketOrigin.withOriginAccessControl(bucket), - }, - }, - ); - distribution.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN); - - // Use GitHub Container Registry for the overture-tiles image - const imageUri = 'ghcr.io/overturemaps/overture-tiles:latest'; - - const role = new iam.Role(this, `${ID}JobRole`, { - assumedBy: new iam.ServicePrincipal("ecs-tasks.amazonaws.com"), - }); - - role.addToPolicy( - new iam.PolicyStatement({ - actions: ["s3:PutObject", "s3:PutObjectAcl"], - resources: [`${bucket.bucketArn}/*`], - }), - ); - - const executionRole = new iam.Role(this, `${ID}ExecutionRole`, { - assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'), - }); - - executionRole.addToPolicy( - new iam.PolicyStatement({ - actions: [ - "logs:CreateLogStream", - "logs:PutLogEvents", - "sts:AssumeRole" - ], - resources: ["*"], - }), - ); - - executionRole.addManagedPolicy( - iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly') - ); - - for (let theme of [ - "addresses", - "admins", - "places", - "divisions", - "buildings", - "transportation", - "base", - ]) { - new batch.EcsJobDefinition(this, `${ID}Job_${theme}`, { - container: new batch.EcsEc2ContainerDefinition( - this, - `${ID}Container_${theme}`, - { - image: ecs.ContainerImage.fromRegistry(imageUri), - memory: cdk.Size.gibibytes(60), - cpu: 30, - jobRole: role, - executionRole: executionRole - }, - ), - }); - } - - const vpc = new ec2.Vpc(this, `${ID}Vpc`, { - maxAzs: 1, - }); - - new batch.JobQueue(this, `${ID}Queue`, { - computeEnvironments: [ - { - computeEnvironment: new batch.ManagedEc2EcsComputeEnvironment( - this, - `${ID}ComputeEnvironment`, - { - vpc: vpc, - spot: false, - vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, - launchTemplate: launchTemplate, - replaceComputeEnvironment: true, - allocationStrategy: batch.AllocationStrategy.BEST_FIT, - instanceTypes: [ - ec2.InstanceType.of( - ec2.InstanceClass.C7GD, - ec2.InstanceSize.XLARGE8, - ), - ], - useOptimalInstanceClasses: false, - }, - ), - order: 1, - }, - ], - }); - } -} diff --git a/overture-tiles-cdk/package-lock.json b/overture-tiles-cdk/package-lock.json deleted file mode 100644 index 5b43115..0000000 --- a/overture-tiles-cdk/package-lock.json +++ /dev/null @@ -1,707 +0,0 @@ -{ - "name": "overture-tiles-cdk", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "overture-tiles-cdk", - "version": "0.1.0", - "dependencies": { - "aws-cdk-lib": "2.253.1", - "constructs": "^10.6.0", - "source-map-support": "^0.5.21" - }, - "bin": { - "overture-tiles-cdk": "bin/overture-tiles-cdk.js" - }, - "devDependencies": { - "@types/node": "25.7.0", - "aws-cdk": "2.1121.0", - "ts-node": "^10.9.2", - "typescript": "~6.0.3" - } - }, - "node_modules/@aws-cdk/asset-awscli-v1": { - "version": "2.2.273", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.273.tgz", - "integrity": "sha512-X57HYUtHt9BQrlrzUNcMyRsDUCoakYNnY6qh5lNwRCHPtQoTfXmuISkfLk0AjLkcbS5lw1LLTQFiQhTDXfiTvg==", - "license": "Apache-2.0" - }, - "node_modules/@aws-cdk/asset-node-proxy-agent-v6": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.1.tgz", - "integrity": "sha512-We4bmHaowOPHr+IQR4/FyTGjRfjgBj4ICMjtqmJeBDWad3Q/6St12NT07leNtyuukv2qMhtSZJQorD8KpKTwRA==", - "license": "Apache-2.0" - }, - "node_modules/@aws-cdk/cloud-assembly-schema": { - "version": "53.20.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-53.20.0.tgz", - "integrity": "sha512-4kLAUO+I8b4nlk1Z2P4n3Ye8UtqCiXk0kJMLUThBnyHLbdz06rwAb+qlb9WZOie7NtPluemVS243ifcBh/NVsQ==", - "bundleDependencies": [ - "jsonschema", - "semver" - ], - "license": "Apache-2.0", - "dependencies": { - "jsonschema": "~1.4.1", - "semver": "^7.7.4" - }, - "engines": { - "node": ">= 18.0.0" - } - }, - "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema": { - "version": "1.4.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { - "version": "7.7.4", - "inBundle": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "25.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.7.0.tgz", - "integrity": "sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.21.0" - } - }, - "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "node_modules/aws-cdk": { - "version": "2.1121.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1121.0.tgz", - "integrity": "sha512-cG7CHt/SytYTfwrK+BUNQpqmS1dwhjt8z6ExKL6GK4n+8/6ZCwFzxlZWA/jUd2+Y9xPc+Q8cLKfMqGmgxEXbkg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "cdk": "bin/cdk" - }, - "engines": { - "node": ">= 18.0.0" - } - }, - "node_modules/aws-cdk-lib": { - "version": "2.253.1", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.253.1.tgz", - "integrity": "sha512-vy+hA15/ZfSQpivkNdlIn2ZDA2hesp3WJgmtIZJDFwu6xzwv7wH7glbAdu5xCHGcOjepOaTKZSvCPC6sN+0/Vw==", - "bundleDependencies": [ - "@balena/dockerignore", - "@aws-cdk/cloud-assembly-api", - "case", - "fs-extra", - "ignore", - "jsonschema", - "minimatch", - "punycode", - "semver", - "table", - "yaml", - "mime-types" - ], - "license": "Apache-2.0", - "dependencies": { - "@aws-cdk/asset-awscli-v1": "2.2.273", - "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.1", - "@aws-cdk/cloud-assembly-api": "^2.2.2", - "@aws-cdk/cloud-assembly-schema": "^53.18.0", - "@balena/dockerignore": "^1.0.2", - "case": "1.6.3", - "fs-extra": "^11.3.3", - "ignore": "^5.3.2", - "jsonschema": "^1.5.0", - "mime-types": "^2.1.35", - "minimatch": "^10.2.3", - "punycode": "^2.3.1", - "semver": "^7.7.4", - "table": "^6.9.0", - "yaml": "1.10.3" - }, - "engines": { - "node": ">= 20.0.0" - }, - "peerDependencies": { - "constructs": "^10.5.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api": { - "version": "2.2.2", - "bundleDependencies": [ - "jsonschema", - "semver" - ], - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "jsonschema": "~1.4.1", - "semver": "^7.7.4" - }, - "engines": { - "node": ">= 18.0.0" - }, - "peerDependencies": { - "@aws-cdk/cloud-assembly-schema": ">=53.15.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/@balena/dockerignore": { - "version": "1.0.2", - "inBundle": true, - "license": "Apache-2.0" - }, - "node_modules/aws-cdk-lib/node_modules/ajv": { - "version": "8.18.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/aws-cdk-lib/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/ansi-styles": { - "version": "4.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/aws-cdk-lib/node_modules/astral-regex": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/balanced-match": { - "version": "4.0.4", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/aws-cdk-lib/node_modules/brace-expansion": { - "version": "5.0.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/aws-cdk-lib/node_modules/case": { - "version": "1.6.3", - "inBundle": true, - "license": "(MIT OR GPL-3.0-or-later)", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/color-convert": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/color-name": { - "version": "1.1.4", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/emoji-regex": { - "version": "8.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/fast-deep-equal": { - "version": "3.1.3", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/fast-uri": { - "version": "3.1.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "inBundle": true, - "license": "BSD-3-Clause" - }, - "node_modules/aws-cdk-lib/node_modules/fs-extra": { - "version": "11.3.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/aws-cdk-lib/node_modules/graceful-fs": { - "version": "4.2.11", - "inBundle": true, - "license": "ISC" - }, - "node_modules/aws-cdk-lib/node_modules/ignore": { - "version": "5.3.2", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/aws-cdk-lib/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/json-schema-traverse": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/jsonfile": { - "version": "6.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/aws-cdk-lib/node_modules/jsonschema": { - "version": "1.5.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/aws-cdk-lib/node_modules/lodash.truncate": { - "version": "4.4.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/mime-db": { - "version": "1.52.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/aws-cdk-lib/node_modules/mime-types": { - "version": "2.1.35", - "inBundle": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/aws-cdk-lib/node_modules/minimatch": { - "version": "10.2.5", - "inBundle": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/aws-cdk-lib/node_modules/punycode": { - "version": "2.3.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/aws-cdk-lib/node_modules/require-from-string": { - "version": "2.0.2", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/semver": { - "version": "7.7.4", - "inBundle": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/aws-cdk-lib/node_modules/slice-ansi": { - "version": "4.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/aws-cdk-lib/node_modules/string-width": { - "version": "4.2.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/table": { - "version": "6.9.0", - "inBundle": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/universalify": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/yaml": { - "version": "1.10.3", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "license": "MIT" - }, - "node_modules/constructs": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/constructs/-/constructs-10.6.0.tgz", - "integrity": "sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ==", - "license": "Apache-2.0" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/diff": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", - "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.21.0.tgz", - "integrity": "sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - } - } -} diff --git a/overture-tiles-cdk/package.json b/overture-tiles-cdk/package.json deleted file mode 100644 index 322e24b..0000000 --- a/overture-tiles-cdk/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "overture-tiles-cdk", - "version": "0.1.0", - "bin": { - "overture-tiles-cdk": "bin/overture-tiles-cdk.js" - }, - "scripts": { - "build": "tsc", - "watch": "tsc -w", - "cdk": "cdk" - }, - "devDependencies": { - "aws-cdk": "2.1121.0", - "@types/node": "25.7.0", - "ts-node": "^10.9.2", - "typescript": "~6.0.3" - }, - "dependencies": { - "aws-cdk-lib": "2.253.1", - "constructs": "^10.6.0", - "source-map-support": "^0.5.21" - } -} diff --git a/overture-tiles-cdk/tsconfig.json b/overture-tiles-cdk/tsconfig.json deleted file mode 100644 index aaa7dc5..0000000 --- a/overture-tiles-cdk/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": [ - "es2020", - "dom" - ], - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "typeRoots": [ - "./node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "cdk.out" - ] -} From b1959872f2321a45ed86e04bfe581be5423d3088 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 20 May 2026 13:21:54 -0400 Subject: [PATCH 2/2] [CHORE] update README [#78] Signed-off-by: Brandon Liu --- .gitignore | 3 +-- README.md | 17 ++++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 10033d5..7d31856 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ *.pmtiles *.parquet data -*.jar -overture-tiles-cdk/cdk.context.json +*.jar \ No newline at end of file diff --git a/README.md b/README.md index 008f1e1..a459896 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,11 @@ Create tilesets from [Overture Maps](http://overturemaps.org) data. ## Overview -This project provides tools to create vector tilesets in PMTiles format from Overture Maps data using Planetiler. It includes AWS CDK constructs for deploying the necessary infrastructure to generate and host the tilesets. +This project provides tools to create vector tilesets in PMTiles format from Overture Maps data using Planetiler. -> **Note**: Currently focused on AWS infrastructure (S3 & Batch), though the core processing runs in Docker containers +A reusable Terraform/OpenTofu module to create tilesets on AWS is available at [OvertureMaps/terraform-aws-overture-tiles](https://github.com/OvertureMaps/terraform-aws-overture-tiles). -## Project Structure -The repository is organized into the following main components: -- **Infrastructure**: AWS CDK constructs to deploy the processing and hosting infrastructure. -- **Profiles**: Planetiler profiles to define how to process Overture Maps data into vector tiles for all six themes. +For detailed deployment instructions, see the [Overture Tiles documentation](https://docs.overturemaps.org/examples/overture-tiles/). ## Architecture The tile generation pipeline follows a three-stage process: @@ -37,16 +34,10 @@ The Docker container accepts the following environment variables: | `SKIP_UPLOAD` | No | Set to `true` to skip S3 upload (useful for local testing) | ## Profiles -All six themes (`base`, `transportation`, `buildings`, `addresses`, `places`, and `divisions`) are processed using Planetiler profiles. See [profiles/](profiles/) for details. +All six themes (`addresses`, `base`, `buildings`, `divisions`, `places`, `transportation`) are processed using Planetiler profiles. See [profiles/](profiles/) for details. Currently, profiles are fixed within the Docker image. There are plans to support custom profiles in the future. -## Deploying to AWS -The CDK stack creates AWS Batch infrastructure for processing tiles at scale. Configure your S3 bucket and AWS account in [overture-tiles-cdk/bin/overture-tiles-cdk.ts](overture-tiles-cdk/bin/overture-tiles-cdk.ts), then deploy with standard CDK commands or use the [justfile](justfile) recipes. - -For detailed deployment instructions, see the [Overture Tiles documentation](https://docs.overturemaps.org/examples/overture-tiles/). - - ## Development ### Prerequisites