@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 +52 -135
- package/dist/cli.js +3 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,169 +1,86 @@
|
|
|
1
|
-
# Ze Great Dashboard AWS
|
|
1
|
+
# Ze Great Dashboard on AWS
|
|
2
2
|
|
|
3
|
-
`@continuous-excellence/ze-great-dashboard-aws` packages a
|
|
4
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
##
|
|
14
|
+
## What you need
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
42
|
+
npm install --save-exact @continuous-excellence/ze-great-dashboard-aws
|
|
29
43
|
```
|
|
30
44
|
|
|
31
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
-
export AWS_REGION=us-east-1
|
|
101
|
-
export STACK_NAME=my-ze-great-dashboard
|
|
66
|
+
## Package boundaries
|
|
102
67
|
|
|
103
|
-
|
|
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
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
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
|
-
##
|
|
80
|
+
## References
|
|
158
81
|
|
|
159
82
|
- [Board configuration](https://github.com/robertfmurdock/ze-great-dashboard/blob/main/docs/board-configuration.md)
|
|
160
|
-
- [
|
|
161
|
-
- [
|
|
162
|
-
- [GitHub Actions deployment
|
|
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",
|