Orchestrator for running Tart Virtual Machines on a cluster of Apple Silicon devices
Go to file
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
api Introduce "orchard {port-forward, vnc} worker WORKER_NAME" (#140) 2023-10-09 18:51:34 +04:00
cmd/orchard Orchard Controller: implement an SSH server that acts as a jump host (#179) 2024-06-11 19:32:45 +04:00
docs Orchard Social Card (#79) 2023-04-20 02:05:48 +04:00
internal Orchard Controller: implement an SSH server that acts as a jump host (#179) 2024-06-11 19:32:45 +04:00
pkg API: do not return null when methods returning a list have no items (#170) 2024-04-29 15:49:09 -04:00
rpc Introduce "orchard {port-forward, vnc} worker WORKER_NAME" (#140) 2023-10-09 18:51:34 +04:00
.cirrus.star Use golangci-lint (#15) 2023-01-31 22:22:28 +04:00
.cirrus.yml Use macOS Sonoma images by default, instead of macOS Ventura (#166) 2024-04-17 17:56:08 +04:00
.gitignore Better state syncing and other improvements (#24) 2023-03-01 11:42:16 -05:00
.golangci.yml Introduce `--bootstrap-token-stdin` and `--{username,password}` (#160) 2024-04-04 15:55:07 +04:00
.goreleaser.yml goreleaser: set up automatic installation of shell completion files (#157) 2024-03-26 12:06:27 +04:00
DeploymentGuide.md Document --no-pki (#107) 2023-07-10 19:13:10 +04:00
Development.md Deployment guide to GCP (#44) 2023-03-24 09:49:06 -04:00
Dockerfile Consolidate controller bootstrap login in `run` command (#38) 2023-03-21 15:36:55 -04:00
IntegrationGuide.md Use macOS Sonoma images by default, instead of macOS Ventura (#166) 2024-04-17 17:56:08 +04:00
LICENSE Prepare for release (#37) 2023-03-20 15:28:24 -04:00
README.md Use macOS Sonoma images by default, instead of macOS Ventura (#166) 2024-04-17 17:56:08 +04:00
buf.gen.yaml Port forwarding support (#30) 2023-03-14 11:31:13 -04:00
buf.work.yaml Port forwarding support (#30) 2023-03-14 11:31:13 -04:00
buf.yaml Port forwarding support (#30) 2023-03-14 11:31:13 -04:00
go.mod Orchard Controller: implement an SSH server that acts as a jump host (#179) 2024-06-11 19:32:45 +04:00
go.sum Orchard Controller: implement an SSH server that acts as a jump host (#179) 2024-06-11 19:32:45 +04:00

README.md

Orchard

Orchard is an orchestration system for Tart. Create a cluster of bare-metal Apple Silicon machines and manage dozens of VMs with ease!

Quick start

Start the Orchard in local development mode:

brew install cirruslabs/cli/orchard
orchard dev

This will start Orchard Controller and a single Orchard Worker on your local machine. For production deployments, please refer to the Deployment Guide.

Creating Virtual Machines

Create a Virtual Machine resource:

orchard create vm --image ghcr.io/cirruslabs/macos-sonoma-base:latest ventura-base

Check a list of VM resources to see if the Virtual Machine we've created above is already running:

orchard list vms

Accessing Virtual Machines

SSH

To SSH into a VM use the orchard ssh command:

orchard ssh vm ventura-base

You can specify the --username and --password flags to specify the username/password pair to SSH. By default, admin/admin is used.

You can also execute remote commands instead of spawning a login shell, similarly to the OpenSSH's ssh command:

orchard ssh vm ventura-base "uname -a"

You can execute scripts remotely this way, by telling the remote command-line interpreter to read from the standard input and using the redirection operator as follows:

orchard ssh vm ventura-base "bash -s" < script.sh

VNC

Similar to ssh command, you can use vnc command to open Screen Sharing into a remote VM:

orchard vnc vm --username=administrator --password=password101 ventura-base

From architecture perspective, Orchard has a lower level API for port forwarding that ssh and vnc commands are built on top of. All port forwarding connections are done via the Orchard Controller instance which "proxies" a secure connection to the Orchard Workers. Therefore, your workers can be located under a stricter firewall that only allows connections to the Orchard Controller instance. Orchard Controller instance is secured by default and all API calls are authenticated and authorized.

Environment variables

In addition to controlling the Orchard via the CLI arguments, there are environment variables that may be beneficial both when automating Orchard and in daily use:

Variable name Description
ORCHARD_HOME Override Orchard's home directory. Useful when running multiple Orchard instances on the same host and when testing.
ORCHARD_LICENSE_TIER The default license limit only allows connecting 4 Orchard Workers to the Orchard Controller. If you've purchased a Gold Tier License, set this variable to gold to increase the limit to 20 Orchard Workers. And if you've purchased a Platinum Tier License, set this variable to platinum to increase the limit to 200 Orchard Workers.
ORCHARD_SERVICE_ACCOUNT_NAME Override service account name (used for controller API auth) on per-command basis
ORCHARD_SERVICE_ACCOUNT_TOKEN Override service account token (used for controller API auth) on per-command basis
ORCHARD_URL Override controller URL on per-command basis