@abgov/nx-adsp 13.0.0-beta.2 → 13.0.0-beta.3
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/package.json
CHANGED
|
@@ -145,26 +145,10 @@ nx run <%= projectName %>:teardown-dev # remove from dev environment
|
|
|
145
145
|
|
|
146
146
|
## Sandbox deployment (local build)
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
`nx run <%= projectName %>:sandbox` builds the image **locally with podman**, pushes it to GHCR, and deploys it to your namespace — no git push or CI wait. Run the generator once first to add the targets:
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
nx g @abgov/nx-oc:sandbox <%= projectName %> --sandboxProject <your-namespace>
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
- `podman` installed and running (`podman machine start` on macOS).
|
|
157
|
-
- `oc` logged in, targeting your (per-user) sandbox namespace.
|
|
158
|
-
- `gh auth login` as an account with **`write:packages`** on the registry org. That account must be the **active** `gh` account when you run the target — the sandbox reads `gh auth token` for both the image push and the pull secret (no PAT is stored). Check with `gh auth status`; switch with `gh auth switch -u <account>`.
|
|
159
|
-
|
|
160
|
-
The registry (`ghcr.io/<org>`) is derived from the git remote on first run and saved in `nx.json`. The image is `<registry>/<sandboxProject>-<app>:sandbox` (namespace-prefixed to avoid collisions). If a push or import fails, it's almost always the active `gh` account lacking `write:packages` or access to the org — re-run after `gh auth switch`.
|
|
161
|
-
|
|
162
|
-
### Verify & troubleshoot a sandbox deploy
|
|
163
|
-
|
|
164
|
-
The target ends with `oc rollout status`. To confirm and diagnose:
|
|
165
|
-
|
|
166
|
-
- **Health:** `oc get pods -n <namespace> -l name=<%= projectName %>` and `curl https://$(oc get route <%= projectName %> -n <namespace> -o jsonpath='{.spec.host}')/health`.
|
|
167
|
-
- **Push or import failed:** almost always the active `gh` account lacks `write:packages` or access to the org — check `gh auth status`, then `gh auth switch -u <account>` and re-run.
|
|
168
|
-
- **Pod CrashLoopBackOff / not ready:** `oc logs -n <namespace> <pod> -c <%= projectName %>`. For a service with a database, also check the migration init container: `oc logs -n <namespace> <pod> -c <%= projectName %>-migrate`.
|
|
169
|
-
- **`podman` errors:** ensure the machine is running — `podman machine start` (macOS).
|
|
170
|
-
- **Namespace missing:** create it with `oc new-project <namespace>`.
|
|
154
|
+
That also writes **`.openshift/<%= projectName %>/SANDBOX.md`** — the full deploy runbook: prerequisites (`podman`, `oc` login, a `gh` account with **`write:packages`** as the *active* `gh` account), preflight failures and their fixes, `--skipBuild`/`--skipPush` to resume a partial deploy, a copy-paste manual-completion sequence, and troubleshooting (CPU quota, `CrashLoopBackOff`, registry auth, redirect URIs). Read it whenever a deploy misbehaves.
|
|
@@ -335,26 +335,10 @@ nx run <%= projectName %>:teardown-dev # remove from dev environment
|
|
|
335
335
|
|
|
336
336
|
## Sandbox deployment (local build)
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
`nx run <%= projectName %>:sandbox` builds the image **locally with podman**, pushes it to GHCR, and deploys it to your namespace — no git push or CI wait. Run the generator once first to add the targets:
|
|
339
339
|
|
|
340
340
|
```bash
|
|
341
341
|
nx g @abgov/nx-oc:sandbox <%= projectName %> --sandboxProject <your-namespace>
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
- `podman` installed and running (`podman machine start` on macOS).
|
|
347
|
-
- `oc` logged in, targeting your (per-user) sandbox namespace.
|
|
348
|
-
- `gh auth login` as an account with **`write:packages`** on the registry org. That account must be the **active** `gh` account when you run the target — the sandbox reads `gh auth token` for both the image push and the pull secret (no PAT is stored). Check with `gh auth status`; switch with `gh auth switch -u <account>`.
|
|
349
|
-
|
|
350
|
-
The registry (`ghcr.io/<org>`) is derived from the git remote on first run and saved in `nx.json`. The image is `<registry>/<sandboxProject>-<app>:sandbox` (namespace-prefixed to avoid collisions). If a push or import fails, it's almost always the active `gh` account lacking `write:packages` or access to the org — re-run after `gh auth switch`.
|
|
351
|
-
|
|
352
|
-
### Verify & troubleshoot a sandbox deploy
|
|
353
|
-
|
|
354
|
-
The target ends with `oc rollout status`. To confirm and diagnose:
|
|
355
|
-
|
|
356
|
-
- **Health:** `oc get pods -n <namespace> -l name=<%= projectName %>` and `curl https://$(oc get route <%= projectName %> -n <namespace> -o jsonpath='{.spec.host}')/health`.
|
|
357
|
-
- **Push or import failed:** almost always the active `gh` account lacks `write:packages` or access to the org — check `gh auth status`, then `gh auth switch -u <account>` and re-run.
|
|
358
|
-
- **Pod CrashLoopBackOff / not ready:** `oc logs -n <namespace> <pod> -c <%= projectName %>`. For a service with a database, also check the migration init container: `oc logs -n <namespace> <pod> -c <%= projectName %>-migrate`.
|
|
359
|
-
- **`podman` errors:** ensure the machine is running — `podman machine start` (macOS).
|
|
360
|
-
- **Namespace missing:** create it with `oc new-project <namespace>`.
|
|
344
|
+
That also writes **`.openshift/<%= projectName %>/SANDBOX.md`** — the full deploy runbook: prerequisites (`podman`, `oc` login, a `gh` account with **`write:packages`** as the *active* `gh` account), preflight failures and their fixes, `--skipBuild`/`--skipPush` to resume a partial deploy, a copy-paste manual-completion sequence, and troubleshooting (CPU quota, `CrashLoopBackOff`, registry auth, redirect URIs). Read it whenever a deploy misbehaves.
|
|
@@ -134,26 +134,10 @@ nx run <%= projectName %>:teardown-dev # remove from dev environment
|
|
|
134
134
|
|
|
135
135
|
## Sandbox deployment (local build)
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
`nx run <%= projectName %>:sandbox` builds the image **locally with podman**, pushes it to GHCR, and deploys it to your namespace — no git push or CI wait. Run the generator once first to add the targets:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
nx g @abgov/nx-oc:sandbox <%= projectName %> --sandboxProject <your-namespace>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
- `podman` installed and running (`podman machine start` on macOS).
|
|
146
|
-
- `oc` logged in, targeting your (per-user) sandbox namespace.
|
|
147
|
-
- `gh auth login` as an account with **`write:packages`** on the registry org. That account must be the **active** `gh` account when you run the target — the sandbox reads `gh auth token` for both the image push and the pull secret (no PAT is stored). Check with `gh auth status`; switch with `gh auth switch -u <account>`.
|
|
148
|
-
|
|
149
|
-
The registry (`ghcr.io/<org>`) is derived from the git remote on first run and saved in `nx.json`. The image is `<registry>/<sandboxProject>-<app>:sandbox` (namespace-prefixed to avoid collisions). If a push or import fails, it's almost always the active `gh` account lacking `write:packages` or access to the org — re-run after `gh auth switch`.
|
|
150
|
-
|
|
151
|
-
### Verify & troubleshoot a sandbox deploy
|
|
152
|
-
|
|
153
|
-
The target ends with `oc rollout status`. To confirm and diagnose:
|
|
154
|
-
|
|
155
|
-
- **Health:** `oc get pods -n <namespace> -l name=<%= projectName %>` and `curl https://$(oc get route <%= projectName %> -n <namespace> -o jsonpath='{.spec.host}')/health`.
|
|
156
|
-
- **Push or import failed:** almost always the active `gh` account lacks `write:packages` or access to the org — check `gh auth status`, then `gh auth switch -u <account>` and re-run.
|
|
157
|
-
- **Pod CrashLoopBackOff / not ready:** `oc logs -n <namespace> <pod> -c <%= projectName %>`. For a service with a database, also check the migration init container: `oc logs -n <namespace> <pod> -c <%= projectName %>-migrate`.
|
|
158
|
-
- **`podman` errors:** ensure the machine is running — `podman machine start` (macOS).
|
|
159
|
-
- **Namespace missing:** create it with `oc new-project <namespace>`.
|
|
143
|
+
That also writes **`.openshift/<%= projectName %>/SANDBOX.md`** — the full deploy runbook: prerequisites (`podman`, `oc` login, a `gh` account with **`write:packages`** as the *active* `gh` account), preflight failures and their fixes, `--skipBuild`/`--skipPush` to resume a partial deploy, a copy-paste manual-completion sequence, and troubleshooting (CPU quota, `CrashLoopBackOff`, registry auth, redirect URIs). Read it whenever a deploy misbehaves.
|
|
@@ -151,26 +151,10 @@ nx run <%= projectName %>:teardown-dev # remove from dev environment
|
|
|
151
151
|
|
|
152
152
|
## Sandbox deployment (local build)
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
`nx run <%= projectName %>:sandbox` builds the image **locally with podman**, pushes it to GHCR, and deploys it to your namespace — no git push or CI wait. Run the generator once first to add the targets:
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
157
|
nx g @abgov/nx-oc:sandbox <%= projectName %> --sandboxProject <your-namespace>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- `podman` installed and running (`podman machine start` on macOS).
|
|
163
|
-
- `oc` logged in, targeting your (per-user) sandbox namespace.
|
|
164
|
-
- `gh auth login` as an account with **`write:packages`** on the registry org. That account must be the **active** `gh` account when you run the target — the sandbox reads `gh auth token` for both the image push and the pull secret (no PAT is stored). Check with `gh auth status`; switch with `gh auth switch -u <account>`.
|
|
165
|
-
|
|
166
|
-
The registry (`ghcr.io/<org>`) is derived from the git remote on first run and saved in `nx.json`. The image is `<registry>/<sandboxProject>-<app>:sandbox` (namespace-prefixed to avoid collisions). If a push or import fails, it's almost always the active `gh` account lacking `write:packages` or access to the org — re-run after `gh auth switch`.
|
|
167
|
-
|
|
168
|
-
### Verify & troubleshoot a sandbox deploy
|
|
169
|
-
|
|
170
|
-
The target ends with `oc rollout status`. To confirm and diagnose:
|
|
171
|
-
|
|
172
|
-
- **Health:** `oc get pods -n <namespace> -l name=<%= projectName %>` and `curl https://$(oc get route <%= projectName %> -n <namespace> -o jsonpath='{.spec.host}')/health`.
|
|
173
|
-
- **Push or import failed:** almost always the active `gh` account lacks `write:packages` or access to the org — check `gh auth status`, then `gh auth switch -u <account>` and re-run.
|
|
174
|
-
- **Pod CrashLoopBackOff / not ready:** `oc logs -n <namespace> <pod> -c <%= projectName %>`. For a service with a database, also check the migration init container: `oc logs -n <namespace> <pod> -c <%= projectName %>-migrate`.
|
|
175
|
-
- **`podman` errors:** ensure the machine is running — `podman machine start` (macOS).
|
|
176
|
-
- **Namespace missing:** create it with `oc new-project <namespace>`.
|
|
160
|
+
That also writes **`.openshift/<%= projectName %>/SANDBOX.md`** — the full deploy runbook: prerequisites (`podman`, `oc` login, a `gh` account with **`write:packages`** as the *active* `gh` account), preflight failures and their fixes, `--skipBuild`/`--skipPush` to resume a partial deploy, a copy-paste manual-completion sequence, and troubleshooting (CPU quota, `CrashLoopBackOff`, registry auth, redirect URIs). Read it whenever a deploy misbehaves.
|