@caelo-cms/provisioning 0.11.21 → 0.12.2
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/adapter.d.ts +6 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/agent-db.js +137 -9
- package/dist/bootstrap-token.d.ts +4 -3
- package/dist/bootstrap-token.d.ts.map +1 -1
- package/dist/bootstrap-token.js.map +1 -1
- package/dist/cli-routing.d.ts.map +1 -1
- package/dist/cli-routing.js +5 -0
- package/dist/cli-routing.js.map +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/converge-job-gcp.d.ts +1 -16
- package/dist/converge-job-gcp.d.ts.map +1 -1
- package/dist/converge-job-gcp.js +10 -97
- package/dist/converge-job-gcp.js.map +1 -1
- package/dist/converge-job.d.ts +7 -46
- package/dist/converge-job.d.ts.map +1 -1
- package/dist/converge-job.js +22 -57
- package/dist/converge-job.js.map +1 -1
- package/dist/gateway-armor.d.ts.map +1 -1
- package/dist/gateway-armor.js +11 -3
- package/dist/gateway-armor.js.map +1 -1
- package/dist/gcp-names.d.ts +2 -0
- package/dist/gcp-names.d.ts.map +1 -1
- package/dist/gcp-names.js +4 -0
- package/dist/gcp-names.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/infra-contract.d.ts +1 -1
- package/dist/infra-contract.d.ts.map +1 -1
- package/dist/infra-contract.js +14 -1
- package/dist/infra-contract.js.map +1 -1
- package/dist/job-handover-gcp.d.ts +40 -0
- package/dist/job-handover-gcp.d.ts.map +1 -0
- package/dist/job-handover-gcp.js +108 -0
- package/dist/job-handover-gcp.js.map +1 -0
- package/dist/job-handover.d.ts +141 -0
- package/dist/job-handover.d.ts.map +1 -0
- package/dist/job-handover.js +141 -0
- package/dist/job-handover.js.map +1 -0
- package/dist/owner-setup-token.d.ts +52 -0
- package/dist/owner-setup-token.d.ts.map +1 -0
- package/dist/owner-setup-token.js +111 -0
- package/dist/owner-setup-token.js.map +1 -0
- package/dist/project-status.d.ts +33 -0
- package/dist/project-status.d.ts.map +1 -1
- package/dist/project-status.js +116 -26
- package/dist/project-status.js.map +1 -1
- package/dist/stack-converge.d.ts.map +1 -1
- package/dist/stack-converge.js +9 -5
- package/dist/stack-converge.js.map +1 -1
- package/dist/static-security-headers.d.ts +6 -0
- package/dist/static-security-headers.d.ts.map +1 -1
- package/dist/static-security-headers.js +11 -1
- package/dist/static-security-headers.js.map +1 -1
- package/dist/upgrader-assess.d.ts +30 -3
- package/dist/upgrader-assess.d.ts.map +1 -1
- package/dist/upgrader-assess.js +77 -24
- package/dist/upgrader-assess.js.map +1 -1
- package/dist/upgrader-gcp.d.ts +4 -2
- package/dist/upgrader-gcp.d.ts.map +1 -1
- package/dist/upgrader-gcp.js +16 -3
- package/dist/upgrader-gcp.js.map +1 -1
- package/dist/upgrader-iam-preflight.d.ts +14 -3
- package/dist/upgrader-iam-preflight.d.ts.map +1 -1
- package/dist/upgrader-iam-preflight.js +40 -6
- package/dist/upgrader-iam-preflight.js.map +1 -1
- package/dist/upgrader-job.d.ts +51 -9
- package/dist/upgrader-job.d.ts.map +1 -1
- package/dist/upgrader-job.js +92 -37
- package/dist/upgrader-job.js.map +1 -1
- package/dist/upgrader-setup.d.ts +1 -1
- package/dist/upgrader-setup.d.ts.map +1 -1
- package/dist/upgrader-setup.js +5 -2
- package/dist/upgrader-setup.js.map +1 -1
- package/dist/wizards/gcp-install-job.d.ts.map +1 -1
- package/dist/wizards/gcp-install-job.js +11 -1
- package/dist/wizards/gcp-install-job.js.map +1 -1
- package/dist/wizards/gcp-pulumi.d.ts +0 -13
- package/dist/wizards/gcp-pulumi.d.ts.map +1 -1
- package/dist/wizards/gcp-pulumi.js +0 -12
- package/dist/wizards/gcp-pulumi.js.map +1 -1
- package/dist/wizards/gcp.d.ts.map +1 -1
- package/dist/wizards/gcp.js +21 -50
- package/dist/wizards/gcp.js.map +1 -1
- package/package.json +2 -2
- package/src/adapter.ts +6 -1
- package/src/bootstrap-token.ts +4 -3
- package/src/caddy-redirects.docker.test.ts +5 -0
- package/src/cli-routing.test.ts +1 -1
- package/src/cli-routing.ts +6 -0
- package/src/cli.ts +4 -0
- package/src/converge-job-gcp.test.ts +1 -40
- package/src/converge-job-gcp.ts +10 -100
- package/src/converge-job.test.ts +9 -3
- package/src/converge-job.ts +33 -115
- package/src/gateway-armor.ts +14 -3
- package/src/gateway-edge.test.ts +16 -1
- package/src/gcp-names.ts +4 -0
- package/src/gcp-url-map.test.ts +2 -0
- package/src/index.ts +3 -0
- package/src/infra-contract.test.ts +4 -3
- package/src/infra-contract.ts +14 -1
- package/src/job-handover-gcp.test.ts +129 -0
- package/src/job-handover-gcp.ts +135 -0
- package/src/job-handover.ts +259 -0
- package/src/owner-setup-token.test.ts +195 -0
- package/src/owner-setup-token.ts +138 -0
- package/src/project-status.test.ts +112 -3
- package/src/project-status.ts +141 -17
- package/src/stack-converge.ts +12 -5
- package/src/static-security-headers.test.ts +16 -0
- package/src/static-security-headers.ts +12 -1
- package/src/upgrader-assess.test.ts +75 -1
- package/src/upgrader-assess.ts +121 -57
- package/src/upgrader-gcp.ts +19 -5
- package/src/upgrader-iam-preflight.test.ts +28 -1
- package/src/upgrader-iam-preflight.ts +46 -6
- package/src/upgrader-job.test.ts +365 -31
- package/src/upgrader-job.ts +177 -53
- package/src/upgrader-setup.test.ts +17 -0
- package/src/upgrader-setup.ts +5 -2
- package/src/url-map-redirects-access.test.ts +1 -1
- package/src/wizards/gcp-install-job.ts +10 -1
- package/src/wizards/gcp-pulumi.ts +0 -18
- package/src/wizards/gcp.ts +24 -61
- package/stacks/aws/README.md +4 -2
- package/stacks/aws/index.ts +4 -8
- package/stacks/azure/README.md +4 -2
- package/stacks/azure/index.ts +4 -8
- package/stacks/gcp/README.md +6 -3
- package/stacks/gcp/index.ts +7 -8
- package/stacks/gcp-firebase/index.ts +4 -6
package/stacks/azure/README.md
CHANGED
|
@@ -45,11 +45,13 @@ CAELO_ADMIN_URL=https://example.com \
|
|
|
45
45
|
bunx cms-provision pulumi-output-sync --environment production
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
The
|
|
48
|
+
The stack outputs the setup address without a token: nothing brings a token to
|
|
49
|
+
the admin on this provider yet, and `/setup` refuses until something does
|
|
50
|
+
(issue #1483).
|
|
49
51
|
|
|
50
52
|
```bash
|
|
51
53
|
pulumi stack output bootstrapUrlOut
|
|
52
|
-
# → https://example.com/setup
|
|
54
|
+
# → https://example.com/setup
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
`dnsRecordsRequiredOut` lists the two records the primary domain needs: a CNAME to the Front Door endpoint (`frontDoorEndpointHostNameOut`) and the `_dnsauth.<domain>` TXT record that validates the domain for Front Door's managed certificate. An apex domain needs a registrar that supports CNAME flattening / ALIAS records, or Azure DNS.
|
package/stacks/azure/index.ts
CHANGED
|
@@ -46,7 +46,6 @@ import {
|
|
|
46
46
|
type AzureDatabaseSecret,
|
|
47
47
|
type AzureSecretReader,
|
|
48
48
|
} from "../../dist/azure-secrets.js";
|
|
49
|
-
import { generateBootstrapToken } from "../../dist/bootstrap-token.js";
|
|
50
49
|
import {
|
|
51
50
|
DEFAULT_MAX_CONNECTIONS,
|
|
52
51
|
DEFAULT_STAGING_GATEWAY_MAX_INSTANCES,
|
|
@@ -681,10 +680,7 @@ const _runnerApp = containerApp({
|
|
|
681
680
|
databaseEnv: adminDatabaseEnv,
|
|
682
681
|
secrets: adminSecretReader,
|
|
683
682
|
});
|
|
684
|
-
// === 7.
|
|
685
|
-
const tokenInfo = generateBootstrapToken();
|
|
686
|
-
|
|
687
|
-
// === 8. CloudAdapterOutputs ===
|
|
683
|
+
// === 7. CloudAdapterOutputs ===
|
|
688
684
|
const dnsRecordsRequired = pulumi
|
|
689
685
|
.all([frontDoorEndpoint.hostName, siteDomain.validationProperties])
|
|
690
686
|
.apply(([endpointHostName, validation]) =>
|
|
@@ -703,8 +699,9 @@ const out: CloudAdapterOutputs = {
|
|
|
703
699
|
mediaStorageUrl:
|
|
704
700
|
pulumi.interpolate`https://${storage.name}.blob.core.windows.net/media` as unknown as string,
|
|
705
701
|
mediaCdnBaseUrl: pulumi.interpolate`https://${domain}/media` as unknown as string,
|
|
706
|
-
|
|
707
|
-
|
|
702
|
+
// No token: nothing would bring it to the admin, and /setup refuses until
|
|
703
|
+
// something does (#1483, #1476).
|
|
704
|
+
bootstrapUrl: `https://${domain}/setup`,
|
|
708
705
|
dnsRecordsRequired: dnsRecordsRequired as unknown as DnsRecord[],
|
|
709
706
|
edgeLogSinkUrl: pulumi.interpolate`loganalytics://${logWorkspace.name}` as unknown as string,
|
|
710
707
|
provider: "azure",
|
|
@@ -725,4 +722,3 @@ export const pgServerFqdnOut = pgServer.fullyQualifiedDomainName;
|
|
|
725
722
|
export const storageAccountNameOut = storage.name;
|
|
726
723
|
export const adminContainerAppFqdnOut = adminApp.configuration.apply((c) => c?.ingress?.fqdn);
|
|
727
724
|
export const frontDoorEndpointHostNameOut = frontDoorEndpoint.hostName;
|
|
728
|
-
export const bootstrapTokenExpiresAtOut = tokenInfo.expiresAt;
|
package/stacks/gcp/README.md
CHANGED
|
@@ -62,11 +62,14 @@ CAELO_INTERNAL_SECRET=$(gcloud secrets versions access latest \
|
|
|
62
62
|
bunx cms-provision pulumi-output-sync --environment production
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
The
|
|
65
|
+
The stack outputs the setup address without a token. The installer mints the
|
|
66
|
+
Owner setup token at the end of the install, stores it in Secret Manager for the
|
|
67
|
+
admin, and prints the link (`src/owner-setup-token.ts`). A plain `pulumi up` has
|
|
68
|
+
no token: `/setup` refuses until there is one. Get the link, or a new one after
|
|
69
|
+
its 24 hours:
|
|
66
70
|
|
|
67
71
|
```bash
|
|
68
|
-
|
|
69
|
-
# → https://example.com/setup?token=<64-hex>
|
|
72
|
+
bunx @caelo-cms/provisioning setup-link --project <gcp-project-id>
|
|
70
73
|
```
|
|
71
74
|
|
|
72
75
|
Open after the domain's and the admin's DNS A records point at the load balancer IP and the managed certificate is active.
|
package/stacks/gcp/index.ts
CHANGED
|
@@ -25,7 +25,6 @@ import * as gcp from "@pulumi/gcp";
|
|
|
25
25
|
import * as pulumi from "@pulumi/pulumi";
|
|
26
26
|
import * as random from "@pulumi/random";
|
|
27
27
|
import type { CloudAdapterOutputs, DnsRecord } from "../../dist/adapter.js";
|
|
28
|
-
import { generateBootstrapToken } from "../../dist/bootstrap-token.js";
|
|
29
28
|
import { gatewayArmorRuleArgs } from "../../dist/gateway-edge.js";
|
|
30
29
|
import {
|
|
31
30
|
gatewayServiceAccountId,
|
|
@@ -1052,7 +1051,8 @@ const staticBackendBucket = new gcp.compute.BackendBucket(
|
|
|
1052
1051
|
cdnPolicy: { ...STATIC_CDN_POLICY },
|
|
1053
1052
|
customResponseHeaders: [...GCP_STATIC_RESPONSE_HEADERS],
|
|
1054
1053
|
},
|
|
1055
|
-
|
|
1054
|
+
// #1454 — Publish live adds the live build's page headers to the list.
|
|
1055
|
+
{ ...opts, ignoreChanges: ["customResponseHeaders"] },
|
|
1056
1056
|
);
|
|
1057
1057
|
|
|
1058
1058
|
// Tier 3 backend — gateway Cloud Run via serverless NEG
|
|
@@ -1398,11 +1398,9 @@ new gcp.bigquery.DatasetIamMember(
|
|
|
1398
1398
|
);
|
|
1399
1399
|
|
|
1400
1400
|
// =========================================================================
|
|
1401
|
-
//
|
|
1401
|
+
// Outputs
|
|
1402
1402
|
// =========================================================================
|
|
1403
1403
|
|
|
1404
|
-
const tokenInfo = generateBootstrapToken();
|
|
1405
|
-
|
|
1406
1404
|
const dnsRecordsRequired: pulumi.Output<DnsRecord[]> = lbIp.address.apply((ip): DnsRecord[] => [
|
|
1407
1405
|
{
|
|
1408
1406
|
hostname: domain,
|
|
@@ -1425,8 +1423,10 @@ const out: CloudAdapterOutputs = {
|
|
|
1425
1423
|
publicStagingDatabaseUrl: dbUrls.publicStaging as unknown as string,
|
|
1426
1424
|
mediaStorageUrl: pulumi.interpolate`gs://${mediaBucket.name}` as unknown as string,
|
|
1427
1425
|
mediaCdnBaseUrl: pulumi.interpolate`https://${domain}/media` as unknown as string,
|
|
1428
|
-
|
|
1429
|
-
|
|
1426
|
+
// No token: the installer mints it at the end of the install and adds it to
|
|
1427
|
+
// the link (src/owner-setup-token.ts, #1476). Minted here, it would change
|
|
1428
|
+
// on every `pulumi up` and sit in the stack's state.
|
|
1429
|
+
bootstrapUrl: `https://${adminDomain}/setup`,
|
|
1430
1430
|
dnsRecordsRequired: dnsRecordsRequired as unknown as DnsRecord[],
|
|
1431
1431
|
edgeLogSinkUrl:
|
|
1432
1432
|
pulumi.interpolate`bigquery://${project}/${edgeLogDataset.datasetId}` as unknown as string,
|
|
@@ -1450,7 +1450,6 @@ export const adminCloudRunUrlOut = adminSvc.uri;
|
|
|
1450
1450
|
export const gatewayCloudRunUrlOut = gatewaySvc?.uri;
|
|
1451
1451
|
export const lbIpOut = lbIp.address;
|
|
1452
1452
|
export const adminDomainOut = adminDomain;
|
|
1453
|
-
export const bootstrapTokenExpiresAtOut = tokenInfo.expiresAt;
|
|
1454
1453
|
export const staticPublisherSaEmailOut = staticPublisherSa.email;
|
|
1455
1454
|
export const staticBucketNameOut = staticBucket.name;
|
|
1456
1455
|
// P15 self-hosted CDN-copy adapter ABI — kept for cross-stack compat.
|
|
@@ -42,7 +42,6 @@ import * as gcp from "@pulumi/gcp";
|
|
|
42
42
|
import * as pulumi from "@pulumi/pulumi";
|
|
43
43
|
import * as random from "@pulumi/random";
|
|
44
44
|
import type { CloudAdapterOutputs, DnsRecord } from "../../dist/adapter.js";
|
|
45
|
-
import { generateBootstrapToken } from "../../dist/bootstrap-token.js";
|
|
46
45
|
import {
|
|
47
46
|
firebaseStagingSiteId,
|
|
48
47
|
gatewayServiceAccountId,
|
|
@@ -1312,8 +1311,6 @@ const dnsRecords: pulumi.Output<DnsRecord[]> = pulumi
|
|
|
1312
1311
|
return out;
|
|
1313
1312
|
});
|
|
1314
1313
|
|
|
1315
|
-
const tokenInfo = generateBootstrapToken();
|
|
1316
|
-
|
|
1317
1314
|
// Cast pulumi.Output<string> values to plain `string` to satisfy the
|
|
1318
1315
|
// shared CloudAdapterOutputs shape. Pulumi serialises Outputs to
|
|
1319
1316
|
// plain strings in stack outputs at runtime; the cast bridges the
|
|
@@ -1327,8 +1324,10 @@ const out: CloudAdapterOutputs = {
|
|
|
1327
1324
|
// Firebase Hosting serves media via its own CDN; we proxy through
|
|
1328
1325
|
// the Firebase site's apex domain for canonical URLs.
|
|
1329
1326
|
mediaCdnBaseUrl: `https://${domain}/media` as unknown as string,
|
|
1330
|
-
|
|
1331
|
-
|
|
1327
|
+
// No token: the installer mints it at the end of the install and adds it to
|
|
1328
|
+
// the link (src/owner-setup-token.ts, #1476). Minted here, it would change
|
|
1329
|
+
// on every `pulumi up` and sit in the stack's state.
|
|
1330
|
+
bootstrapUrl: `https://${adminDomain}/setup`,
|
|
1332
1331
|
dnsRecordsRequired: dnsRecords as unknown as DnsRecord[],
|
|
1333
1332
|
// #1339 — no BigQuery export here (that dataset was never created):
|
|
1334
1333
|
// the services' request logs stay in Cloud Logging, the cross-cutting
|
|
@@ -1353,4 +1352,3 @@ export const gatewayCloudRunUrlOut = gatewaySvc?.uri;
|
|
|
1353
1352
|
export const mcpAuthProxyCloudRunUrlOut = mcpAuthProxySvc.uri;
|
|
1354
1353
|
export const adminDomainOut = adminDomain;
|
|
1355
1354
|
export const firebaseSiteIdOut = firebaseSiteId;
|
|
1356
|
-
export const bootstrapTokenExpiresAtOut = tokenInfo.expiresAt;
|