Commit Graph

88 Commits

Author SHA1 Message Date
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 3fffe5fb74
Replace Prometheus with OpenTelemetry (#413) 2026-02-23 19:01:10 +01:00
Nikolay Edigaryev 5a0e6ed1d6
Instantiate new client for each spawned worker (#402) 2026-02-11 18:04:21 +01:00
Nikolay Edigaryev d1fb330d7e
echoserver: do not treat client errors as fatal (#398) 2026-02-05 13:00:43 +01:00
Nikolay Edigaryev 81a2c7b2df
Support authentication and TLS in k6 load testing script (#391) 2026-01-29 09:00:32 +01:00
Nikolay Edigaryev a234ec8995
orchard worker run: introduce "--synthetic" and "--workers" hidden flags (#390)
* orchard worker run: introduce "--synthetic" and "--workers" hidden flags

* Use slices.Clone() instead of directly assigning slices

* Use errgroup's context instead of command's context
2026-01-28 16:50:25 +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
Fedor Korotkov 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 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 6d23548d81
API spec: document VM object more thoroughly (#354)
* API spec: document VM object more thoroughly

* Describe hostDirs and signify that it's worker-local in docs
2025-10-06 18:22:57 +04:00
Nikolay Edigaryev cdece3149b
orchard create vm: do not enable --nested by default (#348) 2025-09-29 17:37:28 +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 873efb24e7
ghcr.io/cirruslabs/macos-sequoia-base:latest for everything (#344) 2025-09-25 20:43:53 +04:00
Nikolay Edigaryev 56260e7667
Worker: automatically scrape logical cores and memory size (#341) 2025-09-17 00:13:42 +04:00
Nikolay Edigaryev f5aa04e98b
orchard controller run: introduce configurable --worker-offline-timeout (#342) 2025-09-17 00:10:39 +04:00
Nikolay Edigaryev 26668f2cbd
orchard controller run: introduce --experimental-disable-db-compression (#336) 2025-08-19 17:31:18 +04:00
Nikolay Edigaryev 39fbbbc2a6
Disable Prometheus metrics by default (#331) 2025-07-17 00:58:13 +04:00
Nikolay Edigaryev ed7921ce16
Fix websocket.(*Conn).timeoutLoop goroutine leak (#329) 2025-07-11 15:23:50 +04:00
Nikolay Edigaryev ae7cdd8628
orchard controller run: introduce "--listen-pprof" command-line argument (#326)
* orchard controller run: introduce "--pprof" command-line flag

* --pprof → --listen-pprof

* Log pprof HTTP server error, if any
2025-06-26 20:15:10 +04:00
Nikolay Edigaryev 76f0672759
spf13/cobra: don't use PersistentFlags() (#319) 2025-05-26 19:58:37 +04:00
Nikolay Edigaryev a37a8914cd
orchard controller run: introduce --experimental-ping-interval (#316)
* orchard controller run: introduce --experimental-ping-interval

* Ensure that --experimental-ping-interval is always larger than 5s
2025-05-15 21:14:17 +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 40f222c408
Worker: fix "failed to retrieve Orchard's home directory path" (#309)
When running through launchd and no HOME is set.
2025-04-17 21:57:04 +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 599ac40a90
orchard ssh vm: prevent busy loop in remote terminal resize goroutine (#297) 2025-04-02 14:07:52 +00:00
Nikolay Edigaryev 9919117b9b
orchard controller run: create a default bootstrap context (#291)
* orchard controller run: create a default bootstrap context

* Dockerfile: correct AS casing

* Fix typo in BootstrapContextName
2025-03-27 18:48:04 +04:00
Nikolay Edigaryev 7d340d6908
.golangci.yml: support golangci-lint 2.0 (#289) 2025-03-24 23:58:47 +04:00
gsakun 705bf8bd83
add insecure-no-tls flag (#281)
* support enable tls flag

* modify tls enable control flag

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

* Optimize message print

* Avoid unrelated changes to the bootstrap message

* Consistent command-line argument order

* Extra spacing

* No need to shadow controllerCert

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
2025-03-22 00:09:24 +04:00
Nikolay Edigaryev 39243978ed
orchard context create: ask for service account name and token (#282)
If not provided either via --bootstrap-token or via
--service-account-{name,token}.
2025-03-20 02:21:44 +04:00
Nikolay Edigaryev 59007020f4
Controller: enable experimental RPC v2 by default (#280)
* Controller: enable experimental RPC v2 by default

* Ensure mutual exclusiveness for --{,no-}experimental-rpc-v2

* Check earlier
2025-03-18 21:28:01 +04:00
Nikolay Edigaryev d5cd08fcce
Controller: advertise ALPN (#279) 2025-03-18 18:55:45 +04:00
Nikolay Edigaryev 2aae818f78
Worker: prefer assigned CPU/memory to CPU/memory (#250)
* Worker: prefer assigned CPU/memory to CPU/memory

* orchard get worker: show default CPU, default memory and labels
2025-02-13 16:23:47 +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 722d5a8eaf
Avoid including " and $ characters in bootstrap admin's token (#245)
* Avoid including " and $ characters in bootstrap admin's token

* Avoid fallthrough
2025-02-06 21:37:42 +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 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 d66d667f1e
orchard ssh vm: fix "The handle is invalid." error on Windows (#217) 2024-11-01 16:35:01 -04:00
Fedor Korotkov b6fe371416
allow to set up worker name (#210) 2024-10-11 07:44:01 -04:00
Nikolay Edigaryev 1730eaf67c
orchard controller: make sure that output goes through the logger (#207)
...which emits JSON on the production for easier processing.
2024-09-17 22:54:43 +04:00
Nikolay Edigaryev 8aaf05c4f7
controller run: make bootstrap process more user-friendly (#201)
* controller run: make bootstrap process more user-friendly

* Badger: log to zap instead of standard error
2024-09-03 18:54:28 +04:00
Nikolay Edigaryev 8119b22817
orchard controller run: introduce --insecure-ssh-no-client-auth (#187) 2024-06-28 23:55:18 +04:00
Nikolay Edigaryev ff0497b1d8
Produce OpenTelemetry metrics (#185)
* .golangci.yml: remove mentions of deprecated linters

* Fix "staticcheck" linter error by using grpc.NewClient

* Configure OpenTelemetry

Metrics only for now.

* Produce OpenTelemetry metrics

* Update DeploymentGuide.md

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>

* Update DeploymentGuide.md

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>

* Introduce "org.cirruslabs.orchard.controller.worker_status"

---------

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
2024-06-24 18:19:51 +04:00
Nikolay Edigaryev d59bc7f8a7
Orchard Controller: implement an SSH server that acts as a jump host (#179)
* proxy.Connections(): require io.ReadWriteCloser instead of net.Conn

* Orchard Controller: implement an SSH server that acts as a jump host

* Issue a warning if the name used will be invalid in the future

* Further restrict uppercase characters in names in the future

The rationale is similar to https://github.com/kubernetes/kubernetes/issues/71140.

We won't want to munge the user's input and introduce subtle bugs doing
lowercase comparisons.
2024-06-11 19:32:45 +04:00
Nikolay Edigaryev 8790136f6a
Use macOS Sonoma images by default, instead of macOS Ventura (#166) 2024-04-17 17:56:08 +04:00