Commit Graph

267 Commits

Author SHA1 Message Date
Nikolay Edigaryev 077252f6d4
Prevent goroutine leak when Close()'ing *grpc_net_conn.Conn (#237) 2025-01-23 18:17:14 +04:00
Nikolay Edigaryev 1fce915d67
API: only overwrite specific worker fields when worker already exists (#236)
* API: only overwrite specific worker fields when worker already exists

* Don't forget to return when creating new worker

* Return updated worker when updating the worker
2025-01-16 16:42:17 +04:00
Nikolay Edigaryev 08769e00b4
Worker: do not consider on-disk VMs syncing error as fatal (#230) 2024-12-11 19:56:00 +04:00
Nikolay Edigaryev d7b6f477e1
Never list workers in Update()/storeUpdate() transactions (#228)
* POST /v1/workers: do not list workers in a single update txn

* schedulingLoopIteration(): do not list workers in a single update txn

* .golangci.yml: remove mentions of fully deprecated linters
2024-12-05 16:59:50 +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
Tim Peeters 4c63cea062
Fix #221 by bumping Go. (#223)
* Fix #221 by bumping Go.

* CI: use golang:latest instead of GoReleaser's container image

* Add Go linker flag (-B gobuildid) to generate UUID.

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
2024-11-20 14:02:39 +04:00
Nikolay Edigaryev 772336a7bd
Scheduler: stop iterating over workers when candidate worker is found (#220) 2024-11-13 17:59:08 +04:00
Nikolay Edigaryev 60948e14fe
Rendezvous: use a buffered channel of size 1 (#219)
* Rendezvous: use a buffered channel of size 1

* Fix spelling of "absence" in comment
2024-11-08 11:19:54 +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
Nikolay Edigaryev 9da91fa21a
Use a separate lock file on Windows to protect configuration (#216) 2024-11-01 22:38:25 +04:00
Fedor Korotkov e40ce6d999
Build Windows binaries (#215)
* Build client for Windows

* Dry Run
2024-11-01 14:33:34 -04:00
Nikolay Edigaryev 79213fccfe
Fix OpenAPI spec errors reported by Swagger Editor (#213) 2024-11-01 02:20:04 +04:00
Fedor Korotkov b6fe371416
allow to set up worker name (#210) 2024-10-11 07:44:01 -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 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
Mark McWhirter 979af1f699
Expose 2 new metrics about worker health (#203)
* Expose more metrics about worker health

* PR feedback

* PR feedback
2024-09-10 10:13:41 -04:00
Nikolay Edigaryev cbda1a0c87 Dockerfile: fix "orchard" binary destination path 2024-09-06 13:39:04 +04:00
Nikolay Edigaryev 4d49051478 .cirrus.yml: don't forget the FURY_TOKEN in "Release Binaries" task 2024-09-05 21:57:07 +04:00
Nikolay Edigaryev 32f2d17c13 Dockerfile: use goreleaser/goreleaser-pro to support "furies:" 2024-09-05 21:56:50 +04:00
Nikolay Edigaryev c61c1861d9 .cirrus.yml: Use GoReleaser Pro 2024-09-05 21:00:34 +04:00
Nikolay Edigaryev c92016a804
orchard-controller .deb/.rpm package: install systemd service (#204)
And create/delete the "orchard-controller" system user for
running the Orchard Controller.
2024-09-05 20:42:36 +04:00
Nikolay Edigaryev 72c6bbffa0
Move documentation to Tart's website (#199) 2024-09-03 21:08:11 +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 b8bc62cf28
.goreleaser.yml: publish .deb and .rpm packages to Fury.io (#200) 2024-08-27 17:32:58 +04:00
Nikolay Edigaryev cd9794197b
API: update service account fields on PUT (#198)
* API: update service account fields on PUT

* Disable G115 integer overflow linter of gosec
2024-08-21 20:03:52 +04:00
dependabot[bot] 1bb00534f5
Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#192)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-18 10:25:26 -04:00
Nikolay Edigaryev eecf61f714
.cirrus.yml: specify resources required on the "dev-mini" (#194) 2024-07-16 16:18:49 +04:00
Nikolay Edigaryev 0fd17db586
Document standard options of ingesting metrics into GCP (#193)
* Document standard options of ingesting metrics into GCP

* Remove "the"
2024-07-11 16:51:25 +04:00
Nikolay Edigaryev 4df43e6432
Default ?wait= to 0 seconds (#190) 2024-07-03 23:07:14 +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 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
Fedor Korotkov 1f5bb26d20
Notarize macOS Binaries (#184) 2024-06-19 20:41:11 +04:00
Nikolay Edigaryev 9442b6c5c3
Randomize the VM's MAC-address when using bridged networking (#182)
* Randomize the VM's MAC-address when using bridged networking

* CI: bypass test caching for "go test"
2024-06-18 11:19:56 +04:00
Nikolay Edigaryev 772654a408
.goreleaser.yml: upgrade to GoReleaser v2 (#180) 2024-06-11 22:16:54 +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 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
dependabot[bot] e6caf480de
Bump golang.org/x/net from 0.17.0 to 0.23.0 (#167)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 04:08:35 -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 7fb0a85834
API(VM): new image FQN (fully-qualified name) field (#165) 2024-04-15 20:14:44 +04:00
Nikolay Edigaryev 510a25956f
Asynchronous VM creation (#163) 2024-04-12 15:56:00 +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
Bartek Pacia 0e5300b2b0
goreleaser: set up automatic installation of shell completion files (#157) 2024-03-26 12:06:27 +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
dependabot[bot] 5da967b88c
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#150)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 12:55:53 +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
dependabot[bot] 7b49d506b2
Bump google.golang.org/grpc from 1.53.0 to 1.56.3 (#147)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 14:21:16 +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
dependabot[bot] 7c2c466d65
Bump golang.org/x/net from 0.7.0 to 0.17.0 (#143)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 11:55:24 +04:00