304 Commits
Author SHA1 Message Date
Fedor Korotkov b6fe371416 allow to set up worker name (#210) 0.24.1 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
0.24.0
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
0.23.2
2024-09-10 10:13:41 -04:00
Nikolay Edigaryev cbda1a0c87 Dockerfile: fix "orchard" binary destination path 0.23.1 2024-09-06 13:39:04 +04:00
Nikolay Edigaryev 4d49051478 .cirrus.yml: don't forget the FURY_TOKEN in "Release Binaries" task 0.23.0 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
0.22.1
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) 0.22.0 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) 0.21.0 2024-06-28 23:55:18 +04:00
Nikolay EdigaryevandFedor Korotkov 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>
0.20.0
2024-06-24 18:19:51 +04:00
Fedor Korotkov 1f5bb26d20 Notarize macOS Binaries (#184) 0.19.1 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) 0.19.0 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
0.18.0
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) 0.17.0 2024-04-15 20:14:44 +04:00
Nikolay Edigaryev 510a25956f Asynchronous VM creation (#163) 0.16.1 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
0.16.0
2024-04-04 15:55:07 +04:00
Bartek Pacia 0e5300b2b0 goreleaser: set up automatic installation of shell completion files (#157) 0.15.2 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
0.15.1
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
0.15.0
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
0.14.3
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>
0.14.2
2023-10-16 11:55:24 +04:00
Nikolay Edigaryev fe8cc21cba HostDir: support URLs in path (#142) 0.14.1 2023-10-11 18:37:24 +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
0.14.0
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
0.13.1
2023-09-28 19:09:43 +00:00
Nikolay Edigaryev 40f58e4aee More RPC-related logs (#136)
* More RPC-related logs

* Notifier should be set before we use it in the scheduler
0.13.0
2023-09-27 20:16:00 +04: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 8c62df0eba Only allow simple names when creating workers, VMs, etc. and escape paths in API client (#129)
* Controller: only allow simple names when creating workers, VMs, etc.

* Client: escape paths

* simplename: allow ':' character
2023-09-22 14:51:43 -04:00
Nikolay Edigaryev 2adb17c3c4 Introduce "orchard get worker" command (#127) 0.12.0 2023-09-13 23:50:58 +04:00
Nikolay Edigaryev 3d0e375ede Don't stop and delete VMs that failed to clone (#125)
* NewVM() never returns an error

* Don't stop and delete VMs that failed to clone
2023-09-13 19:39:10 +04:00
Nikolay Edigaryev bb3d6edcd5 Fix Tart VM IP detection in bridged mode (#124) 2023-09-12 08:52:21 +00:00
Nikolay Edigaryev 036eb954be Retry DB transactions on badger.ErrConflict (#114)
* Log HTTP 500 errors in more detail

* Log errors in storeView and storeUpdate

* Retry on badger.ErrConflict
2023-08-15 15:18:47 +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
Nikolay Edigaryev 6759618f28 orchard create vm: support --image-pull-policy=Always (#110) 0.11.0 2023-07-26 17:43:14 +04:00
Nikolay Edigaryev fd88ce5890 Introduce ORCHARD_LICENSE_TIER environment variable (#111)
* Introduce ORCHARD_LICENSE_TIER environment variable

* Only parse ORCHARD_LICENSE_TIER if it was provided
2023-07-26 17:28:38 +04:00