Skip to content

ci: Run the smoke test VM with gcloud and ssh instead of Vagrant - #1474

Closed
marcleblanc2 wants to merge 1 commit into
close-ci-check-gapsfrom
marc/smoke-test-without-vagrant
Closed

marcleblanc2 wants to merge 1 commit into
close-ci-check-gapsfrom
marc/smoke-test-without-vagrant

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

Drops Vagrant from the smoke test. Stacked on #1472 (and #1468 below it).

Why

Vagrant came in with #141 in 2020, so one Vagrantfile could run the smoke test in a local VirtualBox VM or on GCE. Only the GCE provider is left, so Vagrant now only adds Ruby, the vagrant-google plugin, Vagrant pinned to 2.4.1 on the agents for that plugin, and an rsync of the repo.

What changes

  • .buildkite/smoke-test-vm.sh replaces vagrant-run.sh, test/Vagrantfile, and test/servers.yaml. It creates the VM with gcloud compute instances create using the same settings (image, custom-16-20480, us-central1-f, internal IP only, e2e-builder service account and scopes), and keeps ci: Speed up the smoke test #1468's job-named VM, deletion, and stale VM sweep, and ci: Close the gaps in what CI checks #1472's per-job key file
  • SSH uses an ed25519 key made for the job, which the VM authorizes through ssh-keys instance metadata. Nothing depends on the agent's ~/.ssh/id_rsa or project-wide keys any more
  • The repo goes over as a tarball on ssh, then the steps servers.yaml listed run as root: smoke-test.sh, the jq install, and executor-smoke-test.sh. The Docker Hub password goes over stdin, so it is not in the VM's process list or the command line
  • On failure, the container logs come back the same way, for the step's artifacts
  • The boot disk grows from vagrant-google's default 10 GB to 20 GB. The Ubuntu 26.04 e2e image in sourcegraph/infrastructure#7627 needs that for Docker 29's containerd image store, and it does no harm on the current image
  • The VM label type=vagrant becomes type=smoke-test; nothing in the sourcegraph org filters on it

Test plan

  • shellcheck and shfmt clean
  • Ran a copy of the script twice in a scratch GCP project, through an IAP tunnel, with a stock Ubuntu image that has no Docker: the VM came up, the dummy password reached the root shell (length checked), the repo landed in /deploy-sourcegraph-docker, jq installed, smoke-test.sh failed on docker: command not found, the script copied a .log back and exited with 127, and the VM and disk were deleted
  • This PR's Buildkite smoke test step, on the real e2e image in sourcegraph-ci

Vagrant came in 2020 so one Vagrantfile could run the smoke test in a local
VirtualBox VM or on GCE. Only the GCE provider is left, so Vagrant now only
adds Ruby, the vagrant-google plugin, a pinned Vagrant on the agents, and an
rsync of the repo.

smoke-test-vm.sh replaces vagrant-run.sh, the Vagrantfile, and servers.yaml.
It creates the VM with the same settings, authorizes a key made for the job,
copies the repo over ssh, and runs the steps servers.yaml listed as root, sending the
Docker Hub password over stdin. The boot disk grows from vagrant-google's
default 10 GB to 20 GB, which the Ubuntu 26.04 e2e image will need for
Docker 29's containerd image store.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1c770-8d7e-76ad-b47f-2a2ff80873cc
@marcleblanc2
marcleblanc2 added this pull request to stack #1473 November 10, 2026 22:48
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

@marcleblanc2

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1488, the same change cut smaller. The branch stays.

@marcleblanc2
marcleblanc2 deleted the marc/smoke-test-without-vagrant branch November 11, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant