Commit 82f460f
Rework cloud-connect-dev recipe onto the spice cloud enrollment flow (#597)
* Fix cloud-connect-dev recipe: point the Cloud Connect doc links at the published pages
Both Cloud Connect links 404: /docs/deployment/cloud/cloud-connect and
/docs/deployment/cloud/cloud-connect/service are unreleased pages, published
under /docs/next/ until v2.2 ships. The `spice connect` CLI reference
resolves at the released path, but that page documents the superseded command
(no `spice connect service install`, no `spiced --token`), so it points at
/docs/next/ too — the flow this recipe and its validate.sh assert.
Also align the docker-compose.yml comment with the README's PG_PASSWORD, since
the README states that secret names are matched exactly.
* recipe(cloud-connect-dev): sign in with spice login
The CLI's own failure hint for an unauthenticated link reads "Run `spice
login`, then retry `spice cloud link`". A reader who gets stuck reads the
error before they re-read the recipe, so the recipe uses the same spelling.
Also say that `spice cloud status` reads from Spice Cloud and needs that
session: it reports project health from the control plane, so unlike the
purely local checks in validate.sh it does not work signed out.
* recipe(cloud-connect-dev): create the project from the CLI
`spice cloud project create <name>` with no `--kind` creates the unattached
Cloud Connect project that `spice cloud link` attaches to, so the recipe no
longer sends the reader to the portal to make one. Setup is CLI end to end:
`spice login`, `spice cloud project create`, `spice cloud link`, `spice run`.
`--kind` is the discriminator. Naming one asks for a Spice-managed project and
requires `--region`; omitting it asks for a Cloud Connect project, which has no
region to choose. `--region` and the hosted-runtime flags are refused rather
than ignored when no kind is given, so the README says so.
validate.sh asserts that distinction. `execute_project_create` resolves
placement before it connects, so both refusals are argument validation: they
answer with no account and create nothing. The exit code is asserted alongside
the message, so a future ordering change that created the project before
validating it would fail the check rather than pass silently.
`spice cloud link` still requires a terminal and a user login. Creating the
project from the CLI does not change that.
./validate.sh: 37 passed, 0 failed, TEST PASSED (was 33 passed, 0 failed).
* recipe(cloud-connect-dev): set the project secret from the CLI
`spice cloud secrets set PG_PASSWORD "$SPICE_DEMO_PG_PASSWORD"` replaces the
portal walkthrough, and `spice cloud secrets list` confirms it. Linking resolves
the project, so neither needs `--project`.
The value is a required positional argument. There is no stdin, file, or
environment form: `SecretsSetArgs.value` is a bare `String` with no clap
attribute, and the only stdin read in the module is the project-delete prompt.
So the recipe passes the shell variable, which keeps the password out of shell
history — history records the line as typed — but the expanded value is still in
the process argument list while the command runs, and the README says so and
points at the portal for a shared machine.
`spice cloud secrets get` prints the value to stdout, so the confirmation step
uses `list`, which reports names and timestamps only.
validate.sh asserts the four subcommands exist and that the README passes the
password by variable and never calls `secrets get`. Nothing sets, reads, or
deletes a real secret: these commands reach the control plane, and a validator
that mutates a cloud project when a developer happens to be logged in is worse
than the coverage it would buy.
The compose comment tracks the credential to the project rather than to the
portal, which is where it now goes.
./validate.sh: 43 passed, 0 failed, TEST PASSED (was 37 passed, 0 failed).
README URLs re-checked: 4/4 HTTP 200.
* recipe(cloud-connect-dev): run the README checks above the version gate
The checks that only read README.md need no CLI, but sat below the version
gate with the ones that do. CI installs the stable CLI, so the gate skips
everything under it and those checks never ran there — including the guard
that fails if the recipe spells the database password literally instead of
passing \$SPICE_DEMO_PG_PASSWORD. That is the one check that most needs to
run on every pull request.
Group them into a README section above the gate. The CLI sections keep only
what actually needs a CLI: the --help listings, the project-kind refusals, and
the non-interactive link refusal.
No assertion is added or removed. Locally, where the gate passes, the suite is
unchanged at 43 passed, 0 failed. On a CI image whose CLI predates the flow,
the checks that run before the gate go from 16 to 23.
---------
Co-authored-by: Claude <claude@Claudes-Mac-mini.local>
Co-authored-by: Phillip LeBlanc <879445+phillipleblanc@users.noreply.github.com>1 parent 244b443 commit 82f460f
3 files changed
Lines changed: 223 additions & 93 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
32 | 73 | | |
33 | 74 | | |
34 | 75 | | |
35 | 76 | | |
36 | 77 | | |
37 | 78 | | |
38 | 79 | | |
39 | | - | |
| 80 | + | |
40 | 81 | | |
41 | 82 | | |
42 | | - | |
| 83 | + | |
43 | 84 | | |
44 | | - | |
| 85 | + | |
45 | 86 | | |
46 | | - | |
| 87 | + | |
47 | 88 | | |
48 | 89 | | |
49 | 90 | | |
| |||
80 | 121 | | |
81 | 122 | | |
82 | 123 | | |
83 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
84 | 141 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
88 | 146 | | |
89 | | - | |
| 147 | + | |
90 | 148 | | |
91 | 149 | | |
92 | 150 | | |
| |||
129 | 187 | | |
130 | 188 | | |
131 | 189 | | |
132 | | - | |
| 190 | + | |
133 | 191 | | |
134 | 192 | | |
135 | 193 | | |
| 194 | + | |
136 | 195 | | |
137 | 196 | | |
138 | 197 | | |
| |||
172 | 231 | | |
173 | 232 | | |
174 | 233 | | |
175 | | - | |
| 234 | + | |
176 | 235 | | |
177 | 236 | | |
178 | 237 | | |
179 | | - | |
| 238 | + | |
180 | 239 | | |
181 | 240 | | |
182 | 241 | | |
| |||
190 | 249 | | |
191 | 250 | | |
192 | 251 | | |
193 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
194 | 259 | | |
195 | 260 | | |
196 | | - | |
| 261 | + | |
197 | 262 | | |
198 | 263 | | |
199 | 264 | | |
| |||
205 | 270 | | |
206 | 271 | | |
207 | 272 | | |
208 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
209 | 280 | | |
210 | 281 | | |
211 | 282 | | |
| 283 | + | |
| 284 | + | |
212 | 285 | | |
213 | 286 | | |
214 | | - | |
215 | | - | |
| 287 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments