Skip to content

Commit 29af06e

Browse files
authored
Fix the counter microVM demo: delete hack/run-microvm-demo.sh and hack/run-microvm-demo-kind.sh (agent-substrate#3509)
Since agent-substrate#2092, `deploy ate-system` stages the microVM guest assets and applies the `microvm` SandboxConfig, so both scripts can be replaced by `deploy ate-system` now. This PR deletes `hack/run-microvm-demo.sh` and `hack/run-microvm-demo-kind.sh`. Tested on kind, this fixed the broken counter microVM demo, which failed before due to missing `ATE_CREDENTIAL_PROVIDER`. AI usage: test. - [ ] Tests pass - [ ] Docs updated Signed-off-by: Haven Xia <[email protected]>
1 parent 6db0d3a commit 29af06e

5 files changed

Lines changed: 19 additions & 186 deletions

File tree

‎demos/counter/README.md‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,10 @@ sandbox class (`ateworker-microvm`: a Kata guest on Cloud Hypervisor).
4646
- [`demos/counter/counter-microvm-template.yaml.tmpl`](counter-microvm-template.yaml.tmpl) —
4747
the `counter-microvm` actor template, created through the ate API in the
4848
`ate-demo-counter-microvm` atespace.
49-
- [`hack/run-microvm-demo.sh`](../../hack/run-microvm-demo.sh) — one-shot bring-up
50-
that builds the microVM worker image, stages the guest assets, deploys the
51-
control plane, and applies the manifests above. Like the other hack scripts it
52-
reads `.ate-dev-env.sh` for GKE; use the kind wrapper for a local cluster.
5349

54-
Run it and follow the printed next steps:
55-
56-
```bash
57-
# GKE (uses .ate-dev-env.sh, uploads assets to GCS):
58-
./hack/run-microvm-demo.sh
59-
60-
# local kind (local registry + in-cluster rustfs):
61-
KIND_CLUSTER_NAME=<cluster> ./hack/run-microvm-demo-kind.sh
62-
```
63-
64-
To deploy onto an existing cluster where `ate-system` is already installed:
50+
`deploy ate-system` already stages the microVM guest assets and applies the
51+
cluster-wide `microvm` `SandboxConfig`, so on a cluster installed as in the
52+
Quickstart, deploy the demo with:
6553

6654
```bash
6755
go run ./cmd/ate-setup deploy demo counter-microvm

‎docs/dev/microvm-local.md‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.c
7474
### 3. Run the microVM demo
7575

7676
```sh
77-
./hack/run-microvm-demo-kind.sh
77+
go run ./cmd/ate-setup --kind deploy ate-system --credential-provider='{"name":"k8s.io"}' \
78+
--ingress-allowed-spiffe-ids=spiffe://cluster.local/ns/ate-system/sa/atenet-client
79+
go run ./cmd/ate-setup --kind deploy demo counter-microvm
7880
```
7981

80-
This is a one-shot bring-up: it deploys the control plane (which assembles the
81-
guest runtime assets for the host architecture if not already present under
82-
`bin/microvm-assets/<arch>/`, stages them into the in-cluster rustfs bucket,
83-
and applies the cluster-wide `microvm` `SandboxConfig`), then deploys the demo
84-
worker pool + template.
82+
`deploy ate-system` assembles the guest runtime assets for the host
83+
architecture if not already present under `bin/microvm-assets/<arch>/`, stages
84+
them into the in-cluster rustfs bucket, and applies the cluster-wide `microvm`
85+
`SandboxConfig`. `deploy demo counter-microvm` then deploys the demo worker
86+
pool + template.
8587

8688
### 4. Verify
8789

@@ -176,21 +178,22 @@ echo 'export DOCKER_HOST="unix://${HOME}/.lima/docker-nested/sock/docker.sock"'
176178
cd <your substrate checkout>
177179
178180
./hack/create-kind-cluster.sh
179-
./hack/run-microvm-demo-kind.sh
181+
go run ./cmd/ate-setup --kind deploy ate-system --credential-provider='{"name":"k8s.io"}' \
182+
--ingress-allowed-spiffe-ids=spiffe://cluster.local/ns/ate-system/sa/atenet-client
183+
go run ./cmd/ate-setup --kind deploy demo counter-microvm
180184
```
181185

182-
The first run of `run-microvm-demo-kind.sh` downloads the guest runtime
186+
The first run of `deploy ate-system` downloads the guest runtime
183187
releases and extracts them into `bin/microvm-assets/<arch>/`; later
184188
runs reuse that directory when the version stamp and SHA-256 digests match.
185189

186190
Verify as in Option A, step 4.
187191

188192
## Trying it out
189193

190-
On completion, `run-microvm-demo-kind.sh` prints next steps: create an actor
191-
from the `counter-microvm` template, hit the in-RAM counter, then suspend and
192-
resume it and confirm the count continues — proving the guest-memory snapshot
193-
round-tripped. The flow is the same as the
194+
Next, create an actor from the `counter-microvm` template, hit the in-RAM
195+
counter, then suspend and resume it and confirm the count continues — proving
196+
the guest-memory snapshot round-tripped. The flow is the same as the
194197
[README Quickstart](../../README.md#quickstart-development), just with the
195198
microVM template; see the
196199
[counter demo's microVM steps](../../demos/counter/README.md#1-build-and-deploy)

‎hack/run-microvm-demo-kind.sh‎

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎hack/run-microvm-demo.sh‎

Lines changed: 0 additions & 111 deletions
This file was deleted.

‎internal/e2e/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The microVM lane needs its fixtures installed first, which also needs a node
4545
with `/dev/kvm` (`hack/create-kind-cluster.sh` detects one and labels the node):
4646

4747
```shell
48-
$ hack/run-microvm-demo-kind.sh # counter-microvm + assets
48+
$ go run ./cmd/ate-setup --kind deploy demo counter-microvm # counter-microvm
4949
$ go run ./cmd/ate-setup --kind deploy demo egress-microvm # egress-microvm
5050
```
5151

0 commit comments

Comments
 (0)