@continuous-excellence/ze-great-dashboard-aws 0.6.0 → 0.6.1

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/README.md CHANGED
@@ -1,169 +1,86 @@
1
- # Ze Great Dashboard AWS deployment
1
+ # Ze Great Dashboard on AWS
2
2
 
3
- `@continuous-excellence/ze-great-dashboard-aws` packages a configured Ze Great Dashboard as an AWS
4
- Lambda deployment. It includes the compatible immutable client, Lambda runtime, CLI, and
5
- CloudFormation template.
3
+ `@continuous-excellence/ze-great-dashboard-aws` packages a board as a private AWS Lambda. It
4
+ includes the Lambda runtime, matching browser client, deployment CLI, and CloudFormation templates.
6
5
 
7
- It does not create a public endpoint, choose an authentication policy, create a gateway, provide a
8
- secret value, or own consumer AWS infrastructure. You provide the protected gateway and complete the
9
- administrator-owned bootstrap process first.
6
+ This deployment path is intended for teams that already operate AWS and have a protected gateway
7
+ such as API Gateway or an ALB. It deliberately does not create a public endpoint, choose an
8
+ authentication policy, or manage secret values.
10
9
 
11
- For a deployment workflow that verifies a consumer-owned gateway stack, configure
12
- `--consumer-gateway-stack gateway-stack-name` during `bootstrap init`. The GitHub OIDC v2 role then
13
- gets only `cloudformation:DescribeStacks` for that exact stack; the package still does not create,
14
- invoke, or authenticate the gateway.
10
+ If you are evaluating the dashboard, start with the repository's
11
+ [local setup](https://github.com/robertfmurdock/ze-great-dashboard#run-it-locally). You do not need
12
+ AWS to try it.
15
13
 
16
- ## Prerequisites
14
+ ## What you need
17
15
 
18
- You need Node.js 22+, npm, the AWS CLI, `jq`, and one AWS Region for the artifact bucket, Lambda,
19
- and application stack. You also need a consumer-owned artifact bucket and the bootstrap-created
20
- restricted roles. Follow the [AWS bootstrap guide](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-bootstrap.md)
21
- before this deployment procedure.
16
+ - Node.js 22 or newer, npm, the AWS CLI, and `jq`.
17
+ - An AWS administrator for the one-time bootstrap.
18
+ - A pre-existing central GitHub OIDC provider and a protected GitHub Environment if GitHub Actions
19
+ will deploy the dashboard.
20
+ - A consumer-owned gateway that can privately invoke Lambda and enforce your access policy.
22
21
 
23
- ## Deploy a dashboard
22
+ The included deployment works out of the box with public GitHub repositories and HTTP endpoints
23
+ that do not require credentials. Private sources require a consumer-owned runtime integration; the
24
+ stock template does not turn a Secrets Manager reference into `token_env` variables.
24
25
 
25
- Use an exact package version in a deployment project:
26
+ ## Deployment map
27
+
28
+ 1. An administrator creates the artifact bucket and restricted deployment roles using the
29
+ [AWS bootstrap guide](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-bootstrap.md).
30
+ 2. The application owner writes `board.yaml`, packages the Lambda, and deploys its private
31
+ CloudFormation stack using the
32
+ [deployment guide](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md).
33
+ 3. The consumer connects the returned `ServerFunctionArn` to its protected gateway.
34
+ 4. GitHub Actions can repeat the package-and-deploy step after the administrator configures the two
35
+ reviewed role ARNs.
36
+
37
+ ## The normal application workflow
38
+
39
+ Pin an exact package version in the repository that owns the deployment:
26
40
 
27
41
  ```sh
28
- npm install --save-exact @continuous-excellence/ze-great-dashboard-aws@1.2.3
42
+ npm install --save-exact @continuous-excellence/ze-great-dashboard-aws
29
43
  ```
30
44
 
31
- Create `board.yaml`. This small configuration has one GitHub Actions panel and one HTTP value panel;
32
- see the [board configuration guide](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/board-configuration.md)
33
- for the full schema.
34
-
35
- ```yaml
36
- sources:
37
- github:
38
- type: github-actions
39
- repo: your-org/your-repo
40
- branch: main
41
- token_env: GITHUB_TOKEN
42
-
43
- boards:
44
- operations:
45
- refresh: 60s
46
- panels:
47
- - id: build
48
- type: pipeline-status
49
- source: github
50
- pipeline: main.yml
51
- position: { x: 0, y: 0, w: 8, h: 6 }
52
- - id: version
53
- type: http-value
54
- url: https://status.example.com/version.json
55
- json_path: $.version
56
- position: { x: 8, y: 0, w: 4, h: 6 }
57
- ```
45
+ Append `@version` when installing a previously reviewed release rather than the current one.
58
46
 
59
- Generate the application parameters from the non-secret `dashboard-bootstrap.json` created during
60
- bootstrap:
47
+ After bootstrap is complete, the recurring workflow is only:
61
48
 
62
49
  ```sh
63
50
  npm exec -- ze-great-dashboard-aws parameters \
64
51
  --bootstrap-config dashboard-bootstrap.json \
65
52
  --output aws-dashboard-parameters.json
66
- ```
67
-
68
- After the parameter file exists, run the read-only doctor. It checks local tooling, your AWS
69
- identity, parameters, the artifact bucket and Region, and the matching hosted client:
70
53
 
71
- ```sh
72
54
  npm exec -- ze-great-dashboard-aws doctor \
73
55
  --parameters aws-dashboard-parameters.json \
74
56
  --region us-east-1
75
- ```
76
57
 
77
- After assuming the generated GitHub deploy role, run the canonical blocking consistency check before
78
- packaging or deployment:
79
-
80
- ```sh
81
- npm exec -- ze-great-dashboard-aws bootstrap check \
82
- --config dashboard-bootstrap.json --format text
83
- ```
84
-
85
- Add `--resource-drift` only for a slower scheduled or manually dispatched CloudFormation drift
86
- audit. Neither form updates stack resources.
87
-
88
- Package the release. This validates the board and writes `lambda.zip`, `release.json`, and
89
- `template.yml` to the output directory:
90
-
91
- ```sh
92
58
  npm exec -- ze-great-dashboard-aws package \
93
59
  --board-config board.yaml \
94
60
  --output aws-dashboard-release
95
61
  ```
96
62
 
97
- Upload the generated ZIP to the bucket and key specified by the parameter file and release metadata:
63
+ The deployment guide covers the S3 upload, CloudFormation command, gateway handoff, and CI example.
64
+ Changing `board.yaml` or upgrading the pinned package uses this same path.
98
65
 
99
- ```sh
100
- export AWS_REGION=us-east-1
101
- export STACK_NAME=my-ze-great-dashboard
66
+ ## Package boundaries
102
67
 
103
- ARTIFACT_BUCKET="$(jq -er \
104
- '.[] | select(.ParameterKey == "LambdaArtifactBucket") | .ParameterValue' \
105
- aws-dashboard-parameters.json)"
106
- ARTIFACT_KEY="$(jq -er '.artifactKey' aws-dashboard-release/release.json)"
107
-
108
- aws s3 cp aws-dashboard-release/lambda.zip \
109
- "s3://${ARTIFACT_BUCKET}/${ARTIFACT_KEY}" \
110
- --region "$AWS_REGION"
111
- ```
112
-
113
- Deploy the generated CloudFormation template using the restricted execution role captured from the
114
- core bootstrap stack:
115
-
116
- ```sh
117
- aws cloudformation deploy \
118
- --stack-name "$STACK_NAME" \
119
- --template-file aws-dashboard-release/template.yml \
120
- --role-arn "$CLOUDFORMATION_EXECUTION_ROLE_ARN" \
121
- --region "$AWS_REGION" \
122
- --capabilities CAPABILITY_NAMED_IAM \
123
- --parameter-overrides file://aws-dashboard-parameters.json \
124
- --no-fail-on-empty-changeset
125
- ```
126
-
127
- The stack outputs `ServerFunctionArn`. Integrate that ARN with your protected API Gateway, ALB, or
128
- other consumer-owned gateway, then verify the protected `/health` endpoint. The template deliberately
129
- does not grant public Lambda invoke permission.
130
-
131
- ## Operate safely
132
-
133
- To upgrade, install a newer exact package version and repeat package, upload, and deploy. A change to
134
- `board.yaml` follows the same path; it does not require a package change.
135
-
136
- After upgrading, also check the [bootstrap consistency guidance](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-bootstrap.md#check-bootstrap-consistency-on-every-deployment).
137
- Compatible releases may add optional bootstrap capabilities without changing the contract version.
138
- If your workflow verifies a consumer-owned gateway stack, add `githubOidc.consumerGatewayStackName`
139
- to the reviewed manifest and update the GitHub OIDC stack; other consumers do not need to rerun
140
- bootstrap.
141
-
142
- Tokens belong in runtime secret handling, never in board YAML, `aws-dashboard-parameters.json`, or
143
- the generated ZIP. See [runtime secrets](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md#runtime-secrets)
144
- for the supported secret reference and integration boundary.
145
-
146
- ## Commands and boundaries
147
-
148
- | Command | Use |
68
+ | The package owns | You own |
149
69
  | --- | --- |
150
- | `doctor` | Read-only preflight for an existing parameter file. |
151
- | `parameters` | Generate or update application CloudFormation parameters. |
152
- | `package` | Validate board YAML and build a deployable Lambda release. |
153
- | `bootstrap` | Plan and guide administrator bootstrap work; `bootstrap check` is the explicit live diagnostic used by CI. |
154
- | `publish-assets` | Provider-only: publish immutable client assets. Normal consumers use the hosted client. |
155
- | `deploy` | Provider-only: automation helper for a provider-managed asset and Lambda deployment. |
70
+ | Board validation and Lambda packaging | Board content and source access |
71
+ | Compatible immutable browser assets | The protected gateway and authentication |
72
+ | Private application CloudFormation template | AWS account administration |
73
+ | Restricted bootstrap templates | Secret values and runtime credential loading |
74
+ | Read-only preflight and consistency checks | Reviewing and executing AWS changes |
75
+
76
+ Bootstrap commands never execute mutating AWS operations. They produce plans, parameters, and
77
+ commands for an administrator to review and run explicitly. `bootstrap check` is the named
78
+ read-only live diagnostic used before routine deployments.
156
79
 
157
- ## Further reading and support boundary
80
+ ## References
158
81
 
159
82
  - [Board configuration](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/board-configuration.md)
160
- - [AWS bootstrap](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-bootstrap.md)
161
- - [Consumer deployment and CI setup](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md)
162
- - [GitHub Actions deployment workflow YAML example](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md#github-actions)
163
- - [Runtime secret integration](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md#runtime-secrets)
164
- - [Repository source](https://github.com/robertfmurdock/ze-great-dashboard)
83
+ - [Administrator bootstrap](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-bootstrap.md)
84
+ - [Application deployment](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-setup.md)
85
+ - [GitHub Actions deployment](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/aws-github-actions.md)
165
86
  - [Issue tracker](https://github.com/robertfmurdock/ze-great-dashboard/issues)
166
- - [MIT license](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/LICENSE)
167
-
168
- The package owns the Lambda deployment artifact. Gateway design, authentication, secret-value
169
- provisioning, and consumer AWS account administration remain your responsibility.
package/dist/cli.js CHANGED
@@ -1341,6 +1341,9 @@ function changeSetCommands(input) {
1341
1341
  const stack = stackName(input.config, input.kind);
1342
1342
  const common = ["--stack-name", stack, "--region", region(input.config)];
1343
1343
  const parameters = [
1344
+ "npm",
1345
+ "exec",
1346
+ "--",
1344
1347
  "ze-great-dashboard-aws",
1345
1348
  "bootstrap",
1346
1349
  "parameters",
package/dist/index.js CHANGED
@@ -1328,6 +1328,9 @@ function changeSetCommands(input) {
1328
1328
  const stack = stackName(input.config, input.kind);
1329
1329
  const common = ["--stack-name", stack, "--region", region(input.config)];
1330
1330
  const parameters = [
1331
+ "npm",
1332
+ "exec",
1333
+ "--",
1331
1334
  "ze-great-dashboard-aws",
1332
1335
  "bootstrap",
1333
1336
  "parameters",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuous-excellence/ze-great-dashboard-aws",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "AWS Lambda and CloudFormation adapter for Ze Great Dashboard.",
6
6
  "keywords": [