Commit Graph

81 Commits

Author SHA1 Message Date
Nikolay Edigaryev aa36ad4cb6 Ability to pre-pull VM images by targeting workers with labels 2025-12-10 20:43:34 +01: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
Nikolay Edigaryev a5c653d0a6
Introduce `--bootstrap-token-stdin` and `--{username,password}` (#160)
* orchard worker run: introduce --bootstrap-token-stdin flag

* orchard create vm: introduce --username and --password
2024-04-04 15:55:07 +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
Nikolay Edigaryev 13b4e192f0
Introduce "orchard {port-forward, vnc} worker WORKER_NAME" (#140)
* Fix potential NPE in Client.wsRequest()

* Introduce "orchard {port-forward, vnc} worker WORKER_NAME"

* portspec.go: simplify logic and respect [LOCAL_PORT]:REMOTE_PORT format
2023-10-09 18:51:34 +04:00
Nikolay Edigaryev 063405672f
Worker: better cleanup mechanisms (#139)
* Always Close() the Worker instance

* orchard list vms: show assigned worker for each of the VMs

* Stop the failed VMs before we schedule new VMs

To avoid violating resource constraints.

* syncOnDiskVMs: don't ignore running VMs

* Worker: show correct remote and local VM counts
2023-09-28 19:09:43 +00:00
Nikolay Edigaryev 64987f6d59
Send http.Server errors to zap at debug level and provide --debug flag (#135) 2023-09-25 18:17:23 +04:00
Nikolay Edigaryev 2adb17c3c4
Introduce "orchard get worker" command (#127) 2023-09-13 23:50:58 +04:00
Tim Peeters 9f4cd5bae7
Fix typo in documentation of the new image-pull-policy option. (#113) 2023-08-07 12:48:57 -04:00