canopycms-cdk 0.0.57 → 0.0.59
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.
- package/dist/constructs/asset-support.d.ts +143 -0
- package/dist/constructs/asset-support.d.ts.map +1 -0
- package/dist/constructs/asset-support.js +208 -0
- package/dist/constructs/asset-support.js.map +1 -0
- package/dist/constructs/cms-distribution.d.ts +2 -0
- package/dist/constructs/cms-distribution.d.ts.map +1 -1
- package/dist/constructs/cms-distribution.js +39 -11
- package/dist/constructs/cms-distribution.js.map +1 -1
- package/dist/constructs/cms-service.d.ts +37 -2
- package/dist/constructs/cms-service.d.ts.map +1 -1
- package/dist/constructs/cms-service.js +122 -11
- package/dist/constructs/cms-service.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/lambda/asset-transform/dist/handler.js +30452 -0
- package/lambda/asset-transform/dist/node_modules/.package-lock.json +129 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/LICENSE.md +82 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/README.md +15 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/color.cjs +1596 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/index.cjs +1 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/index.d.ts +929 -0
- package/lambda/asset-transform/dist/node_modules/@img/colour/package.json +58 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/README.md +46 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/lib/glib-2.0/include/glibconfig.h +218 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/lib/index.js +1 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/lib/libvips-cpp.so.8.18.3 +0 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/package.json +43 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-libvips-linux-arm64/versions.json +30 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-linux-arm64/LICENSE +191 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-linux-arm64/README.md +18 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-linux-arm64/index.cjs +2 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-linux-arm64/lib/sharp-linux-arm64-0.35.3.node +0 -0
- package/lambda/asset-transform/dist/node_modules/@img/sharp-linux-arm64/package.json +47 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/LICENSE +201 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/README.md +163 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/index.d.ts +14 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/lib/elf.js +39 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/lib/process.js +24 -0
- package/lambda/asset-transform/dist/node_modules/detect-libc/package.json +44 -0
- package/lambda/asset-transform/dist/node_modules/semver/LICENSE +15 -0
- package/lambda/asset-transform/dist/node_modules/semver/README.md +680 -0
- package/lambda/asset-transform/dist/node_modules/semver/bin/semver.js +195 -0
- package/lambda/asset-transform/dist/node_modules/semver/classes/comparator.js +143 -0
- package/lambda/asset-transform/dist/node_modules/semver/classes/index.js +7 -0
- package/lambda/asset-transform/dist/node_modules/semver/classes/range.js +577 -0
- package/lambda/asset-transform/dist/node_modules/semver/classes/semver.js +350 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/clean.js +8 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/cmp.js +54 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/coerce.js +62 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/compare-build.js +9 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/compare-loose.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/compare.js +7 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/diff.js +60 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/eq.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/gt.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/gte.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/inc.js +21 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/lt.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/lte.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/major.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/minor.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/neq.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/parse.js +18 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/patch.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/prerelease.js +8 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/rcompare.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/rsort.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/satisfies.js +12 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/sort.js +5 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/truncate.js +48 -0
- package/lambda/asset-transform/dist/node_modules/semver/functions/valid.js +8 -0
- package/lambda/asset-transform/dist/node_modules/semver/index.js +93 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/constants.js +37 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/debug.js +11 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/identifiers.js +29 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/lrucache.js +42 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/parse-options.js +17 -0
- package/lambda/asset-transform/dist/node_modules/semver/internal/re.js +223 -0
- package/lambda/asset-transform/dist/node_modules/semver/package.json +78 -0
- package/lambda/asset-transform/dist/node_modules/semver/preload.js +4 -0
- package/lambda/asset-transform/dist/node_modules/semver/range.bnf +17 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/gtr.js +6 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/intersects.js +9 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/ltr.js +6 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/min-version.js +63 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/outside.js +82 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/simplify.js +49 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/subset.js +249 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/to-comparators.js +10 -0
- package/lambda/asset-transform/dist/node_modules/semver/ranges/valid.js +13 -0
- package/lambda/asset-transform/dist/node_modules/sharp/LICENSE +191 -0
- package/lambda/asset-transform/dist/node_modules/sharp/README.md +112 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/channel.cjs +177 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/channel.mjs +177 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/colour.cjs +199 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/colour.mjs +199 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/composite.cjs +213 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/composite.mjs +213 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/constructor.cjs +511 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/constructor.mjs +511 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/index.cjs +25 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/index.d.cts +1999 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/index.d.mts +2046 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/index.mjs +25 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/input.cjs +814 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/input.mjs +814 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/is.cjs +143 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/is.mjs +143 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/libvips.cjs +212 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/libvips.mjs +212 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/operation.cjs +998 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/operation.mjs +998 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/output.cjs +1788 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/output.mjs +1788 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/resize.cjs +617 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/resize.mjs +617 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/sharp.cjs +174 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/sharp.mjs +174 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/utility.cjs +301 -0
- package/lambda/asset-transform/dist/node_modules/sharp/dist/utility.mjs +301 -0
- package/lambda/asset-transform/dist/node_modules/sharp/install/build.js +38 -0
- package/lambda/asset-transform/dist/node_modules/sharp/lib/index.d.ts +1999 -0
- package/lambda/asset-transform/dist/node_modules/sharp/package.json +227 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/binding.gyp +303 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/common.cc +1183 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/common.h +421 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/metadata.cc +404 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/metadata.h +95 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/operations.cc +516 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/operations.h +137 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/pipeline.cc +1948 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/pipeline.h +422 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/sharp.cc +43 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/stats.cc +186 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/stats.h +62 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/utilities.cc +289 -0
- package/lambda/asset-transform/dist/node_modules/sharp/src/utilities.h +22 -0
- package/lambda/asset-transform/dist/package.json +5 -0
- package/package.json +15 -8
- package/worker/canopy-worker.service +16 -2
- package/worker/dist/index.js +50573 -0
- package/LICENSE +0 -21
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
2
3
|
import { Construct } from 'constructs';
|
|
3
|
-
import { Duration, RemovalPolicy, aws_ec2 as ec2, aws_efs as efs, aws_iam as iam, aws_lambda as lambda, aws_autoscaling as autoscaling, aws_s3_assets as s3assets, } from 'aws-cdk-lib';
|
|
4
|
+
import { Duration, RemovalPolicy, Stack, aws_ec2 as ec2, aws_efs as efs, aws_iam as iam, aws_lambda as lambda, aws_autoscaling as autoscaling, aws_s3_assets as s3assets, aws_logs as logs, } from 'aws-cdk-lib';
|
|
5
|
+
// This package (`canopycms-cdk`) is `"type": "module"`, so its compiled
|
|
6
|
+
// output is real ESM - `__dirname` is not a global there. Found while
|
|
7
|
+
// fixing this construct's B1 deploy blocker below: the worker asset path a
|
|
8
|
+
// few lines down threw `__dirname is not defined` under a real ESM runtime
|
|
9
|
+
// (e.g. `tsx`) - masked in this file's own tests only because Vitest's
|
|
10
|
+
// SSR/CJS-interop transform shims `__dirname` automatically. Same fix as
|
|
11
|
+
// ../../lambda/asset-transform/build.mjs and ./asset-support.ts.
|
|
12
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
4
13
|
/**
|
|
5
14
|
* Core CDK construct for CanopyCMS deployment.
|
|
6
15
|
*
|
|
@@ -10,8 +19,11 @@ import { Duration, RemovalPolicy, aws_ec2 as ec2, aws_efs as efs, aws_iam as iam
|
|
|
10
19
|
* - Lambda function (Docker image, EFS mount, private subnet, no internet)
|
|
11
20
|
* - Lambda Function URL (for CloudFront origin)
|
|
12
21
|
* - EC2 Worker (t4g.nano spot in ASG, public subnet, EFS mount, systemd)
|
|
22
|
+
* - Dedicated CloudWatch log group for the worker's stdout/stderr, shipped
|
|
23
|
+
* via the amazon-cloudwatch-agent (journald is not agent-readable)
|
|
13
24
|
* - Security groups (least-privilege)
|
|
14
|
-
* - IAM roles (Lambda: EFS only; EC2: EFS + Secrets Manager
|
|
25
|
+
* - IAM roles (Lambda: EFS only; EC2: EFS + Secrets Manager + CloudWatch
|
|
26
|
+
* Logs write, scoped to its own log group)
|
|
15
27
|
*/
|
|
16
28
|
export class CanopyCmsService extends Construct {
|
|
17
29
|
constructor(scope, id, props) {
|
|
@@ -37,6 +49,16 @@ export class CanopyCmsService extends Construct {
|
|
|
37
49
|
},
|
|
38
50
|
],
|
|
39
51
|
});
|
|
52
|
+
// Gateway VPC endpoint for S3 (free - no hourly/data charge, unlike an
|
|
53
|
+
// interface endpoint). Without this the PRIVATE_ISOLATED subnet has NO
|
|
54
|
+
// route to S3 at all (no NAT, no IGW) - the CMS Lambda's S3AssetStore
|
|
55
|
+
// calls (presigned POST generation, finalize's originals/meta writes)
|
|
56
|
+
// would hang/fail outright (adversarial finding B1). `addGatewayEndpoint`
|
|
57
|
+
// is on `IVpc` itself, so this works whether `this.vpc` was created here
|
|
58
|
+
// or supplied via `props.vpc`.
|
|
59
|
+
this.vpc.addGatewayEndpoint('S3Endpoint', {
|
|
60
|
+
service: ec2.GatewayVpcEndpointAwsService.S3,
|
|
61
|
+
});
|
|
40
62
|
// ========================================================================
|
|
41
63
|
// EFS — persistent filesystem for content, git repos, cache
|
|
42
64
|
// ========================================================================
|
|
@@ -79,18 +101,47 @@ export class CanopyCmsService extends Construct {
|
|
|
79
101
|
// /mnt/efs (DEP-C1). Mirrors the worker's ingress+egress pair below.
|
|
80
102
|
efsSg.addIngressRule(lambdaSg, ec2.Port.tcp(2049), 'Lambda NFS access');
|
|
81
103
|
lambdaSg.addEgressRule(efsSg, ec2.Port.tcp(2049), 'NFS to EFS');
|
|
104
|
+
// Lambda -> S3 (via the gateway endpoint above), HTTPS only. The tight
|
|
105
|
+
// option - `ec2.Peer.prefixList(<S3 managed prefix list id>)` - needs a
|
|
106
|
+
// region-specific literal id (there is no CFN attribute exposing it off
|
|
107
|
+
// `GatewayVpcEndpoint`, and `PrefixList.fromLookup` does a real AWS
|
|
108
|
+
// context-provider lookup at synth time, which would make this
|
|
109
|
+
// construct's synth require live AWS credentials - unacceptable for a
|
|
110
|
+
// construct whose own unit tests synth with a fake account/region).
|
|
111
|
+
// `anyIpv4()` on 443 is safe here specifically because the route table
|
|
112
|
+
// for this PRIVATE_ISOLATED subnet has no route to 0.0.0.0/0 at all (no
|
|
113
|
+
// NAT, no IGW) - only to the VPC CIDR and to configured endpoints'
|
|
114
|
+
// prefix-list routes - so this rule cannot actually reach the general
|
|
115
|
+
// internet; the route table, not the security group, is the real
|
|
116
|
+
// boundary here. Narrow this to `Peer.prefixList(...)` if/when a
|
|
117
|
+
// region-agnostic way to reference the S3 managed prefix list lands in
|
|
118
|
+
// CDK, or if this VPC ever gains a NAT/IGW route.
|
|
119
|
+
lambdaSg.addEgressRule(ec2.Peer.anyIpv4(), ec2.Port.tcp(443), 'HTTPS to S3 (via gateway endpoint)');
|
|
82
120
|
this.lambdaFunction = new lambda.DockerImageFunction(this, 'CmsFunction', {
|
|
83
121
|
code: props.cmsDockerImage,
|
|
84
122
|
memorySize: props.memorySize ?? 2048,
|
|
85
123
|
timeout: props.timeout ?? Duration.seconds(60),
|
|
86
124
|
reservedConcurrentExecutions: props.reservedConcurrency ?? 10,
|
|
125
|
+
architecture: props.architecture,
|
|
87
126
|
vpc: this.vpc,
|
|
88
127
|
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
|
|
89
128
|
securityGroups: [lambdaSg],
|
|
90
129
|
filesystem: lambda.FileSystem.fromEfsAccessPoint(accessPoint, '/mnt/efs'),
|
|
91
130
|
environment: {
|
|
92
|
-
|
|
93
|
-
|
|
131
|
+
// INVARIANT (B1): the Lambda mounts EFS through the WorkspaceAP access
|
|
132
|
+
// point above, which is already rooted at EFS:/workspace - so /mnt/efs
|
|
133
|
+
// here IS EFS:/workspace. The EC2 worker instead mounts the filesystem
|
|
134
|
+
// ROOT at /mnt/efs (see UserData below) and reaches the same directory
|
|
135
|
+
// via /mnt/efs/workspace. Both paths must resolve to EFS:/workspace,
|
|
136
|
+
// or the Lambda and worker silently operate on different directories.
|
|
137
|
+
CANOPYCMS_WORKSPACE_ROOT: '/mnt/efs',
|
|
138
|
+
CANOPY_AUTH_CACHE_PATH: '/mnt/efs/.cache',
|
|
139
|
+
// B7 note: git >= 2.35.2 refuses repos owned by another uid (the
|
|
140
|
+
// access point forces uid 1000; Lambda containers run as a different
|
|
141
|
+
// user). Env-based GIT_CONFIG_* CANNOT fix this - simple-git
|
|
142
|
+
// hard-blocks env config (deploy-proven 2026-07-24). The fix lives in
|
|
143
|
+
// the image: Dockerfile.cms.template runs
|
|
144
|
+
// `git config --system safe.directory '*'`.
|
|
94
145
|
...props.environment,
|
|
95
146
|
},
|
|
96
147
|
});
|
|
@@ -103,6 +154,31 @@ export class CanopyCmsService extends Construct {
|
|
|
103
154
|
this.functionUrl = this.lambdaFunction.addFunctionUrl({
|
|
104
155
|
authType: lambda.FunctionUrlAuthType.AWS_IAM,
|
|
105
156
|
});
|
|
157
|
+
// Asset bucket access (optional) - grants the CMS Lambda's role the same
|
|
158
|
+
// prefix-scoped put/get/delete permissions `AssetSupport.grantUploadAccess()`
|
|
159
|
+
// grants, without this construct depending on `AssetSupport` directly
|
|
160
|
+
// (kept decoupled - a consumer wires both constructs together in their
|
|
161
|
+
// own stack). Duplicated rather than shared because the two constructs
|
|
162
|
+
// must stay independently usable (`AssetSupport` has no CMS-service
|
|
163
|
+
// dependency either).
|
|
164
|
+
if (props.assetBucket) {
|
|
165
|
+
const prefixes = {
|
|
166
|
+
staging: 'asset-staging',
|
|
167
|
+
originals: 'asset-originals',
|
|
168
|
+
meta: 'asset-meta',
|
|
169
|
+
public: 'assets',
|
|
170
|
+
};
|
|
171
|
+
props.assetBucket.grantPut(this.lambdaFunction, `${prefixes.staging}/*`);
|
|
172
|
+
props.assetBucket.grantRead(this.lambdaFunction, `${prefixes.staging}/*`);
|
|
173
|
+
props.assetBucket.grantRead(this.lambdaFunction, `${prefixes.originals}/*`);
|
|
174
|
+
props.assetBucket.grantRead(this.lambdaFunction, `${prefixes.meta}/*`);
|
|
175
|
+
props.assetBucket.grantRead(this.lambdaFunction, `${prefixes.public}/*`);
|
|
176
|
+
props.assetBucket.grantPut(this.lambdaFunction, `${prefixes.originals}/*`);
|
|
177
|
+
props.assetBucket.grantPut(this.lambdaFunction, `${prefixes.meta}/*`);
|
|
178
|
+
props.assetBucket.grantPut(this.lambdaFunction, `${prefixes.public}/*`);
|
|
179
|
+
props.assetBucket.grantDelete(this.lambdaFunction, `${prefixes.staging}/*`);
|
|
180
|
+
props.assetBucket.grantDelete(this.lambdaFunction, `${prefixes.meta}/*`);
|
|
181
|
+
}
|
|
106
182
|
// ========================================================================
|
|
107
183
|
// EC2 Worker — t4g.nano spot, public subnet, internet, EFS mount
|
|
108
184
|
// ========================================================================
|
|
@@ -133,6 +209,20 @@ export class CanopyCmsService extends Construct {
|
|
|
133
209
|
}
|
|
134
210
|
// Worker needs EFS access (handled via security group, but mount needs ec2:DescribeAvailabilityZones)
|
|
135
211
|
workerRole.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonElasticFileSystemClientReadWriteAccess'));
|
|
212
|
+
// Observation channel for a NAT-less deploy (SSM Session Manager / send-command);
|
|
213
|
+
// worker SG already allows 443 egress.
|
|
214
|
+
workerRole.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'));
|
|
215
|
+
// Dedicated CloudWatch log group for the worker's stdout/stderr (shipped by
|
|
216
|
+
// the CloudWatch agent in user-data below - the agent cannot read journald,
|
|
217
|
+
// so the systemd unit is switched to file output further down).
|
|
218
|
+
this.workerLogGroup = new logs.LogGroup(this, 'WorkerLogs', {
|
|
219
|
+
logGroupName: props.workerLogGroupName ?? `/canopycms/${Stack.of(this).stackName}/worker`,
|
|
220
|
+
retention: props.workerLogRetention ?? logs.RetentionDays.THREE_MONTHS,
|
|
221
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
222
|
+
});
|
|
223
|
+
// CreateLogStream + PutLogEvents scoped to this group only (least privilege;
|
|
224
|
+
// the group is pre-created by CFN so the agent never needs CreateLogGroup).
|
|
225
|
+
this.workerLogGroup.grantWrite(workerRole);
|
|
136
226
|
// Worker S3 Asset — upload bundled worker code to CDK assets bucket
|
|
137
227
|
// The worker is bundled with esbuild into a single JS file (npm run build:worker)
|
|
138
228
|
const workerAsset = new s3assets.Asset(this, 'WorkerCode', {
|
|
@@ -145,6 +235,10 @@ export class CanopyCmsService extends Construct {
|
|
|
145
235
|
`CANOPYCMS_GITHUB_OWNER=${props.githubOwner}`,
|
|
146
236
|
`CANOPYCMS_GITHUB_REPO=${props.githubRepo}`,
|
|
147
237
|
`CANOPYCMS_BASE_BRANCH=${props.baseBranch ?? 'main'}`,
|
|
238
|
+
// B8: the AWS SDK JS v3 cannot resolve a region from IMDS on its own -
|
|
239
|
+
// without this the worker's bare `SecretsManagerClient({})` crash-loops
|
|
240
|
+
// with "Region is missing".
|
|
241
|
+
`AWS_REGION=${Stack.of(this).region}`,
|
|
148
242
|
];
|
|
149
243
|
if (props.githubTokenSecretArn) {
|
|
150
244
|
envLines.push(`CANOPYCMS_GITHUB_TOKEN_SECRET_ARN=${props.githubTokenSecretArn}`);
|
|
@@ -155,25 +249,42 @@ export class CanopyCmsService extends Construct {
|
|
|
155
249
|
const envFileContent = envLines.join('\n');
|
|
156
250
|
// UserData script
|
|
157
251
|
const userData = ec2.UserData.forLinux();
|
|
158
|
-
userData.addCommands('#!/bin/bash', 'set -euo pipefail', '', '# Install dependencies', 'yum install -y git', 'curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -', 'yum install -y nodejs', '', '# Mount EFS', 'yum install -y amazon-efs-utils', 'mkdir -p /mnt/efs', `mount -t efs ${this.fileSystem.fileSystemId}:/ /mnt/efs`, '', '# Download worker from CDK S3 Asset', `aws s3 cp s3://${workerAsset.s3BucketName}/${workerAsset.s3ObjectKey} /tmp/canopy-worker.zip`, 'mkdir -p /opt/canopy-worker', 'cd /opt/canopy-worker', 'unzip -o /tmp/canopy-worker.zip', '', '# Write environment file for systemd service', `cat > /opt/canopy-worker/.env << 'ENVEOF'`, envFileContent, 'ENVEOF', '', '# Create systemd service', `cat > /etc/systemd/system/canopy-worker.service << 'SVCEOF'`, '[Unit]', 'Description=CanopyCMS Worker Daemon', 'After=network.target', '', '[Service]', 'Type=simple', 'User=ec2-user', 'WorkingDirectory=/opt/canopy-worker', 'ExecStart=/usr/bin/node index.js', 'Restart=always', 'RestartSec=5', 'TimeoutStartSec=300', 'StandardOutput=
|
|
159
|
-
//
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
252
|
+
userData.addCommands('#!/bin/bash', 'set -euo pipefail', '', '# Install dependencies (unzip is not guaranteed in the AL2023 AMI)', 'yum install -y git unzip', 'curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -', 'yum install -y nodejs', '', '# Mount EFS', 'yum install -y amazon-efs-utils', 'mkdir -p /mnt/efs', `mount -t efs ${this.fileSystem.fileSystemId}:/ /mnt/efs`, '# Persist the mount across instance reboots: user-data runs once per', '# instance, so without an fstab entry a plain reboot leaves /mnt/efs an', '# empty local dir and the worker would clone a divergent remote.git', '# onto the instance disk, invisible to the Lambda.', `echo '${this.fileSystem.fileSystemId}:/ /mnt/efs efs _netdev 0 0' >> /etc/fstab`, '', '# Download worker from CDK S3 Asset', `aws s3 cp s3://${workerAsset.s3BucketName}/${workerAsset.s3ObjectKey} /tmp/canopy-worker.zip`, 'mkdir -p /opt/canopy-worker', 'cd /opt/canopy-worker', 'unzip -o /tmp/canopy-worker.zip', '# The worker bundle is ESM (esbuild --format=esm). Node 20 treats .js as', '# CommonJS without this marker and crash-loops on the import statement', '# (Node >=22.7 auto-detects and masks the bug locally).', `echo '{"type":"module"}' > /opt/canopy-worker/package.json`, '', '# Write environment file for systemd service', `cat > /opt/canopy-worker/.env << 'ENVEOF'`, envFileContent, 'ENVEOF', '', '# Create systemd service', `cat > /etc/systemd/system/canopy-worker.service << 'SVCEOF'`, '[Unit]', 'Description=CanopyCMS Worker Daemon', 'After=network.target', '# Never run against an unmounted /mnt/efs (see the fstab note above).', 'RequiresMountsFor=/mnt/efs', '', '[Service]', 'Type=simple', 'User=ec2-user', 'WorkingDirectory=/opt/canopy-worker', 'ExecStart=/usr/bin/node index.js', 'Restart=always', 'RestartSec=5', 'TimeoutStartSec=300', '# File output, not journal: the CloudWatch agent cannot read journald,', '# so it tails this file instead (see the agent config below).', '# CAUTION: /var/log/canopy-worker must exist BEFORE first start. systemd', '# opens append: targets before it creates LogsDirectory= dirs', '# (systemd#27591), so without the pre-created dir the exec fails with', '# 209/STDOUT and Restart=always crash-loops forever. User-data runs', '# mkdir before systemctl start; LogsDirectory= is kept for ownership.', 'LogsDirectory=canopy-worker', 'StandardOutput=append:/var/log/canopy-worker/worker.log', 'StandardError=append:/var/log/canopy-worker/worker.log', 'EnvironmentFile=/opt/canopy-worker/.env', '', '[Install]', 'WantedBy=multi-user.target', 'SVCEOF', '', '# Set ownership for ec2-user', 'chown -R ec2-user:ec2-user /opt/canopy-worker', '# Non-recursive: EFS access point enforces UID 1000 for Lambda.', '# Only set ownership on mount point and workspace dir to avoid', '# slow recursive chown on large filesystems during ASG replacements.', 'chown ec2-user:ec2-user /mnt/efs', 'mkdir -p /mnt/efs/workspace', 'chown ec2-user:ec2-user /mnt/efs/workspace', '', '# Pre-create the worker log dir (crash-loop guard, MUST precede the', '# first systemctl start): systemd opens StandardOutput=append: files', '# BEFORE it creates LogsDirectory= dirs (systemd#27591), so on a fresh', '# instance the unit would fail exec with 209/STDOUT and crash-loop', '# forever without this. The unit keeps LogsDirectory= for ownership', '# management on subsequent starts.', 'mkdir -p /var/log/canopy-worker', 'chown ec2-user:ec2-user /var/log/canopy-worker', '', '# Start worker', 'systemctl daemon-reload', 'systemctl enable canopy-worker', 'systemctl start canopy-worker', '', '# ---- CloudWatch log shipping ----', '# Placed AFTER worker start: with set -euo pipefail, a yum/agent failure', '# here must not prevent the worker from running (shipping is best-effort).', 'yum install -y amazon-cloudwatch-agent logrotate', '', '# Bound on-disk growth; copytruncate keeps the fd the CW agent tails valid', '# (tiny copy->truncate loss window is acceptable for diagnostic logs).', `cat > /etc/logrotate.d/canopy-worker << 'ROTEOF'`, '/var/log/canopy-worker/worker.log {', ' size 10M', ' rotate 5', ' compress', ' copytruncate', ' missingok', ' notifempty', '}', 'ROTEOF', '# The config above only fires when logrotate actually runs; AL2023', '# presets may leave logrotate.timer disabled, and without it the size', '# cap never triggers and worker.log grows until the nano disk fills.', '# --now is idempotent if the timer is already enabled/running.', 'systemctl enable --now logrotate.timer', '', '# No retention_in_days here: CDK owns retention on the pre-created group.', `cat > /opt/aws/amazon-cloudwatch-agent/etc/canopy-worker-logs.json << 'CWEOF'`, '{', ' "logs": {', ' "logs_collected": {', ' "files": {', ' "collect_list": [', ' {', ' "file_path": "/var/log/canopy-worker/worker.log",', ` "log_group_name": "${this.workerLogGroup.logGroupName}",`, ' "log_stream_name": "{instance_id}"', ' }', ' ]', ' }', ' }', ' }', '}', 'CWEOF', '# fetch-config -s starts AND systemctl-enables the agent (reboot-persistent).', '/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/canopy-worker-logs.json');
|
|
253
|
+
// Launch template (not the deprecated AutoScalingGroup instanceType/
|
|
254
|
+
// machineImage/... shorthand): that shorthand synthesizes an
|
|
255
|
+
// AWS::AutoScaling::LaunchConfiguration, which AWS accounts created after
|
|
256
|
+
// ~mid-2023 cannot create at all — `cdk deploy` would hard-fail for any
|
|
257
|
+
// fresh adopter account. An explicit LaunchTemplate synthesizes
|
|
258
|
+
// AWS::EC2::LaunchTemplate instead, which every account can use.
|
|
259
|
+
const launchTemplate = new ec2.LaunchTemplate(this, 'WorkerLaunchTemplate', {
|
|
163
260
|
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T4G, ec2.InstanceSize.NANO),
|
|
164
261
|
machineImage: ec2.MachineImage.latestAmazonLinux2023({
|
|
165
262
|
cpuType: ec2.AmazonLinuxCpuType.ARM_64,
|
|
166
263
|
}),
|
|
167
264
|
role: workerRole,
|
|
168
265
|
securityGroup: workerSg,
|
|
266
|
+
userData,
|
|
267
|
+
spotOptions: {
|
|
268
|
+
requestType: ec2.SpotRequestType.ONE_TIME, // required for ASG-managed spot
|
|
269
|
+
maxPrice: parseFloat(props.spotMaxPrice ?? '0.0042'), // On-demand rate for t4g.nano
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
// Auto Scaling Group
|
|
273
|
+
this.workerAsg = new autoscaling.AutoScalingGroup(this, 'WorkerAsg', {
|
|
274
|
+
vpc: this.vpc,
|
|
275
|
+
vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
|
|
276
|
+
launchTemplate,
|
|
169
277
|
minCapacity: 1,
|
|
170
278
|
maxCapacity: 1,
|
|
171
|
-
userData,
|
|
172
|
-
spotPrice: props.spotMaxPrice ?? '0.0042', // On-demand rate for t4g.nano
|
|
173
279
|
healthCheck: autoscaling.HealthCheck.ec2({
|
|
174
280
|
grace: Duration.minutes(5),
|
|
175
281
|
}),
|
|
176
282
|
});
|
|
283
|
+
// Boot ordering: the ASG can launch before EFS mount targets are
|
|
284
|
+
// available; user-data runs with `set -euo pipefail`, so an early
|
|
285
|
+
// `mount -t efs` failure kills the whole bootstrap and the
|
|
286
|
+
// EC2-health-checked ASG never notices.
|
|
287
|
+
this.workerAsg.node.addDependency(this.fileSystem.mountTargetsAvailable);
|
|
177
288
|
}
|
|
178
289
|
}
|
|
179
290
|
//# sourceMappingURL=cms-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-service.js","sourceRoot":"","sources":["../../src/constructs/cms-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,OAAO,IAAI,GAAG,EACd,OAAO,IAAI,GAAG,EACd,OAAO,IAAI,GAAG,EACd,UAAU,IAAI,MAAM,EACpB,eAAe,IAAI,WAAW,EAC9B,aAAa,IAAI,QAAQ,GAC1B,MAAM,aAAa,CAAA;AA8CpB;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAgB7C,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA4B;QACpE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAEhB,2EAA2E;QAC3E,gDAAgD;QAChD,2EAA2E;QAE3E,IAAI,CAAC,GAAG;YACN,KAAK,CAAC,GAAG;gBACT,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;oBACvB,MAAM,EAAE,CAAC;oBACT,WAAW,EAAE,CAAC,EAAE,yCAAyC;oBACzD,mBAAmB,EAAE;wBACnB;4BACE,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM;4BACjC,QAAQ,EAAE,EAAE;yBACb;wBACD;4BACE,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W,CAAC,GAAG,CAAC;gBACvC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;aAC3B,CAAC;SACH,CAAC,CAAA;QAEF,iEAAiE;QACjE,kEAAkE;QAClE,2DAA2D;QAC3D,wCAAwC;QACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAA;IAC1E,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,6 @@ export { CanopyCmsService } from './constructs/cms-service';
|
|
|
4
4
|
export type { CanopyCmsServiceProps } from './constructs/cms-service';
|
|
5
5
|
export { CanopyCmsDistribution } from './constructs/cms-distribution';
|
|
6
6
|
export type { CanopyCmsDistributionProps } from './constructs/cms-distribution';
|
|
7
|
+
export { AssetSupport } from './constructs/asset-support';
|
|
8
|
+
export type { AssetSupportProps, AssetCloudFrontBehaviors } from './constructs/asset-support';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,YAAY,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,YAAY,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { CmsWorker } from './worker';
|
|
|
3
3
|
// CDK Constructs
|
|
4
4
|
export { CanopyCmsService } from './constructs/cms-service';
|
|
5
5
|
export { CanopyCmsDistribution } from './constructs/cms-distribution';
|
|
6
|
+
export { AssetSupport } from './constructs/asset-support';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,iBAAiB;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,iBAAiB;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA"}
|