77 Commits
Author SHA1 Message Date
Yibo Zhuang f716825279 Make USB accessories opt-in for Tart VMs (#502) 2026-09-23 12:24:57 -07:00
edi-oai 4cd43d2b5a /exec API: drop session reconnection support (#487) 2026-09-09 08:05:08 +01:00
edi-oai 9ac6ca6326 Support Tart Guest Agent transport for VM startup scripts (#490)
* Support Tart Guest Agent transport for VM startup scripts

* TestTartGuestAgentStartupScript: make ScriptContent more readable

* Align Tart Guest Agent's startup script execution with SSH

* Use mvdan.cc/sh/v3/syntax to validate "export" shell commands

* Use Bash instead of Zsh on Linux

* Invert logic when validating vm.StartupScript.Transport for simplicity

* Document startup_script's transport field in OpenAPI specification

* Prevent unbounded buffering of startup script output

* grpc.WaitForReady(true) → retry.DoWithData()
2026-09-09 08:04:25 +01:00
edi-oai 01bf2d72a9 Support port-forwarding directly to Tart Guest Agent (#489) 2026-09-08 18:40:52 +01:00
edi-oai 792324b35b Make audio and clipboard sharing opt-in (#486) 2026-09-08 10:24:42 +01:00
edi-oai d8caf2d33c Add UDP endpoint support (#485) 2026-09-07 12:35:44 +01:00
edi-oai a838bb0299 Worker: introduce automatic "org.cirruslabs.orchard.worker-name" label (#481)
* Worker: introduce automatic "org.cirruslabs.orchard.worker-name" label

* TestLabelsCopy: use constants to fix linter error
2026-09-03 00:24:20 +01:00
edi-oai a3e08ffcbf Support running host processes alongside VMs (#482)
* Regenerate .pb with protoc-gen-go v1.36.11

* Support running host processes alongside VMs

* Replace existing host processes when starting a set
2026-09-03 00:24:09 +01:00
edi-oai 3fe0a284c5 Add endpoint support (#478)
* Add endpoint support

* Document endpoint network exposure
2026-09-02 16:08:39 +01:00
edi-oai 62acf3c265 Support dynamically updating Softnet policy (#477)
* Support dynamically updating Softnet policy

* Use cmpopts.EquateEmpty() when comparing two VMSpecs
2026-09-02 14:19:29 +01:00
Yibo Zhuang 28c0dd37b4 Add an option to disable Tart clipboard sharing (#475)
Expose noClipboard in VM creation, CLI inspection, and the API schema.
Pass --no-clipboard to Tart when requested. Clipboard sharing remains
enabled by default for existing VM specifications.
2026-09-01 21:32:55 +01:00
kylefuhrmanncalm cc2c0fd034 Add --no-audio support to VM spec (#460)
tart run supports --no-audio to disable host audio pass-through, but
there was no way to request it through a VM's spec - Headless, Nested,
and Suspendable all have a flag/field but audio didn't. Useful on
headless hosts with no audio hardware, where audio pass-through can
make guest CoreAudio depend on host audio services that don't exist.
2026-09-01 09:17:45 -07:00
Yibo Zhuang 381a8bb7e6 Prevent overcommitted workers from reporting unlimited capacity (#470) 2026-08-24 09:11:09 -07:00
Fedor Kororkov 1c241832f5 Fix host directory policy boundary checks (#459)
* Fix host directory policy boundary checks

* Fix host directory policy test lint
2026-08-07 13:49:46 -04:00
Fedor Kororkov 461af8de47 Migrate CI from Cirrus CI to GitHub Actions (#447)
* Migrate CI to GitHub Actions

* Publish Orchard through the OpenAI Homebrew tap

* Scope release secrets to GoReleaser steps

* Separate release and snapshot trust paths

* Use GitHub-hosted macOS 26 runner

* Run macOS unit tests on hosted runner

* Update Homebrew install command

* Build Docker image with GoReleaser

* Use GitHub-hosted Linux runner

* Use smaller Vetu image for Linux tests

* Run Linux tests on hosted ARM runner

* Use host architecture for Linux integration tests

* Preinstall Cloud Hypervisor for Linux tests

* Select Linux test images by architecture

* Satisfy platform image lint rules

* Format platform image errors

* Enable KVM access for Linux tests

* Honor VM wait time in WebSocket requests

* Satisfy WebSocket client lint rules

* Allow hosted Linux integration tests more time
2026-07-16 17:57:06 -04:00
Fedor Kororkov 2667a01cf8 Add more options to /exec (#435)
* Add SSH exec session options

* Remove unused exec session helper
2026-05-05 08:56:18 -04:00
Fedor Kororkov e6a3314f58 Supporting reconnecting to /exec socket (#434) 2026-05-04 15:49:19 -04:00
Nikolay Edigaryev 3cfa244550 create vm: introduce --{os,arch,runtime} command-line arguments (#422)
* create vm: introduce --{os,arch,runtime} command-line arguments

* v1.VM: prevent unsupported fields for "vetu" runtime
2026-03-17 19:46:00 +01:00
Nikolay Edigaryev 9092a9f172 Support Vetu virtualization on Linux in addition to Tart on macOS (#419)
* Support Vetu virtualization on Linux in addition to Tart on macOS

* api(portForward): ensure that rendezvousConn is closed

* Re-try SSH connections in integration tests

Because a VM might be still booting.
2026-03-16 11:12:28 +01:00
Nikolay Edigaryev a64f76a934 controller(api): new "GET /vms/{name}/exec" WebSocket-based endpoint (#408)
* controller(api): new "GET /vms/{name}/exec" WebSocket-based endpoint

* Split SSH connection and execution to avoid standard input handoff

* execstream: make Exit field a pointer again

To support serializing exit codes equal to 0.
2026-02-12 13:35:06 +01:00
Nikolay Edigaryev 230a83c740 Worker: ignore HTTP 404 when updating VM (#397) 2026-02-05 13:01:05 +01:00
Nikolay Edigaryev 2c0629f52b Introduce "compute:connect" role (#393)
* Introduce "compute:connect" role

* Fix message fixture in TestAuthorizeAuthenticatedNoRoles
2026-01-29 19:55:28 +01:00
Nikolay Edigaryev 688238837a Implement server-side filtering for VMs by worker (#392)
* Implement server-side filtering for VMs by worker

* Parse more than one filter but error out when more than one is provided

* Fix off-by-one

* No need to use "\n" in Debugf()
2026-01-29 17:52:24 +01:00
Nikolay Edigaryev 7775515a73 Load testing: synthetic VMs, multiple worker support and Grafana k6 test (#389)
* Load testing: synthetic VMs, multiple worker support and Grafana k6 test

* echoserver: prevent fallthrough when Accept() fails

* Move default local-dev context logic to CreateDevController()

* Synthetic: add a random delay to startup script echoing
2026-01-28 10:54:55 +01:00
6fe523ef69 Add pagination support for listing VM events (#386)
* Add pagination support for listing VM events

Introduced a paginated event listing API, added support for pagination parameters in the request, and included cursor-based navigation using headers. Relevant tests and Badger store implementations were updated to support the new logic.

* Remove support for ordering VM events

Dropped `ListOrder` type, `order` query parameter, and related logic for ordering VM events. Updated tests, API schema, and Badger store to reflect the removal.

* Remove invalid VM events ordering test

Deleted a test case for invalid VM events ordering since the `order` query parameter and related functionality have been removed.

* Add support for ordering VM events

Implemented `order` query parameter for specifying sort order (ascending/descending) of VM events. Updated API schema, Badger store, and added related tests.

* Add support for limiting and ordering VM logs

Introduced `--limit` and `--order` flags for controlling the number of log lines and their sort order (ascending/descending). Updated API client to handle new options.

* Update internal/controller/store/badger/badger_events.go

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* fix: address PR review feedback

- switch logs CLI to --tail with desc ordering
- reuse ParseLogsOrder in controller with helpful errors
- always use ListEventsPage and scope event cursors
- move events pagination coverage to integration test

🤖 Generated with [Codex](https://chatgpt.com/codex)

Co-Authored-By: Codex <codex@openai.com>

* refactor: simplify prefix trimming and improve error formatting

- Replaced manual prefix check with `bytes.TrimPrefix` in Badger store.
- Enhanced error message formatting in VM logs controller.

* fix: address PR review feedback

- use suggested reverse seek in badger events pagination
- add events pagination client helper and use it in integration test

🤖 Generated with [Codex](https://chatgpt.com/codex)

Co-Authored-By: Codex <codex@openai.com>

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
Co-authored-by: Codex <codex@openai.com>
2026-01-22 09:22:53 -05:00
Nikolay Edigaryev 76a552bade Ability to set VM's power state and retrieve backing Tart VM's name (#373)
* Ability to set VM's power state and retrieve backing Tart VM's name

* Validate user-provided "powerState" field

* Introduce TestSpecUpdatePowerStateSuspend

* Introduce TestSpecUpdatePowerStateStopped

* OpenAPI specification: add note about suspended VMs to "tartName" desc.

* Sometimes we need to wait more than 30 seconds
2025-12-02 16:43:17 -05:00
Nikolay Edigaryev 9cdfd75f79 Badger store: avoid code duplication by using generic methods (#369)
* Badger store: avoid code duplication by using generic methods

* No need to return PT, can return just *T
2025-11-17 18:34:59 +04:00
Nikolay Edigaryev 60303d11dd VM specification: allow suspendable VMs (#366) 2025-11-11 21:16:28 +04:00
Nikolay Edigaryev bafcf6fac2 Simplify state reconciliation and support changing Softnet settings (#364)
* Simplify state reconciliation and support changing Softnet settings

* Remove unused "updateFunc" parameter from syncOnDiskVMs()

* Don't take an address of a loop variable

* ensure → ensures

* updateVMState(): don't forget to update VMState

* Introduce TestSpecUpdateSoftnet integration test

* Update OpenAPI specification to include generation/observedGeneration
2025-11-06 20:56:31 +04:00
Nikolay Edigaryev 08e9dfbbfe Support "tart run"'s --net-softnet-allow and --net-softnet-block (#361)
* Support "tart run"'s --net-softnet-allow and --net-softnet-block

* Use ghcr.io/cirruslabs/macos-tahoe-base:latest by default
2025-10-27 23:07:43 +04:00
Nikolay Edigaryev af221cf3c1 Support for prefixed Orchard Controller API URLs (#355)
* Support for prefixed Orchard Controller API URLs

* Fix Swagger UI

* Remove spurious "fmt" import

* Use url.URL in order to correctly calculate API path for Swagger UI
2025-10-06 20:04:47 +04:00
Nikolay Edigaryev c5e0d68a3d API: introduce ability to watch a VM (#351)
* API: introduce ability to watch a VM

* Document ?watch=true for GET /vms/{name} in the OpenAPI specification

* WatchVM: ensure that goroutine is terminated on early return with error

* WatchVM: close channels on goroutine exit

* WatchVM: ensure that we wait for the goroutine after additional barriers

* WatchVM: ignore unexpected keys instead of throwing an error

* WatchVM: perform context-aware writes to a bounded channel

* WatchVM: don't forget to close errCh on goroutine exit too

* WatchVM: don't close readyCh in goroutine to avoid ambiguity

* WatchVM: filter out spurious KVs that signify VM deletion
2025-10-03 21:34:53 +04:00
Nikolay Edigaryev 43e21c7963 orchard create vm: "--nested" flag to enable nested virtualization (#346) 2025-09-26 19:42:44 +04:00
Nikolay Edigaryev 56260e7667 Worker: automatically scrape logical cores and memory size (#341) 2025-09-17 00:13:42 +04:00
Nikolay Edigaryev 507db0fcfe orchard create vm: introduce --disk-size command-line argument (#313) 2025-04-29 18:21:46 +04:00
Nikolay Edigaryev abcfee677d Work around Sequoia's "Local Network" permission with a helper process (#302)
* Work around Sequoia's "Local Network" permission with a helper process

* README.md: macOS 15 (Sequoia) warning

* Make "orchard dev" unix-specific too, otherwise Release fails

* Fix typo in "localNetworkHerlper"

* Slightly improve the macOS 15 (Sequoia) note

* orchard worker run: better documentation for --user

* Make sure privilege dropping is the first step we do in runWorker()
2025-04-10 18:01:19 +04:00
Nikolay Edigaryev 4794f2a5b6 orchard create vm: introduce --random-serial command-line argument (#248) 2025-02-12 18:00:13 +04:00
Nikolay Edigaryev 61d7d34ea4 RPC v2: fix Ping() hanging due to PONG not being processed (#247) 2025-02-07 22:05:09 +04:00
Nikolay Edigaryev 26c8808506 Support scheduling by labels (#244) 2025-02-06 18:05:36 +04:00
Nikolay Edigaryev 581de320b9 Allow creating VMs with implicit CPU and memory (#243)
* Allow creating VMs with implicit CPU and memory

* Clarify why cpu/memory can be 0 a bit better

* Controller(API): don't forget to update DefaultCPU and DefaultMemory

* Add an integration test for implicit CPU and memory
2025-02-06 00:50:01 +04:00
Nikolay Edigaryev 88fba8004d Introduce WebSocket-based RPC v2 (#239)
* Introduce WebSocket-based RPC v2

* go test: add -ldflags="-B gobuildid"

* No need to change the "controller.workerNotifier.Notify()" error message

* No need to modify Protocol Buffers/gRPC generated code

* rpcWatch(): explain that connection shouldn't be normally be closed

* Avoid "port forwarding failed: " repetition in error messages

* Improve comments and avoid repetition in IP resolution errors
2025-01-30 17:33:32 +04:00
Nikolay Edigaryev d94690176e Schedule opportunistically and more granularly (#225)
* Schedule opportunistically and more granularly

To avoid transaction conflicts.

* Measure scheduling loop iteration duration and log it at debugging level

* Use "continue NextWorker" instead of just "continue" for clarity
2024-12-03 14:11:48 +00:00
Nikolay Edigaryev 7fe0414981 "--scheduler-profile" option to allow different orchestration patterns (#224)
* "--scheduler-profile" option to allow different orchestration patterns

* API(cluster settings): provide a default value for scheduler profile
2024-11-28 20:07:46 +04:00
Nikolay Edigaryev 2a2ddea62a Controller: emit lifecycle events when the VM gets restarted or deleted (#208)
* Controller: emit lifecycle events when the VM gets restarted or deleted

* vm_{scheduling,run}_time → vm_{scheduling,run}_duration for clarity

* Update VM endpoint: only update VM started time when zero
2024-09-24 17:53:10 +04:00
Nikolay Edigaryev 76f192bdb0 API endpoint and associated RPC changes to resolve VMs IP's (#188)
* API endpoint and associated RPC changes to resolve VMs IP's

* Fix "Missing expected argument '<name>'" error when doing "tart set"

* Implement TestIPEndpoint() and IP() method in controller HTTP client
2024-07-03 22:56:43 +04:00
Nikolay Edigaryev c845f3b2fd API: do not return null when methods returning a list have no items (#170)
* API: do not return null when methods returning a list have no items

* Use "omitempty" in all API structs
2024-04-29 15:49:09 -04:00
Nikolay Edigaryev 7fb0a85834 API(VM): new image FQN (fully-qualified name) field (#165) 2024-04-15 20:14:44 +04:00
Nikolay Edigaryev 2c5b038df2 Set HTTP client timeout to 30 seconds (#153)
* Set HTTP client timeout to 30 seconds

* Add an explanation for why we set http.Server's Timeout
2024-02-05 18:32:31 +04:00
Nikolay Edigaryev 969f0bd729 Association flow improvements for "orchard context create" and better URL crafting (#149)
* Client: prevent double slashes at the end of URLs

* orchard context create: let the user know which association flow is used

* Client: rename parsePath() to formatPath()

* Client: grab the ServerName from the trusted certificate
2023-11-21 18:43:42 +04:00
Fedor Korotkov dc3eeef5b1 Support URLs in hostDir policies (#146)
* Support URLs in hostDir policies

We can't just blindly allow remote URLs since they might contain symlinks leading to outside the archive. Instead, let's support specifying URLs where the remote archive can come from.

Fixes #145

* Ignore Lint issue

* Reverted old validation logic
2023-10-24 21:01:34 +04:00