diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 021b6e0..860cd09 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Table of Contents ``` ## How to Create an Issue/Enhancement -1. Go to the [Issue page](https://github.com/cirruslabs/tart/issues) of the repository +1. Go to the [Issue page](https://github.com/openai/tart/issues) of the repository 2. Click on the "New Issue" button 3. Provide a descriptive title and detailed description of the issue or enhancement you're suggesting 4. Submit the issue diff --git a/LICENSE b/LICENSE index a691b96..d763d44 100644 --- a/LICENSE +++ b/LICENSE @@ -1,45 +1,105 @@ -Fair Source License, version 0.9 +# Functional Source License, Version 1.1, ALv2 Future License -Copyright (C) 2023 Cirrus Labs, Inc. +## Abbreviation -Licensor: Cirrus Labs, Inc. +FSL-1.1-ALv2 -Software: Tart +## Notice -Use Limitation: 100 users. User is defined as a single core of a central processing unit (CPU) used by the product. -The Use Limitation does not apply to CPUs installed in devices used by a single individual. +Copyright 2022-2026 OpenAI -License Grant. Licensor hereby grants to each recipient of the -Software ("you") a non-exclusive, non-transferable, royalty-free and -fully-paid-up license, under all of the Licensor's copyright and -patent rights, to use, copy, distribute, prepare derivative works of, -publicly perform and display the Software, subject to the Use -Limitation and the conditions set forth below. +## Terms and Conditions -Use Limitation. The license granted above allows use by up to the -number of users per entity set forth above (the "Use Limitation"). For -determining the number of users, "you" includes all affiliates, -meaning legal entities controlling, controlled by, or under common -control with you. If you exceed the Use Limitation, your use is -subject to payment of Licensor's then-current list price for licenses. +### Licensor ("We") -Conditions. Redistribution in source code or other forms must include -a copy of this license document to be provided in a reasonable -manner. Any redistribution of the Software is only allowed subject to -this license. +The party offering the Software under these Terms and Conditions. -Trademarks. This license does not grant you any right in the -trademarks, service marks, brand names or logos of Licensor. +### The Software -DISCLAIMER. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OR -CONDITION, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. LICENSORS HEREBY DISCLAIM ALL LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE. +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. -Termination. If you violate the terms of this license, your rights -will terminate automatically and will not be reinstated without the -prior written consent of Licensor. Any such termination will not -affect the right of others who may have received copies of the -Software from you. +### License Grant + +Subject to your compliance with this License Grant and the Patents, +Redistribution and Trademark clauses below, we hereby grant you the right to +use, copy, modify, create derivative works, publicly perform, publicly display +and redistribute the Software for any Permitted Purpose identified below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright notices provided in or with the Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software under +the Apache License, Version 2.0 that is effective on the second anniversary of +the date we make the Software available. On or after that date, you may use the +Software under the Apache License, Version 2.0, in which case the following +will apply: + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/README.md b/README.md index b67af9f..67cbbd9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + *Tart* is a virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. Built by CI engineers for your automation needs. Here are some highlights of Tart: @@ -8,57 +8,42 @@ Built by CI engineers for your automation needs. Here are some highlights of Tar * Use Tart Packer Plugin to automate VM creation. * Easily integrates with any CI system. -Tart powers [Cirrus Runners](https://cirrus-runners.app/) -service — a drop-in replacement for the standard GitHub-hosted runners, offering 2-3 times better performance for a fraction of the price. - -

- - - -

- Many companies are using Tart in their internal setups. Here are just a few of them:

- + - + - + - + - + - + - + - + - + - +

-**Note:** If your company or project is using Tart please consider [sharing with the community](https://github.com/cirruslabs/tart/discussions/857). - -

- - - -

+**Note:** If your company or project is using Tart please consider [sharing with the community](https://github.com/openai/tart/discussions/857). ## Usage @@ -70,5 +55,5 @@ tart clone ghcr.io/cirruslabs/macos-tahoe-base:latest tahoe-base tart run tahoe-base ``` -Please check the [official documentation](https://tart.run) for more information and/or feel free to use [discussions](https://github.com/cirruslabs/tart/discussions) +Please check the [official documentation](https://tart.run) for more information and/or feel free to use [discussions](https://github.com/openai/tart/discussions) for remaining questions. diff --git a/Resources/AWSMarkeplaceLogo.png b/Resources/AWSMarkeplaceLogo.png deleted file mode 100644 index 8450014..0000000 Binary files a/Resources/AWSMarkeplaceLogo.png and /dev/null differ diff --git a/Sources/tart/Commands/Exec.swift b/Sources/tart/Commands/Exec.swift index 88f1d13..daa9504 100644 --- a/Sources/tart/Commands/Exec.swift +++ b/Sources/tart/Commands/Exec.swift @@ -1,6 +1,5 @@ import ArgumentParser import Foundation -import NIOPosix import GRPC import Cirruslabs_TartGuestAgent_Grpc_Swift @@ -41,12 +40,6 @@ struct Exec: AsyncParsableCommand { throw RuntimeError.VMNotRunning(name) } - // Create a gRPC channel connected to the VM's control socket - let group = MultiThreadedEventLoopGroup(numberOfThreads: 1) - defer { - try! group.syncShutdownGracefully() - } - // Change the current working directory to a VM's base directory // to work around Unix domain socket 104 byte limitation [1] // @@ -55,15 +48,6 @@ struct Exec: AsyncParsableCommand { FileManager.default.changeCurrentDirectoryPath(baseURL.path()) } - let channel = try GRPCChannelPool.with( - target: .unixDomainSocket(vmDir.controlSocketURL.relativePath), - transportSecurity: .plaintext, - eventLoopGroup: group, - ) - defer { - try! channel.close().wait() - } - // Switch controlling terminal into raw mode when remote pseudo-terminal is requested var state: State? = nil @@ -79,7 +63,10 @@ struct Exec: AsyncParsableCommand { // Execute a command in a running VM do { - try await execute(channel) + let controlSocketPath = vmDir.controlSocketURL.relativePath + try await withGuestAgentChannel(unixDomainSocketPath: controlSocketPath) { channel in + try await execute(channel) + } } catch let error as GRPCConnectionPoolError { throw RuntimeError.Generic("Failed to connect to the VM using its control socket: \(error.localizedDescription), is the Tart Guest Agent running?") } diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index 342f078..0cbdfc1 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -296,6 +296,28 @@ struct Run: AsyncParsableCommand { @Flag(help: ArgumentHelp("Disable the keyboard")) var noKeyboard: Bool = false + #if arch(arm64) && compiler(>=6.4) + @Option(help: ArgumentHelp("Provision a macOS guest on first boot using the guest provisioning API", discussion: """ + Takes a comma-separated list of key=value pairs that configure the initial setup of a macOS guest + + Requires the host to be running macOS 27 (or newer) and only takes effect on the first boot after + creation of a macOS 27 (or newer) guest VM. + + Supported keys (matching VZMacGuestProvisioningOptions): + + * fullName= — the person's full name to configure + + * username= — the username for logging into the guest + + * password= — the password to configure for the guest + + * logsInAutomatically=true|false — whether to automatically log the person in at startup + + * enablesRemoteLogin=true|false — whether to enable Remote Login (SSH) in the guest + """, valueName: "key=value,...")) + var provisioningOpts: String? + #endif + mutating func validate() throws { if vnc && vncExperimental { throw ValidationError("--vnc and --vnc-experimental are mutually exclusive") @@ -363,6 +385,19 @@ struct Run: AsyncParsableCommand { } } + #if arch(arm64) && compiler(>=6.4) + if provisioningOpts != nil { + if #unavailable(macOS 27) { + throw ValidationError("--provisioning-opts requires the host to be running macOS 27 (or newer)") + } + + let config = try VMConfig.init(fromURL: vmDir.configURL) + if config.os != .darwin { + throw ValidationError("--provisioning-opts can only be used with macOS VMs") + } + } + #endif + for disk in disk { if disk.hasSuffix("-amd64.iso") { throw ValidationError("Seems you have a disk targeting x86 architecture (hence amd64 in the name). Please use an 'arm64' version of the disk.") @@ -371,7 +406,7 @@ struct Run: AsyncParsableCommand { } @MainActor - func run() async throws { + func runOnMainThread() throws { let localStorage = try VMStorageLocal() let vmDir = try localStorage.open(name) @@ -442,6 +477,11 @@ struct Run: AsyncParsableCommand { } } + // Parse guest provisioning options + #if arch(arm64) && compiler(>=6.4) + let provisioning = try provisioningOpts.map { try GuestProvisioningOptions($0) } + #endif + vm = try VM( vmDir: vmDir, network: userSpecifiedNetwork(vmDir: vmDir) ?? NetworkShared(), @@ -518,7 +558,11 @@ struct Run: AsyncParsableCommand { #endif do { - try await vm!.start(recovery: recovery, resume: resume) + #if arch(arm64) && compiler(>=6.4) + try await vm!.start(recovery: recovery, resume: resume, provisioning: provisioning) + #else + try await vm!.start(recovery: recovery, resume: resume) + #endif } catch let error as VZError { if error.code == .virtualMachineLimitExceeded { var hint = "" @@ -559,7 +603,7 @@ struct Run: AsyncParsableCommand { } if #available(macOS 14, *) { - Task { + ErrorReportingTask("Failed to run control socket") { try await ControlSocket(vmDir.controlSocketURL).run() } } @@ -637,7 +681,7 @@ struct Run: AsyncParsableCommand { signal(SIGUSR2, SIG_IGN) let sigusr2Src = DispatchSource.makeSignalSource(signal: SIGUSR2) sigusr2Src.setEventHandler { - Task { + ErrorReportingTask("Failed to request guest OS to stop") { print("Requesting guest OS to stop...") try vm!.virtualMachine.requestStop() } @@ -838,6 +882,11 @@ struct VMWindowView: View { } } +// "tart run" drives an AppKit/SwiftUI run loop and therefore must own the main +// thread at the top level, so it opts out of Root's asynchronous command path. +// See Root.main() for the rationale. +extension Run: MainThreadCommand {} + struct MainApp: App { static var suspendable: Bool = false static var capturesSystemKeys: Bool = false @@ -869,13 +918,13 @@ struct MainApp: App { CommandGroup(replacing: .appInfo) { AboutTart(config: vm!.config) } CommandMenu("Control") { Button("Start") { - Task { try await vm!.virtualMachine.start() } + ErrorReportingTask("Failed to start VM") { try await vm!.virtualMachine.start() } } Button("Stop") { - Task { try await vm!.virtualMachine.stop() } + ErrorReportingTask("Failed to stop VM") { try await vm!.virtualMachine.stop() } } Button("Request Stop") { - Task { try vm!.virtualMachine.requestStop() } + ErrorReportingTask("Failed to request VM stop") { try vm!.virtualMachine.requestStop() } } if #available(macOS 14, *) { if (MainApp.suspendable) { @@ -1295,6 +1344,81 @@ struct DiskOptions { } } +struct GuestProvisioningOptions { + var fullName: String? + var username: String? + var password: String? + var logsInAutomatically: Bool? + var enablesRemoteLogin: Bool? + + init(_ parseFrom: String) throws { + for pair in parseFrom.split(separator: ",") { + let keyValue = pair.split(separator: "=", maxSplits: 1) + guard keyValue.count == 2 else { + throw RuntimeError.VMConfigurationError("invalid provisioning option \"\(pair)\", expected key=value") + } + + let key = String(keyValue[0]) + let value = String(keyValue[1]) + + switch key { + case "fullName": + self.fullName = value + case "username": + self.username = value + case "password": + self.password = value + case "logsInAutomatically": + self.logsInAutomatically = try Self.parseBool(key, value) + case "enablesRemoteLogin": + self.enablesRemoteLogin = try Self.parseBool(key, value) + default: + throw RuntimeError.VMConfigurationError("unsupported provisioning option \"\(key)\"") + } + } + } + + private static func parseBool(_ key: String, _ value: String) throws -> Bool { + switch value { + case "true": + return true + case "false": + return false + default: + throw RuntimeError.VMConfigurationError("invalid value \"\(value)\" for provisioning option \"\(key)\", expected \"true\" or \"false\"") + } + } +} + +#if arch(arm64) && compiler(>=6.4) + @available(macOS 27, *) + extension GuestProvisioningOptions { + func toVZMacGuestProvisioningOptions() throws -> VZMacGuestProvisioningOptions { + let options = VZMacGuestProvisioningOptions() + + if let fullName = fullName { + options.fullName = fullName + } + if let username = username { + options.username = username + } + if let password = password { + options.password = password + } + if let logsInAutomatically = logsInAutomatically { + options.logsInAutomatically = logsInAutomatically + } + if let enablesRemoteLogin = enablesRemoteLogin { + options.enablesRemoteLogin = enablesRemoteLogin + } + + try options.validate() + + return options + } + } +#endif + struct DirectoryShare { let name: String? let path: URL diff --git a/Sources/tart/GuestAgentChannel.swift b/Sources/tart/GuestAgentChannel.swift new file mode 100644 index 0000000..f754f2f --- /dev/null +++ b/Sources/tart/GuestAgentChannel.swift @@ -0,0 +1,28 @@ +import GRPC +import NIOPosix + +/// Connects to a guest agent's gRPC endpoint over a VM's control socket, runs +/// `body` with the resulting channel, and closes the channel afterwards on both +/// the success and error paths. +/// +/// The connection uses the process-wide singleton event loop group, which must +/// not be shut down, so there is no group lifecycle to manage here. +func withGuestAgentChannel( + unixDomainSocketPath socketPath: String, + _ body: (GRPCChannel) async throws -> T +) async throws -> T { + let channel = try GRPCChannelPool.with( + target: .unixDomainSocket(socketPath), + transportSecurity: .plaintext, + eventLoopGroup: .singletonMultiThreadedEventLoopGroup, + ) + + do { + let result = try await body(channel) + try await channel.close().get() + return result + } catch { + try? await channel.close().get() + throw error + } +} diff --git a/Sources/tart/MACAddressResolver/AgentResolver.swift b/Sources/tart/MACAddressResolver/AgentResolver.swift index 2978ce9..a45739b 100644 --- a/Sources/tart/MACAddressResolver/AgentResolver.swift +++ b/Sources/tart/MACAddressResolver/AgentResolver.swift @@ -1,6 +1,5 @@ import Foundation import Network -import NIOPosix import GRPC import Cirruslabs_TartGuestAgent_Apple_Swift import Cirruslabs_TartGuestAgent_Grpc_Swift @@ -9,34 +8,21 @@ class AgentResolver { static func ResolveIP(_ controlSocketPath: String) async throws -> IPv4Address? { do { return try await resolveIP(controlSocketPath) - } catch let error as GRPCConnectionPoolError { + } catch is GRPCConnectionPoolError { return nil } } private static func resolveIP(_ controlSocketPath: String) async throws -> IPv4Address? { - // Create a gRPC channel connected to the VM's control socket - let group = MultiThreadedEventLoopGroup(numberOfThreads: 1) - defer { - try! group.syncShutdownGracefully() + try await withGuestAgentChannel(unixDomainSocketPath: controlSocketPath) { channel in + // Invoke ResolveIP() gRPC method + let callOptions = CallOptions(timeLimit: .timeout(.seconds(1))) + let agentAsyncClient = AgentAsyncClient(channel: channel) + let resolveIPCall = agentAsyncClient.makeResolveIpCall(ResolveIPRequest(), callOptions: callOptions) + + let response = try await resolveIPCall.response + + return IPv4Address(response.ip) } - - let channel = try GRPCChannelPool.with( - target: .unixDomainSocket(controlSocketPath), - transportSecurity: .plaintext, - eventLoopGroup: group, - ) - defer { - try! channel.close().wait() - } - - // Invoke ResolveIP() gRPC method - let callOptions = CallOptions(timeLimit: .timeout(.seconds(1))) - let agentAsyncClient = AgentAsyncClient(channel: channel) - let resolveIPCall = agentAsyncClient.makeResolveIpCall(ResolveIPRequest(), callOptions: callOptions) - - let response = try await resolveIPCall.response - - return IPv4Address(response.ip) } } diff --git a/Sources/tart/Root.swift b/Sources/tart/Root.swift index 6114dde..bb2ed3f 100644 --- a/Sources/tart/Root.swift +++ b/Sources/tart/Root.swift @@ -32,86 +32,157 @@ struct Root: AsyncParsableCommand { FQN.self, ]) - public static func main() async throws { + // Note: main() is intentionally synchronous. Swift's asynchronous main() entry + // point implicitly starts an executor that owns the main thread — and since + // Swift 6.4 that executor is no longer backed by the Dispatch main queue — so + // running an AppKit/SwiftUI run loop nested inside it leaves the main run loop + // unable to drain Tasks or DispatchQueue.main, and a VM started via "tart run" + // never boots. Keeping main() synchronous lets a command that needs the main + // run loop own it at the top level, exactly like a plain SwiftUI app. + public static func main() { // Add commands that are only available on specific macOS versions if #available(macOS 14, *) { configuration.subcommands.append(Suspend.self) } - // Ensure the default SIGINT handled is disabled, - // otherwise there's a race between two handlers - signal(SIGINT, SIG_IGN); - // Handle cancellation by Ctrl+C ourselves - let task = withUnsafeCurrentTask { $0 }! - let sigintSrc = DispatchSource.makeSignalSource(signal: SIGINT) - sigintSrc.setEventHandler { - task.cancel() - } - sigintSrc.activate() + // Ensure the default SIGINT handler is disabled, otherwise there's a race + // between two handlers. We handle cancellation by Ctrl+C ourselves below. + signal(SIGINT, SIG_IGN) // Set line-buffered output for stdout setlinebuf(stdout) - defer { OTel.shared.flush() } + // Parse the command up-front, synchronously, so we can decide who gets to own + // the main thread before any concurrency is involved. + // + // ParsableCommand isn't Sendable, but we only ever hand it to the single task + // spawned below and never touch it again afterwards, so transferring it into + // that task is safe. + nonisolated(unsafe) let command: ParsableCommand + do { + command = try parseAsRoot() + } catch { + exit(withError: error) + } + + if let mainThreadCommand = command as? MainThreadCommand { + // This command drives a run loop on the main thread, so run it right here, + // letting it own the main thread at the top level. + MainActor.assumeIsolated { + runOnMainThread(mainThreadCommand) + } + } else { + // Every other command is asynchronous and doesn't touch the main thread, so + // drive it from a detached task and let the Dispatch main queue keep the + // process alive until the command exits. + let task = Task.detached { + await runInBackground(command) + } + + // Handle cancellation by Ctrl+C ourselves + let sigintSrc = DispatchSource.makeSignalSource(signal: SIGINT) + sigintSrc.setEventHandler { + task.cancel() + } + sigintSrc.activate() + + dispatchMain() + } + } + + @MainActor + private static func runOnMainThread(_ command: MainThreadCommand) { + let span = startCommandSpan(for: command) + runGarbageCollection(for: command) do { - // Parse command - var command = try parseAsRoot() + // Enters the run loop and only returns once the command exits via + // Foundation.exit(), so the lines below are a best-effort fallback. + try command.runOnMainThread() + } catch { + handleError(error, span: span) + } - // Create a root span for the command we're about to run - let span = OTel.shared.tracer.spanBuilder(spanName: type(of: command)._commandName).startSpan() - defer { span.end() } - OpenTelemetry.instance.contextProvider.setActiveSpan(span) + span.end() + OTel.shared.flush() + Foundation.exit(0) + } - // Enrich root command span with command's arguments - let commandLineArguments = ProcessInfo.processInfo.arguments.map { argument in - AttributeValue.string(argument) - } - span.setAttribute(key: "Command-line arguments", value: .array(AttributeArray(values: commandLineArguments))) + private static func runInBackground(_ command: ParsableCommand) async { + let span = startCommandSpan(for: command) + runGarbageCollection(for: command) - // Enrich root command span with Cirrus CI-specific tags - if let tags = ProcessInfo.processInfo.environment["CIRRUS_SENTRY_TAGS"] { - for (key, value) in tags.split(separator: ",").compactMap(splitEnvironmentVariable) { - span.setAttribute(key: key, value: .string(value)) - } - } - - // Run garbage-collection before each command (shouldn't take too long) - if type(of: command) != type(of: Pull()) && type(of: command) != type(of: Clone()){ - do { - try Config().gc() - } catch { - fputs("Failed to perform garbage collection: \(error)\n", stderr) - } - } - - // Run command + do { if var asyncCommand = command as? AsyncParsableCommand { try await asyncCommand.run() } else { + var command = command try command.run() } } catch { - // Not an error, just a custom exit code from "tart exec" - if let execCustomExitCodeError = error as? ExecCustomExitCodeError { - OTel.shared.flush() - Foundation.exit(execCustomExitCodeError.exitCode) - } - - // Capture the error into OpenTelemetry - OpenTelemetry.instance.contextProvider.activeSpan?.recordException(error) - - // Handle a non-ArgumentParser's exception that requires a specific exit code to be set - if let errorWithExitCode = error as? HasExitCode { - fputs("\(error)\n", stderr) - - OTel.shared.flush() - Foundation.exit(errorWithExitCode.exitCode) - } - - // Handle any other exception, including ArgumentParser's ones - exit(withError: error) + handleError(error, span: span) } + + span.end() + OTel.shared.flush() + Foundation.exit(0) + } + + // Create a root span for the command we're about to run. + private static func startCommandSpan(for command: ParsableCommand) -> Span { + let span = OTel.shared.tracer.spanBuilder(spanName: type(of: command)._commandName).startSpan() + OpenTelemetry.instance.contextProvider.setActiveSpan(span) + + // Enrich root command span with command's arguments + let commandLineArguments = ProcessInfo.processInfo.arguments.map { argument in + AttributeValue.string(argument) + } + span.setAttribute(key: "Command-line arguments", value: .array(AttributeArray(values: commandLineArguments))) + + // Enrich root command span with Cirrus CI-specific tags + if let tags = ProcessInfo.processInfo.environment["CIRRUS_SENTRY_TAGS"] { + for (key, value) in tags.split(separator: ",").compactMap(splitEnvironmentVariable) { + span.setAttribute(key: key, value: .string(value)) + } + } + + return span + } + + // Run garbage-collection before each command (shouldn't take too long). + private static func runGarbageCollection(for command: ParsableCommand) { + if type(of: command) != type(of: Pull()) && type(of: command) != type(of: Clone()) { + do { + try Config().gc() + } catch { + fputs("Failed to perform garbage collection: \(error)\n", stderr) + } + } + } + + private static func handleError(_ error: Error, span: Span) -> Never { + // Not an error, just a custom exit code from "tart exec" + if let execCustomExitCodeError = error as? ExecCustomExitCodeError { + span.end() + OTel.shared.flush() + Foundation.exit(execCustomExitCodeError.exitCode) + } + + // Capture the error into OpenTelemetry + OpenTelemetry.instance.contextProvider.activeSpan?.recordException(error) + span.end() + + // Handle a non-ArgumentParser's exception that requires a specific exit code to be set + if let errorWithExitCode = error as? HasExitCode { + fputs("\(error)\n", stderr) + + OTel.shared.flush() + Foundation.exit(errorWithExitCode.exitCode) + } + + // Handle any other exception, including ArgumentParser's ones + OTel.shared.flush() + exit(withError: error) } private static func splitEnvironmentVariable(_ tag: String.SubSequence) -> (String, String)? { @@ -123,3 +194,10 @@ struct Root: AsyncParsableCommand { return (String(splits[0]), String(splits[1])) } } + +// A command that drives an AppKit/SwiftUI run loop and therefore has to own the +// main thread at the top level, rather than running inside Swift's asynchronous +// main() executor. See Root.main() for the rationale. +protocol MainThreadCommand: ParsableCommand { + @MainActor func runOnMainThread() throws +} diff --git a/Sources/tart/Utils.swift b/Sources/tart/Utils.swift index ddb54bb..1f2dc70 100644 --- a/Sources/tart/Utils.swift +++ b/Sources/tart/Utils.swift @@ -1,5 +1,23 @@ import Foundation +// A fire-and-forget task that reports any thrown error to stderr. An unstructured +// Task spawned from a synchronous context (a signal handler, a SwiftUI action) has +// no parent to propagate its error to, so we report it here instead of dropping it. +struct ErrorReportingTask { + let task: Task + + @discardableResult + init(_ context: String, operation: @escaping @Sendable () async throws -> Void) { + task = Task { + do { + try await operation() + } catch { + fputs("\(context): \(error)\n", stderr) + } + } + } +} + extension Collection { subscript (safe index: Index) -> Element? { indices.contains(index) ? self[index] : nil diff --git a/Sources/tart/VM.swift b/Sources/tart/VM.swift index b1d4475..fc4aa5b 100644 --- a/Sources/tart/VM.swift +++ b/Sources/tart/VM.swift @@ -244,13 +244,13 @@ class VM: NSObject, VZVirtualMachineDelegate, ObservableObject { return try VM(vmDir: vmDir) } - func start(recovery: Bool, resume shouldResume: Bool) async throws { + func start(recovery: Bool, resume shouldResume: Bool, provisioning: GuestProvisioningOptions? = nil) async throws { try network.run(sema) if shouldResume { try await resume() } else { - try await start(recovery) + try await start(recovery, provisioning: provisioning) } } @@ -286,10 +286,15 @@ class VM: NSObject, VZVirtualMachineDelegate, ObservableObject { } @MainActor - private func start(_ recovery: Bool) async throws { + private func start(_ recovery: Bool, provisioning: GuestProvisioningOptions? = nil) async throws { #if arch(arm64) let startOptions = VZMacOSVirtualMachineStartOptions() startOptions.startUpFromMacOSRecovery = recovery + #if compiler(>=6.4) + if let provisioning = provisioning, #available(macOS 27, *) { + try startOptions.setGuestProvisioning(provisioning.toVZMacGuestProvisioningOptions()) + } + #endif try await virtualMachine.start(options: startOptions) #else try await virtualMachine.start() @@ -399,7 +404,7 @@ class VM: NSObject, VZVirtualMachineDelegate, ObservableObject { } // Storage - var attachment = try VZDiskImageStorageDeviceAttachment( + let attachment = try VZDiskImageStorageDeviceAttachment( url: diskURL, readOnly: false, // When not specified, use "cached" caching mode for Linux VMs to prevent file-system corruption[1] diff --git a/docs/assets/TartLicenseSubscription.pdf b/docs/assets/TartLicenseSubscription.pdf deleted file mode 100644 index ed89196..0000000 Binary files a/docs/assets/TartLicenseSubscription.pdf and /dev/null differ diff --git a/docs/blog/images/ec2-mac2-m2pro.png b/docs/blog/images/ec2-mac2-m2pro.png deleted file mode 100644 index cdb871c..0000000 Binary files a/docs/blog/images/ec2-mac2-m2pro.png and /dev/null differ diff --git a/docs/blog/posts/2023-02-11-changing-tart-license.md b/docs/blog/posts/2023-02-11-changing-tart-license.md index a06e0ed..c22e77d 100644 --- a/docs/blog/posts/2023-02-11-changing-tart-license.md +++ b/docs/blog/posts/2023-02-11-changing-tart-license.md @@ -11,6 +11,12 @@ categories: # Changing Tart License +!!! note "Current license" + This post describes a historical license change announced on February 11, 2023. + As of June 5, 2026, Tart is maintained by OpenAI and licensed under + [FSL-1.1-ALv2](https://github.com/openai/tart/blob/main/LICENSE). + The usage limits, paid tiers, pricing, support commitments, and contact details described below no longer apply. + **TLDR:** We are transitioning Tart's licensing from AGPL-3.0 to [Fair Source 100](https://fair.io/). This change will permit unlimited installations on personal computers, but organizations that exceed a certain number of server installations utilizing 100 CPU cores will be required to obtain a paid license. @@ -20,7 +26,7 @@ installations utilizing 100 CPU cores will be required to obtain a paid license. Exactly a year ago on February 11th 2022 we started working on Tart – a tiny CLI to run macOS virtual machines on Apple Silicon. Three months later we successfully started using Tart in our own production system and decided to share Tart with everyone. - + The goal was to establish a community of users and contributors to transform Tart from a small CLI to a robust tool for various scenarios. **Unfortunately, we were not successful in attracting a significant number of contributors.** @@ -60,13 +66,9 @@ device without a physical display connected. For example, a Mac Mini with a HDMI but a Mac Mini on a desk with a connected physical display is considered a personal computer. **Usage on personal computers and before reaching the 100 CPU cores limit is royalty-free and does not have the viral properties of AGPL.** -!!! note "Pricing update" - This post announced Tart licensing in February 2023 and originally listed monthly prices. - Pricing has since changed to yearly billing. See [Licensing and Support](../../licensing.md#license-tiers) for the latest terms. - -When an organization surpasses the 100 CPU cores limit, they will be required to obtain a [Gold Tier License](../../licensing.md#license-tiers), -which costs \$12,000 per year. Upon reaching a limit of 500 CPU cores, a [Platinum Tier License](../../licensing.md#license-tiers) -(\$36,000 per year) will be required, and for organizations that exceed 3000 CPU cores, a custom [Diamond Tier License](../../licensing.md#license-tiers) +When an organization surpasses the 100 CPU cores limit, they will be required to obtain a Gold Tier License, +which costs \$12,000 per year. Upon reaching a limit of 500 CPU cores, a Platinum Tier License +(\$36,000 per year) will be required, and for organizations that exceed 3000 CPU cores, a custom Diamond Tier License (\$12 per core per year) will be necessary. **All paid license tiers will include priority feature development and SLAs on support with urgent issues.** ## Have we considered alternatives? @@ -78,6 +80,5 @@ this approach is not addressing concerns related to the viral nature of AGPL for we concluded that transitioning to a source-available model with a mandatory paid licensing is fair, as the licensing fees are relatively insignificant for companies that reach a significant level of usage. -If you have any questions or concerns, please feel free to reach out to [licensing@cirruslabs.org](mailto:licensing@cirruslabs.org). If the new licensing model is not suitable for your organization, you are welcome to continue using the AGPL version of Tart, but please ensure it is not used in a non-AGPL environment. diff --git a/docs/blog/posts/2023-04-25-orchard-ga.md b/docs/blog/posts/2023-04-25-orchard-ga.md index e30c796..78f4217 100644 --- a/docs/blog/posts/2023-04-25-orchard-ga.md +++ b/docs/blog/posts/2023-04-25-orchard-ga.md @@ -78,7 +78,7 @@ in “worker” mode on macOS hosts. Orchard controller is using extremely fast ## Conclusion -Please give [Orchard](https://github.com/cirruslabs/orchard) a try! To run it locally in development mode on any Apple Silicon device +Please give [Orchard](https://github.com/openai/orchard) a try! To run it locally in development mode on any Apple Silicon device please run the following command: ```bash @@ -86,9 +86,9 @@ brew install cirruslabs/cli/orchard orchard dev ``` -This will launch a development cluster with a single worker on your machine. Refer to [Orchard documentation](https://github.com/cirruslabs/orchard#creating-virtual-machines) +This will launch a development cluster with a single worker on your machine. Refer to [Orchard documentation](https://github.com/openai/orchard#creating-virtual-machines) on how to create your first virtual machine and access it. In a [separate blog post](2023-04-28-orchard-ssh-over-grpc.md) we’ll cover how Orchard implements seamless SSH access over a gRPC connection. Stay tuned and please don’t hesitate to -[reach out](https://github.com/cirruslabs/orchard/discussions/landing)! +[open an issue](https://github.com/openai/orchard/issues)! diff --git a/docs/blog/posts/2023-04-28-orchard-ssh-over-grpc.md b/docs/blog/posts/2023-04-28-orchard-ssh-over-grpc.md index d107e42..cb8dd11 100644 --- a/docs/blog/posts/2023-04-28-orchard-ssh-over-grpc.md +++ b/docs/blog/posts/2023-04-28-orchard-ssh-over-grpc.md @@ -11,7 +11,7 @@ categories: # SSH over gRPC or how Orchard simplifies accessing VMs in private networks -We started developing [Orchard](https://github.com/cirruslabs/orchard), an orchestrator for [Tart](https://tart.run/), with the requirement that it should allow users to access virtual machines running on worker nodes in private networks that users might not have access to. +We started developing [Orchard](https://github.com/openai/orchard), an orchestrator for [Tart](https://tart.run/), with the requirement that it should allow users to access virtual machines running on worker nodes in private networks that users might not have access to. At the same time, we wanted to enable users to access VMs on these remote workers just as easily as they’d access network services on their local Tart VMs. @@ -102,14 +102,14 @@ Overall, the technology described in this article somewhat resembles what [we pr We really hope this feature will be useful for many, just as the Cirrus Terminal, and that it will remove the pain of scaling Tart beyond a single machine. -You can give [Orchard](https://github.com/cirruslabs/orchard) a try by running it locally in development mode on any Apple Silicon device: +You can give [Orchard](https://github.com/openai/orchard) a try by running it locally in development mode on any Apple Silicon device: ```bash brew install cirruslabs/cli/orchard orchard dev ``` -This will launch a development cluster with a single worker on your machine. Refer to [Orchard documentation](https://github.com/cirruslabs/orchard#creating-virtual-machines) +This will launch a development cluster with a single worker on your machine. Refer to [Orchard documentation](https://github.com/openai/orchard#creating-virtual-machines) on how to create your first virtual machine and access it. -Stay tuned and don’t hesitate to send us your feedback either [on GitHub](https://github.com/cirruslabs/orchard) or [Twitter](https://twitter.com/cirrus_labs)! +Stay tuned and don’t hesitate to send us your feedback either [on GitHub](https://github.com/openai/orchard) or [Twitter](https://twitter.com/cirrus_labs)! diff --git a/docs/blog/posts/2023-09-20-tart-2.0.0.md b/docs/blog/posts/2023-09-20-tart-2.0.0.md index 0754277..8840df8 100644 --- a/docs/blog/posts/2023-09-20-tart-2.0.0.md +++ b/docs/blog/posts/2023-09-20-tart-2.0.0.md @@ -19,25 +19,21 @@ Today we'd like to share some news and updates around the Tart ecosystem since t In the last 7 months Tart community almost tripled and growth is continuing to accelerate. Tart just crossed 25,000 installations, dozens of companies that we know of are using Tart in their daily workflows. If your company is not in the list please consider -[joining](https://github.com/cirruslabs/tart/blob/main/Resources/Users/HowToAddYourself.md)! +[joining](https://github.com/openai/tart/blob/main/Resources/Users/HowToAddYourself.md)!
-- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Krisp.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Mullvad.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/ahrefs.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Suran.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Symflower.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Transloadit.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/PITSGlobalDataRecoveryServices.png){ height="65" } -- ![](https://github.com/cirruslabs/tart/raw/main/Resources/Users/Uphold.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Krisp.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Mullvad.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/ahrefs.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Suran.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Symflower.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Transloadit.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/PITSGlobalDataRecoveryServices.png){ height="65" } +- ![](https://github.com/openai/tart/raw/main/Resources/Users/Uphold.png){ height="65" }
-We are also very pleased by how the community responded to [the license change](2023-02-11-changing-tart-license.md). -We now have a number of companies running Tart at scale under the new license. Revenue from the licensing allowed us to -allocate time to continue improving Tart which brings us to the section below. - ## Recent updates and what's changing in Tart 2.0.0 In the last 7 months we've had 12 feature releases that brought a lot of features requested by the community. Here are just diff --git a/docs/blog/posts/2023-10-06-tart-on-aws.md b/docs/blog/posts/2023-10-06-tart-on-aws.md deleted file mode 100644 index 1b84dce..0000000 --- a/docs/blog/posts/2023-10-06-tart-on-aws.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -draft: false -date: 2023-10-06 -search: - exclude: true -authors: - - fkorotkov -categories: - - announcement ---- - -# Tart is now available on AWS Marketplace - -Announcing [official AMIs for EC2 Mac Instances](https://aws.amazon.com/marketplace/pp/prodview-qczco34wlkdws) -with preconfigured Tart installation that is optimized to work within AWS infrastructure. - -EC2 Mac Instances is a gem of engineering powered by AWS Nitro devices. Just imagine there is a physical Mac Mini with -a plugged in Nitro device that can push the physical power button! - -![EC2 M2 Pro](../images/ec2-mac2-m2pro.png) - -This clever synergy between Apple Hardware and Nitro System allows seamless integration with VPC networking and booting macOS from an EBS volume. - -In this blog post we’ll see how a virtualization solution like Tart can compliment and elevate experience with EC2 Mac Instances. - - - -Let’s start from the basics, what EC2 Mac Instances allow to do compared to physical Mac Minis seating in offices of -many companies around the world? - -First and foremost, EC2 Mac Instances sit inside AWS data centers and can leverage all the goodies of VPC networking -within your company's existing infrastructure. No need to connect your Macs in the office through a VPN and deal -with networking and security. - -Additionally, EC2 Mac Instances are booting from EBS volumes which means it is possible to always have reproducible instances -and apply all the best practices of Infrastructure-as-Code. Managing a fleet of physical Macs is a pain and it's very hard -to make them configured in a reproducible and stable way. With booting from identical EBS volumes your team is always sure -about the identical initial state of the fleet. - -## Compromises of EC2 Mac Instances - -The flexibility of EBS volumes for macOS comes with some compromises that virtualization solutions like Tart can help with. -The initial boot from an EBS volume takes some time and not instant. macOS itself is pretty heavy and a Nitro device needs -to download tens of gigabytes that macOS requires in order to boot. This means that **resetting a EC2 Mac Instance to a clean state -is not instant and usually takes a couple of minutes** when you can’t utilize the precious resources for your workloads. - -It is much easier to tailor such EBS volumes with tools like Packer but there is still a **friction to test newly created EBS volumes** -since one needs to start and run a EC2 Mac Instance and it’s not possible to test things locally. Similarly it is even harder -to test beta versions of macOS that require manual interaction with a running instance. - -## Solution - -Tart can help with all the compromises! Tart virtual machines (VMs) have nearly native performance thanks to utilizing -native `Virtualization.Framework` that was developed along the first Apple Silicon chip. **Tart VMs can be copied/disposed -instantly and booting a fresh Tart VM takes only several seconds**. It is also possible to run two different Tart VMs in parallel -that can have completely different versions of macOS and packages. For example, it is possible to have the latest stable macOS -with the release version of Xcode along with the next version of macOS with the latest beta of Xcode. - -Creation of Tart VMs can be automated with [a Packer plugin](https://github.com/cirruslabs/packer-plugin-tart) the same way as -creation of EC2 AMIs with one caveat that **Tart Packer Plugin works locally so you can test the same virtual machine locally -as you would run it in the cloud**. - -Lightweight nature of Tart VMs with a focus on an easy-to-integrate Tart CLI compliments any macOS automation and helps to reduce -the feedback cycle and improves reproducibility of macOS environments even further. - -## Conclusion - -We are excited to bring [official AMIs that include Tart installation optimized to work within AWS](https://aws.amazon.com/marketplace/pp/prodview-qczco34wlkdws). -In the coming weeks when macOS Sonoma will become available on AWS we’ll release another update specifically targeting EC2 Mac Instances. -This update will simplify access to local SSDs of Mac Instances that are slightly faster than EBS volumes. Stay tuned and don’t hesitate -to ask any [questions](https://tart.run/licensing/). diff --git a/docs/blog/posts/2024-06-20-jumping-through-the-hoops.md b/docs/blog/posts/2024-06-20-jumping-through-the-hoops.md index 15df5b3..7787c25 100644 --- a/docs/blog/posts/2024-06-20-jumping-through-the-hoops.md +++ b/docs/blog/posts/2024-06-20-jumping-through-the-hoops.md @@ -11,7 +11,7 @@ categories: # Jumping through the hoops: SSH jump host functionality in Orchard -Almost a year ago, when we started building [Orchard](https://github.com/cirruslabs/orchard), an orchestration system for Tart, we quickly realized that most worker machines will be in a private network, and that VMs will be only reachable from the worker machines themselves. Thus, one of our goals became to simplify accessing the compute resources in a cluster through a centralized controller host. +Almost a year ago, when we started building [Orchard](https://github.com/openai/orchard), an orchestration system for Tart, we quickly realized that most worker machines will be in a private network, and that VMs will be only reachable from the worker machines themselves. Thus, one of our goals became to simplify accessing the compute resources in a cluster through a centralized controller host. This effort resulted in commands like `orchard port-forward` and `orchard ssh`, which were later improved to support connecting not just to the VMs, but to the worker machines themselves. @@ -55,8 +55,6 @@ Once running, you can connect to any VM in the cluster using the `ssh -J - -Cirrus Labs makes its Tart Virtualization Toolset, a leading virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon, -freely available on GitHub under the Fair Source License, a source-available license. Tart is used by tens of thousands of engineers at no charge within its generous free‑use limits. -Many large enterprises that need to exceed those limits support continued development through paid licenses. Cirrus Labs also uses Tart to power [Cirrus Runners](https://cirrus-runners.app/) -— a drop‑in replacement for macOS and Linux runners for GitHub Actions — offered at a fixed monthly price for unlimited usage. - -Cirrus Labs discovered that, **despite a prior licensing request that was declined due to a conflict of interest**, another company used Tart in a manner that exceeded the license’s free‑use limits, -in order to create a competing product. - -After several months of negotiations, the matter was settled and a settlement payment to Cirrus Labs was agreed upon. - -!!! quote "Comment by Fedor Korotkov, CEO of Cirrus Labs" - - As a company we embrace healthy competition that ultimately benefits the end user. Most of our users have no trouble complying with our license, - and even when they need something more than our free use limits, we can almost always grant them a license that fits their needs. **This was an exceptional case.** - We are pleased to have reached this settlement, which validates our source-available licensing strategy and reinforces our commitment to protecting our company and serving our community. - -Cirrus Labs was represented in this matter by [Jordan Raphael](https://byronraphael.com/attorneys/jordan-raphael/) of Byron Raphael LLP, a boutique intellectual property law firm, -and [Heather Meeker](https://www.techlawpartners.com/heather), a well-known specialist in open source and source available licensing. - -The specific financial terms of the settlement and the identity of the counterparty remain confidential. - -**About Cirrus Labs:** Cirrus Labs, Inc. is a bootstrapped developer-infrastructure company founded in 2017. Our offerings among others include Tart and Cirrus Runners, -and our software is used by teams at category-leading companies including Atlassian, Figma, Zendesk, Sentry and many more. - -Learn more at [https://tart.run/](https://tart.run/) and [https://cirrus-runners.app/](https://cirrus-runners.app/). - -**Contact:** [hello@cirruslabs.org](mailto:hello@cirruslabs.org) diff --git a/docs/faq.md b/docs/faq.md index 7f40944..77c254a 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -59,7 +59,7 @@ Remote images are pulled into `~/.tart/cache/OCIs/`. ## Nested virtualization support? Tart is limited by functionality of Apple's `Virtualization.Framework`. At the moment `Virtualization.Framework` -supports nested virtualization only on M3 or M4 chips running macOS 15 (Sequoia) or later and [only for Linux VMs](https://github.com/cirruslabs/tart/issues/1231#issuecomment-4410915463). By default, it is disabled, but can be enabled by passing the `--nested` flag to `tart run`. +supports nested virtualization only on M3 or M4 chips running macOS 15 (Sequoia) or later and [only for Linux VMs](https://github.com/openai/tart/issues/1231#issuecomment-4410915463). By default, it is disabled, but can be enabled by passing the `--nested` flag to `tart run`. ## Connecting to a service running on host @@ -74,7 +74,7 @@ netstat -nr | awk '/default/{print $2; exit}' ``` Note: that accessing host is only possible with the default NAT network. If you are running your virtual machines with -[Softnet](https://github.com/cirruslabs/softnet) (via `tart run --net-softnet )`, then the network isolation +[Softnet](https://github.com/openai/softnet) (via `tart run --net-softnet )`, then the network isolation is stricter and it's not possible to access the host. ## Avoiding the "Local Network" permission pop-up @@ -112,7 +112,7 @@ sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.pli By default, the built-in macOS DHCP server allocates IP-addresses to the VMs for the duration of 86,400 seconds (one day), which may easily cause DHCP exhaustion if you run more than ~253 VMs per day, or in other words, more than one VM every ~6 minutes. -This issue is worked around automatically [when using Softnet](http://github.com/cirruslabs/softnet), however, if you don't use or can't use it, the following command will reduce the lease time from the default 86,400 seconds (one day) to 600 seconds (10 minutes): +This issue is worked around automatically [when using Softnet](https://github.com/openai/softnet), however, if you don't use or can't use it, the following command will reduce the lease time from the default 86,400 seconds (one day) to 600 seconds (10 minutes): ```shell sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.InternetSharing.default.plist bootpd -dict DHCPLeaseTimeSecs -int 600 @@ -204,7 +204,7 @@ Alternatively, you can pass the credentials via the environment variables, see [ ## How is Tart different from Anka? Under the hood Tart is using the same technology as Anka 3.0 so there should be no real difference in performance -or features supported. If there is some feature missing please don't hesitate to [create a feature request](https://github.com/cirruslabs/tart/issues). +or features supported. If there is some feature missing please don't hesitate to [create a feature request](https://github.com/openai/tart/issues). Instead of Anka Registry, Tart can work with any OCI-compatible container registry. This provides a much more consistent and scalable experience for distributing virtual machines. diff --git a/docs/integrations/cirrus-cli.md b/docs/integrations/cirrus-cli.md index d760de7..c6e464e 100644 --- a/docs/integrations/cirrus-cli.md +++ b/docs/integrations/cirrus-cli.md @@ -5,8 +5,8 @@ description: Tool for running isolated tasks reproducibly in any environment wit # Cirrus CLI -Tart itself is only responsible for managing virtual machines, but we've built Tart support into a tool called Cirrus CLI -also developed by Cirrus Labs. [Cirrus CLI](https://github.com/cirruslabs/cirrus-cli) is a command line tool with +Tart itself is only responsible for managing virtual machines, but Cirrus Labs built Tart support into a tool called +[Cirrus CLI](https://github.com/cirruslabs/cirrus-cli), a command line tool with one configuration format to execute common CI steps (run a script, cache a folder, etc.) locally or in any CI system. We built Cirrus CLI to solve "But it works on my machine!" problem. @@ -38,7 +38,7 @@ cirrus run [Cirrus CI](https://cirrus-ci.org/) already leverages Tart to power its macOS cloud infrastructure. The `.cirrus.yml` config from above will just work in Cirrus CI and your tasks will be executed inside Tart VMs in our cloud. -**Note:** Cirrus CI only allows [images managed and regularly updated by us](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos). +**Note:** Cirrus CI only allows [images managed and regularly updated by Cirrus Labs](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos). ## Retrieving artifacts from within Tart VMs diff --git a/docs/integrations/packer.md b/docs/integrations/packer.md index a01cf47..066269c 100644 --- a/docs/integrations/packer.md +++ b/docs/integrations/packer.md @@ -38,4 +38,4 @@ build { } ``` -Here is a [repository with Packer templates](https://github.com/cirruslabs/macos-image-templates) used to build [all the images managed by us](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos). +Here is a [repository with Packer templates](https://github.com/cirruslabs/macos-image-templates) used to build [all the images managed by Cirrus Labs](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos). diff --git a/docs/legal/privacy.md b/docs/legal/privacy.md deleted file mode 100644 index 9f85720..0000000 --- a/docs/legal/privacy.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -search: - exclude: true ---- - - - -# Privacy Policy - -In addition to this Privacy Policy, Cirrus Labs also has a [Terms of Service](terms.md). - -### The Gist - -Cirrus Labs Inc will collect certain non-personally identify information about you as you use our sites. We may use -this data to better understand our users. We can also publish this data, but the data will be about a large group of users, -not individuals. - -We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal -information, we won't do anything evil with it. - -We can also use cookies, but you can choose not to store these. - -That's the basic idea, but you must read through the entire Privacy Policy below and agree with all the details -before you use any of our sites. - -### Reuse - -This document is based upon the [Automattic Privacy Policy](https://automattic.com/privacy/) and is licensed under -[Creative Commons Attribution Share-Alike License 2.5](https://creativecommons.org/licenses/by-sa/2.5/). Basically, -this means you can use it verbatim or edited, but you must release new versions under the same license and -you have to credit Automattic somewhere (like this!). Automattic is not connected with and does not sponsor or endorse -Cirrus Labs Inc or its use of the work. - -Cirrus Labs Inc ("Cirrus Labs") makes available services include our web sites (https://tart.run/), our blog, our API, -and any other software, sites, and services offered by Cirrus Labs Inc in connection to any of those (taken together, the "Service"). -It is Cirrus Labs Inc's policy to respect your privacy regarding any information we may collect while operating our websites. - -### Questions - -If you have question about this Privacy Policy, please contact us at hello@cirruslabs.org - -### Visitors - -Like most website operators, Cirrus Labs Inc collects non-personally-identifying information of the sort that web browsers and -servers typically make available, such as the browser type, language preference, referring site, and the date and time of each visitor request. -Cirrus Labs Inc's purpose in collecting non-personally identifying information is to better understand how Cirrus Labs Inc's -visitors use its website. From time to time, Cirrus Labs Inc may release non-personally-identifying information in the aggregate, -e.g., by publishing a report on trends in the usage of its website. - -Cirrus Labs Inc also collects potentially personally-identifying information like Internet Protocol (IP) addresses. -Cirrus Labs Inc does not use such information to identify its visitors, however, and does not disclose such information, -other than under the same circumstances that it uses and discloses personally-identifying information, as described below. -We may also collect and use IP addresses to block users who violated our Terms of Service. - -### Gathering of Personally-Identifying Information - -Certain visitors to Cirrus Labs Inc's websites choose to interact with Cirrus Labs Inc in ways that require -Cirrus Labs Inc to gather personally-identifying information. The amount and type of information that Cirrus Labs Inc gathers -depends on the nature of the interaction. Cirrus Labs Inc collects such information only insofar as is necessary or -appropriate to fulfill the purpose of the visitor's interaction with Cirrus Labs Inc. Cirrus Labs Inc does not disclose -personally-identifying information other than as described below. And visitors can always refuse to supply personally-identifying information, -with the caveat that it may prevent them from engaging in certain Service-related activities. - -Additionally, some interactions, such as posting a comment, may ask for optional personal information. For instance, -when posting a comment, may provide a website that will be displayed along with a user's name when the comment is displayed. -Supplying such personal information is completely optional and is only displayed for the benefit and the convenience of the user. - -### Aggregated Statistics - -Cirrus Labs Inc may collect statistics about the behavior of visitors to the Service. For instance, Cirrus Labs Inc -may monitor the most popular parts of the https://tart.run/. Cirrus Labs Inc may display this information publicly or -provide it to others. However, Cirrus Labs Inc does not disclose personally-identifying information other than as described below. - -### Protection of Certain Personally-Identifying Information - -Cirrus Labs Inc discloses potentially personally-identifying and personally-identifying information only to those of its employees, -contractors and affiliated organizations that (i) need to know that information in order to process it on Cirrus Labs Inc's behalf -or to provide services available at Cirrus Labs Inc's websites, and (ii) that have agreed not to disclose it to others. -Some of those employees, contractors and affiliated organizations may be located outside of your home country; by using the Service, -you consent to the transfer of such information to them. Cirrus Labs Inc will not rent or sell potentially personally-identifying and -personally-identifying information to anyone. Other than to its employees, contractors and affiliated organizations, as described above, -Cirrus Labs Inc discloses potentially personally-identifying and personally-identifying information only when required to do so by law, -or when Cirrus Labs Inc believes in good faith that disclosure is reasonably necessary to protect the property or rights of Cirrus Labs Inc, -third parties or the public at large. If you are a registered user of the Service and have supplied your email address, Cirrus Labs Inc may -occasionally send you an email to tell you about new features, solicit your feedback, or just keep you up to date with what's going on with -Cirrus Labs Inc and our products. We primarily use our website and blog to communicate this type of information, so we expect to keep -this type of email to a minimum. If you send us a request (for example via a support email or via one of our feedback mechanisms), -we reserve the right to publish it in order to help us clarify or respond to your request or to help us support other users. -Cirrus Labs Inc takes all measures reasonably necessary to protect against the unauthorized access, use, alteration or -destruction of potentially personally-identifying and personally-identifying information. - -### Browser Cookies - -A cookie is a string of information that a website stores on a visitor's computer, and that the visitor's browser provides -to the Service each time the visitor returns. Cirrus Labs Inc uses cookies to help Cirrus Labs Inc identify and track visitors, -their usage of Cirrus Labs Inc Service, and their Service access preferences. Cirrus Labs Inc visitors who do not wish to have -cookies placed on their computers should set their browsers to refuse cookies before using Cirrus Labs Inc's websites, with -the drawback that certain features of Cirrus Labs Inc's websites may not function properly without the aid of cookies. - -### Data Storage - -Cirrus Labs Inc uses third party vendors and hosting partners to provide the necessary hardware, software, networking, -storage, and related technology required to run the Service. You understand that although you retain full rights to your data, -it may be stored on third party storage and transmitted through third party networks. - -### Privacy Policy Changes - -Although most changes are likely to be minor, Cirrus Labs Inc may change its Privacy Policy from time to time, -and in Cirrus Labs Inc's sole discretion. Cirrus Labs Inc encourages visitors to frequently check this page for any changes -to its Privacy Policy. Your continued use of this site after any change in this Privacy Policy will constitute your -acceptance of such change. - -This page was last updated on 02/20/2023. diff --git a/docs/legal/terms.md b/docs/legal/terms.md deleted file mode 100644 index 71ecc17..0000000 --- a/docs/legal/terms.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -search: - exclude: true ---- - - - -# Terms of Service - -This page covers Terms of Service only for Cirrus Runners and Tart Documentation website in addition to the [Privacy Policy](privacy.md). - -### The Gist - -Cirrus Labs Inc ("Cirrus Labs") operates the [Cirrus Runners service](https://cirrus-runners.app/) which we hope you use. -If you use it, please use it responsibly. If you don't, we'll have to terminate your subscription. - -For paid plans, you'll be charged on a yearly basis. You can cancel anytime, but there are no refunds. - -The Terms of Service and our prices can change at any time unless specified in your agreement. We'll warn you 30 days in advance of any price changes. -We'll try to warn you about major changes to the Terms of Service, but we make no guarantees. - -That's the basic idea, but you must read through the entire Terms of Service below and agree with all the details before -you use any of our websites or services (whether or not you have signed up). - -### Reuse - -This document is an adaptation of the Code Climate Terms of Service, which is an adaptation of the Heroku Terms of Service, -which is turn an adaptation of the Google App Engine Terms of Service. The original work has been modified -with permission under the [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/). -Neither Code Climate, Inc, nor Heroku, Inc. nor Google, Inc. is connected with and they do not sponsor or endorse -Cirrus Labs or its use of the work. - -You're welcome to adapt and use this document for your own needs. If you make an improvement, we'd appreciate it if -you would let us know, so we can consider improving our own document. - -### Your Agreement with Cirrus Labs Inc - -Your use of the Cirrus Runners Service is governed by this agreement (the "Terms"). The "Service" means the services Cirrus Labs -makes available include our websites (https://tart.run/, https://cirrus-runners.app/), our blog, and any other software, sites, -and services offered by Cirrus Labs in connection to any of those. - -"Customer Source Code" means any source code you directly or indirectly submit to Cirrus Runners for the purpose of using the Service. -"Content" means all content generated by Cirrus Runners on your behalf (including metric data) and does not include Customer Source Code. - -In order to use the Service, You (the "Customer", "You", or "Your") must first agree to the Terms. You understand and agree -that Cirrus Labs will treat Your use of the Service as acceptance of the Terms from that point onwards. - -Cirrus Labs may make changes to the Terms from time to time. You may reject the changes by terminating Your subscription. -You understand and agree that if You use the Service after the date on which the Terms have changed, Cirrus Labs will treat -Your use as acceptance of the updated Terms. - -If you have any question about the Terms, please [contact us](../licensing.md#general-support). - -### Use of the Service - -* You must provide accurate and complete registration information any time You register to use the Service. -* You are responsible for the security of Your passwords and for any use of Your user. -* Your use of the Service must comply with all applicable laws, regulations and ordinances. -* You agree to not engage in any activity that interferes with or disrupts the Service. -* Cirrus Labs reserves the right to enforce quotas and usage limits (to any resources, including the API) at its sole discretion, -with or without notice, which may result in Cirrus Labs disabling or throttling your usage of the Service for any amount of time. - -### Service Policies and Privacy - -The Service shall be subject to the privacy policy for the Service available at [Privacy Policy](privacy.md), hereby -expressly into the Terms of Service by reference. You agree to the use of Your data in accordance with Cirrus Labs' privacy policies. - -### Fees for Use of the Service - -* The Service may be provided to You without charge up with certain limits or for a certain "trial" period of time. -* All payments for use of the Service will go through Stripe unless specified in the agreement. -* Cirrus Labs may change its fees and payment policies for the Service by notifying You at least thirty (30) days before the beginning of the billing cycle in which such change will take effect. - -### Cancellation and Termination - -* You must cancel your subscription via Stripe or my emailing sales@cirruslabs.org. -* You agree that Cirrus Labs, in its sole discretion and for any or no reason, may terminate or suspend Your subscription. You agree that any termination of Your access to the Service may be without prior notice, and You agree that Cirrus Labs will not be liable to You or any third party for such termination. - -### Customer Source Code - -* Cirrus Labs claims no ownership or control over any Customer Source Code. You retain copyright and any other rights You -already hold in the Customer Source Code and You are responsible for protecting those rights, as appropriate. -* You agree to assume full responsibility for configuring the Service to allow appropriate access to any Customer Source Code provided to the Service. -* You retain sole responsibility for any collaborators or third-party services that you allow to view Customer Source Code and entrust them at your own risk. -* Cirrus Labs is not responsible if you fail to configure, or misconfigure, your project and inadvertently allow unauthorized parties to view any Customer Source Code. - -### Ideas and Feedback - -You may choose to or we may invite You to submit comments or ideas about the Service, including but not limited to ideas -about improving the Service or our products ("Ideas"). By submitting any Idea, You agree that Your disclosure is unsolicited -and without restriction and will not place Cirrus Labs under any fiduciary or other obligation, and that we are free to -use the Idea without any additional compensation to You, and/or to disclose the Idea on a non-confidential basis or otherwise to anyone. - -### Modification of the Service - -* You acknowledge and agree that the Service may change from time to time without prior notice to You. -* Changes include, without limitation, changes to fee and payment policies, security patches, added or removed functionality, and other enhancements or restrictions. -* Cirrus Labs shall not be liable to you or to any third party for any modification, price change, suspension or discontinuance of the Service. - -### External Resources - -The Service may include hyperlinks to other websites or content or resources or email content. You acknowledge and -agree that Cirrus Labs is not responsible for the availability of any such external sites or resources, and does not -endorse any advertising, products or other materials on or available from such web sites or resources. - -### License from Cirrus Runners and Restrictions - -Subject to and conditioned upon your compliance with these Terms of Service, we grant to you a personal, worldwide, -royalty-free, non-assignable and non-exclusive license to use the software provided to You by Cirrus Labs as part of -the Service as provided to You by Cirrus Labs. This license is for the sole purpose of enabling You to use and enjoy -the benefit of the Service as provided by Cirrus Labs, in the manner permitted by the Terms. - -You may not (and You may not permit anyone else to): (a) copy, modify, create a derivative work of, reverse engineer, -decompile or otherwise attempt to extract the source code of the Service or any part thereof, unless this is expressly -permitted or required by law, or unless You have been specifically told that You may do so by Cirrus Labs, in writing -(e.g., through an open source software license); or (b) attempt to disable or circumvent any security mechanisms used by the Service. - -Open source software licenses for components of the Service released under an open source license constitute separate written agreements. -To the limited extent that the open source software licenses expressly supersede these Terms of Service, the open source licenses -govern Your agreement with Cirrus Labs for the use of the components of the Service released under an open source license. - -You may not use the Service in any manner that could damage, disable, overburden or impair our servers or networks, or -interfere with any other users' use or enjoyment of the Service. - -You may not attempt to gain unauthorized access to any of the Service, member accounts, or computer systems or networks, -through hacking, password mining or any other means. - -Without limiting anything else contained herein, you agree that you shall not (and you agree not to allow any third party to): - -* remove any notices of copyright, trademark or other proprietary rights contained in/on or accessible through the Service -or in any content or other material obtained via the Service; -* use any robot, spider, website search/retrieval application, or other automated device, process or means to access, -retrieve or index any portion of the Service; -* reformat or frame any portion of the web pages that are part of the Service; -* use the Service for commercial purposes not permitted under these Terms; -* create users by automated means or under false or fraudulent pretenses; -* attempt to defeat any security or verification measure relating to the Service; -* provide or use tracking or monitoring functionality in connection with the Service, including, without limitation, -to identify other users’ actions or activities; -* impersonate or attempt to impersonate Cirrus Labs or any employee, contractor or associate of Cirrus Labs, or any other -person or entity; or collect or store personal data about other users in connection with the prohibited activities described in this paragraph. - -### Our Copyright Dispute Policy - -Cirrus Labs respects the intellectual property of others and requires that our users do the same. It is our policy to -terminate the membership of repeat infringers. If you believe that material or content residing on or accessible through -the Service infringes a copyright, please send a notice of copyright infringement containing the following information -to the Designated Copyright Agent listed below: - -* identification of the copyrighted work claimed to have been infringed, or, if multiple copyrighted works are covered -by a single notification, a representative list of such works; -* information reasonably sufficient to permit us to contact you, such as an address, telephone number, and an email address; -* a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law; -* a statement by you, made under penalty of perjury, that the above information in your notification is accurate and that -you are the copyright owner or are authorized to act on the copyright owner's behalf; and -* your physical or electronic signature. - -Our Designated Copyright Agent for notification of claimed infringement can be reached by email at: hello@cirruslabs.org. - -The Service may contain advertisements and/or links to other websites (“Third Party Sites”). Cirrus Labs does not endorse, -sanction or verify the accuracy or ownership of the information contained in/on any Third Party Site or any products or -services advertised on Third Party Sites. If you decide to leave the Site and navigate to Third Party Sites, or install -any software or download content from any such Third Party Sites, you do so at your own risk. Once you access a Third Party Site -through a link on our Site, you may no longer be protected by these Terms of Service and you may be subject to the terms -and conditions of such Third Party Site. You should review the applicable policies, including privacy and data gathering practices, -of any Third Party Site to which you navigate from the Site, or relating to any software you use or install from a Third Party Site. -Concerns regarding a Third Party Site should be directed to the Third Party Site itself. Cirrus Labs bears no responsibility for -any action associated with any Third Party Site. - -### Disclaimer of Warranties - -IF YOU ACCESS THE SERVICE, YOU DO SO AT YOUR OWN RISK. WE PROVIDE THE SERVICE “AS IS”, “WITH ALL FAULTS” AND “AS AVAILABLE.” -WE MAKE NO EXPRESS OR IMPLIED WARRANTIES OR GUARANTEES ABOUT THE SERVICE. TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE HEREBY -DISCLAIM ALL SUCH WARRANTIES, INCLUDING ALL STATUTORY WARRANTIES, WITH RESPECT TO THE SERVICE, INCLUDING WITHOUT LIMITATION -ANY WARRANTIES THAT THE SERVICE IS MERCHANTABLE, OF SATISFACTORY QUALITY, ACCURATE, FIT FOR A PARTICULAR PURPOSE OR NEED, -OR NON-INFRINGING. WE DO NOT GUARANTEE THAT THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SERVICE WILL BE EFFECTIVE, -RELIABLE OR ACCURATE OR WILL MEET YOUR REQUIREMENTS. WE DO NOT GUARANTEE THAT YOU WILL BE ABLE TO ACCESS OR USE THE SERVICE -(EITHER DIRECTLY OR THROUGH THIRD-PARTY NETWORKS) AT TIMES OR LOCATIONS OF YOUR CHOOSING. WE ARE NOT RESPONSIBLE FOR THE ACCURACY, -RELIABILITY, TIMELINESS OR COMPLETENESS OF INFORMATION PROVIDED BY ANY OTHER USERS OF THE SERVICE OR ANY OTHER DATA OR -INFORMATION PROVIDED OR RECEIVED THROUGH THE SERVICE. EXCEPT AS EXPRESSLY SET FORTH HEREIN, CIRRUS LABS MAKES NO WARRANTIES -ABOUT THE INFORMATION SYSTEMS, SOFTWARE AND FUNCTIONS MADE ACCESSIBLE BY OR THROUGH THE SERVICE OR ANY SECURITY ASSOCIATED -WITH THE TRANSMISSION OF SENSITIVE INFORMATION. CIRRUS LABS DOES NOT WARRANT THAT THE SERVICE WILL OPERATE ERROR-FREE, -THAT ERRORS IN THE SERVICE WILL BE FIXED, THAT LOSS OF DATA WILL NOT OCCUR, OR THAT THE SERVICE OR SOFTWARE ARE FREE OF -COMPUTER VIRUSES, CONTAMINANTS OR OTHER HARMFUL ITEMS. UNDER NO CIRCUMSTANCES WILL CIRRUS LABS, ANY OF OUR AFFILIATES, -DISTRIBUTORS, PARTNERS, LICENSORS, AND/OR ANY OF OUR OR THEIR DIRECTORS, OFFICERS, EMPLOYEES, CONSULTANTS, AGENTS, OR -OTHER REPRESENTATIVES BE LIABLE FOR ANY LOSS OR DAMAGE CAUSED BY YOUR RELIANCE ON INFORMATION OBTAINED THROUGH THE SERVICE. - -### Limitations on Liability - -YOUR SOLE AND EXCLUSIVE REMEDY FOR ANY DISPUTE WITH US IS THE CANCELLATION OF YOUR REGISTRATION. IN NO EVENT SHALL OUR -TOTAL CUMULATIVE LIABILITY TO YOU FOR ANY AND ALL CLAIMS RELATING TO OR ARISING OUT OF YOUR USE OF THE SERVICE, -REGARDLESS OF THE FORM OF ACTION, EXCEED THE GREATER OF: (A) THE TOTAL AMOUNT OF FEES, IF ANY, THAT YOU PAID TO UTILIZE -THE SERVICE OR (B) ONE HUNDRED DOLLARS ($100). IN NO EVENT SHALL WE BE LIABLE TO YOU (OR TO ANY THIRD PARTY CLAIMING -UNDER OR THROUGH YOU) FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES OR -ANY BODILY INJURY, EMOTIONAL DISTRESS, DEATH OR ANY OTHER DAMAGES ARISING FROM YOUR USE OF OR INABILITY TO USE THE SERVICE, -WHETHER ON-LINE OR OFF-LINE, OR OTHERWISE IN CONNECTION WITH THE SERVICE. THESE EXCLUSIONS APPLY TO ANY CLAIMS FOR LOST PROFITS, -LOST DATA, LOSS OF GOODWILL OR BUSINESS REPUTATION, COST OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, WORK STOPPAGE, -COMPUTER FAILURE OR MALFUNCTION, ANY OTHER COMMERCIAL DAMAGES OR LOSSES, OR ANY PERSONAL INJURY OR PROPERTY DAMAGES, -EVEN IF WE KNEW OR SHOULD HAVE KNOWN OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES OR JURISDICTIONS DO NOT ALLOW -THE EXCLUSION OR THE LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, IN SUCH STATES OR JURISDICTIONS, -OUR LIABILITY SHALL BE LIMITED TO THE EXTENT PERMITTED BY LAW. IF YOU ARE A CALIFORNIA RESIDENT, YOU WAIVE YOUR RIGHTS -WITH RESPECT TO CALIFORNIA CIVIL CODE SECTION 1542, WHICH SAYS "A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE -CREDITOR DOES NOT KNOW OR SUSPECT TO EXIST IN HIS FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH, IF KNOWN BY HIM -MUST HAVE MATERIALLY AFFECTED HIS SETTLEMENT WITH THE DEBTOR.” - -### Indemnification - -You agree to hold harmless and indemnify Cirrus Labs, and its subsidiaries, affiliates, officers, agents, employees, -advertisers, licensors, suppliers or partners (collectively "Cirrus Labs and Partners") from and against any -third party claim arising from or in any way related to (a) Your breach of the Terms, (b) Your use of the Service, -(c) Your violation of applicable laws, rules or regulations in connection with the Service, or (d) Your Customer Source Code, -including any liability or expense arising from all claims, losses, damages (actual and consequential), suits, judgments, -litigation costs and attorneys' fees, of every kind and nature. In such a case, Cirrus Labs will provide You with -written notice of such claim, suit or action. - -### Choice of Law and Dispute Resolution - -The Terms of Service shall be deemed to have been entered into and shall be construed and enforced in accordance with -the laws of the State of New York as applied to contracts made and performed entirely within New York, without giving -effect to any conflicts of law statutes. Any controversy, dispute or claim arising out of or related to the -Terms of Service or the Service shall be settled by final and binding arbitration to be conducted by an arbitration -tribunal in the State of New York and the County of New York, pursuant to the rules of the American Arbitration Association. -Any and all disputes that you may have with Cirrus Labs shall be resolved individually, without resort to any form of class action. - -### General Legal Terms - -The Terms constitute the whole legal agreement between You and Cirrus Labs and govern Your use of the Service and -completely replace any prior agreements between You and Cirrus Labs in relation to the Service. - -If any part of the Terms of Service is held invalid or unenforceable, that portion shall be construed in a manner -consistent with applicable law to reflect, as nearly as possible, the original intentions of the parties, and -the remaining portions shall remain in full force and effect. - -The failure of Cirrus Labs to exercise or enforce any right or provision of the Terms of Service shall not constitute -a waiver of such right or provision. The failure of either party to exercise in any respect any right provided for herein -shall not be deemed a waiver of any further rights hereunder. - -You agree that if Cirrus Labs does not exercise or enforce any legal right or remedy which is contained in the Terms -(or which Cirrus Labs has the benefit of under any applicable law), this will not be taken to be a formal waiver of -Cirrus Labs' rights and that those rights or remedies will still be available to Cirrus Labs. - -Cirrus Labs shall not be liable for failing or delaying performance of its obligations resulting from any condition -beyond its reasonable control, including but not limited to, governmental action, acts of terrorism, earthquake, fire, -flood or other acts of God, labor conditions, power failures, and Internet disturbances. - -We may assign this contract at any time to any parent, subsidiary, or any affiliated company, or as part of the sale to, -merger with, or other transfer of our company to another entity. - -This page was last updated on 02/03/2019. diff --git a/docs/licensing.md b/docs/licensing.md deleted file mode 100644 index 2cd5d3f..0000000 --- a/docs/licensing.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -hide: - - navigation -title: Licensing and Support -description: Free Tier with 100 CPU core limit. Very affordable Tiers for larger enterprises. ---- - -Both [Tart Virtualization](https://github.com/cirruslabs/tart) and [Orchard Orchestration](https://github.com/cirruslabs/orchard) -are licensed under [Fair Source License](https://fair.io/). Usage on personal computers including personal workstations is royalty-free, -but organizations that exceed a certain number of server installations (100 CPU cores for Tart and/or 4 hosts for Orchard) -will be required to obtain a paid license. - -??? note "Host CPU Core usage" - The virtual CPU cores of Tart VMs are not tied to specific physical cores of the host CPU. Instead, for optimal performance - Tart VMs will automatically try to balance compute between all available cores of the host CPU. As a result, - all performance and energy-efficient cores of the host CPU are always counted towards the license usage. - -## License Tiers - -By default, when no [license is purchased](#get-the-license), it is assumed that an organization is using a Free Tier license. -You can find the Free Tier license text in [Tart](https://github.com/cirruslabs/tart/blob/main/LICENSE) and [Orchard](https://github.com/cirruslabs/orchard/blob/main/LICENSE) repositories. - -Free Tier license has a 100 CPU core limit for Tart and 4 Orchard Workers limit for Orchard. - -??? info "Usage Scenarios Examples" - - Here are a few examples that fit into the free tier: - - - Using Tart on 12 Mac Minis with 8 CPUs each running up to 24 VMs in parallel. - - Creating an Orchard cluster of 4 Mac Studio workers with 24 CPUs each. - - Here are a few examples that do not fit into the free tier: - - - Using Tart on 13 Mac Minis with 8 CPUs each. - - Creating an Orchard cluster of 5 Mac Minis workers with 8 CPUs each. - -### Gold Tier - -If an organization wishes to exceed the limits of the Free Tier license, a purchase of the [Gold Tier License](#get-the-license) is required, which costs \$12,000 per year. - -Gold Tier license has a 500 CPU core limit for Tart and 20 Orchard Workers limit for Orchard. - -### Platinum Tier - -If an organization wishes to exceed the limits of the Gold Tier license, a purchase of the [Platinum Tier License](#get-the-license) is required, which costs \$36,000 per year. - -Platinum Tier license has a 3,000 CPU core limit for Tart and 200 Orchard Workers limit for Orchard. - -### Diamond Tier - -For organizations that wish to exceed the limits of the Platinum Tier license, a purchase of a [custom Diamond Tier License](#get-the-license) is required, which costs \$12 per CPU core per year and gives the ability to run unlimited Orchard Workers. - -## Get the license - -If your organization is interested in purchasing one of the license tiers, please email [licensing@cirruslabs.org](mailto:licensing@cirruslabs.org). - -You can see a template of a license subscription agreement [here](assets/TartLicenseSubscription.pdf). - -!!! info "Running on AWS?" - - There are [official AMIs for EC2 Mac Instances](https://aws.amazon.com/marketplace/pp/prodview-qczco34wlkdws) - with preconfigured Tart installation that is optimized to work within AWS infrastructure. - - Additionally, there is a [ECR Pulic Gallery mirror](https://gallery.ecr.aws/cirruslabs/macos) of all the - [Tart VM images managed by us](https://github.com/cirruslabs/macos-image-templates). - -## General Support - -The best way to ask general questions about particular use cases is to email our support team at [support@cirruslabs.org](mailto:support@cirruslabs.org). -Our support team is trying our best to respond ASAP, but there is no guarantee on a response time unless your organization -has a paid license subscription which includes [Priority Support](#priority-support). - -If you have a feature request or noticed lack of some documentation please feel free to [create a GitHub issue](https://github.com/cirruslabs/tart/issues/new). -Our support team will answer it by replying to the issue or by updating the documentation. - -## Priority Support - -In addition to the general support we provide a *Priority Support* with guaranteed response times included in all the paid license tiers. - -| Severity | Support Impact | First Response Time SLA | Hours | How to Submit | -|----------|-----------------------------------------------------------------------------------------------|-------------------------|-------|--------------------------------------------------------------------------------------------------| -| 1 | Emergency (service is unavailable or completely unusable). | 30 minutes | 24x7 | Please use urgent email address. | -| 2 | Highly Degraded (Important features unavailable or extremely slow; No acceptable workaround). | 4 hours | 24x5 | Please use priority email address. | -| 3 | Medium Impact. | 8 hours | 24x5 | Please use priority email address. | -| 4 | Low Impact. | 24 hours | 24x5 | Please use regular support email address. Make sure to send the email from your corporate email. | - -`24x5` means period of time from 9AM on Monday till 5PM on Friday in EST timezone. - - -??? note "Support Impact Definitions" - * **Severity 1** - Your installation of Orchard is unavailable or completely unusable. An urgent issue can be filed and - our On-Call Support Engineer will respond within 30 minutes. Example: Orchard Controller is showing 502 errors for all users. - * **Severity 2** - Orchard installation is Highly Degraded. Significant Business Impact. Important features are unavailable - or extremely slowed, with no acceptable workaround. - * **Severity 3** - Something is preventing normal service operation. Some Business Impact. Important features of Tart or Orchard - are unavailable or somewhat slowed, but a workaround is available. - * **Severity 4** - Questions or Clarifications around features or documentation. Minimal or no Business Impact. - Information, an enhancement, or documentation clarification is requested, but there is no impact on the operation of Tart and/or Orchard. - -!!! info "How to submit a priority or an urgent issue" - Once your organization [obtains a license](#license-tiers), members of your organization - will get access to separate support emails specified in your subscription contract. diff --git a/docs/orchard/deploying-controller.md b/docs/orchard/deploying-controller.md index abb47cd..e1f0b6b 100644 --- a/docs/orchard/deploying-controller.md +++ b/docs/orchard/deploying-controller.md @@ -2,7 +2,7 @@ Compared to Worker, which can only be deployed on a macOS machine, Controller can be also deployed on Linux. -In fact, we've made a [container image](https://github.com/cirruslabs/orchard/pkgs/container/orchard) to ease deploying the Controller in container-native environments such as Kubernetes. +In fact, we've made a [container image](https://github.com/orgs/cirruslabs/packages/container/package/orchard) to ease deploying the Controller in container-native environments such as Kubernetes. Another thing to keep in mind that Orchard API is secured by default: all requests must be authenticated with the credentials of a service account. When you first run Orchard Controller, a `bootstrap-admin` service account will be created automatically and credentials will be printed to the standard output. diff --git a/docs/orchard/integration-guide.md b/docs/orchard/integration-guide.md index e5b61eb..9b5bf4f 100644 --- a/docs/orchard/integration-guide.md +++ b/docs/orchard/integration-guide.md @@ -1,4 +1,4 @@ -Orchard has a REST API that follows [OpenAPI specification](https://swagger.io/specification/) and is described in [`api/openapi.yaml`](https://github.com/cirruslabs/orchard/blob/main/api/openapi.yaml). +Orchard has a REST API that follows [OpenAPI specification](https://swagger.io/specification/) and is described in [`api/openapi.yaml`](https://github.com/openai/orchard/blob/main/api/openapi.yaml). You can run `orchard dev` locally and navigate to `http://127.0.0.1:6120/v1/` for interactive documentation. diff --git a/docs/orchard/managing-cluster.md b/docs/orchard/managing-cluster.md index d1ac6e2..d835c7f 100644 --- a/docs/orchard/managing-cluster.md +++ b/docs/orchard/managing-cluster.md @@ -10,7 +10,7 @@ Since the Orchard's initial release, we've managed to maintain the backwards com In case a new functionality is introduced, you might be required to finish the upgrade of both the Controller and the Worker(s) to be able to use it fully. -In case there will be backwards-incompatible changes introduced in the future, we will try to do our best and highlight this in the [release notes](https://github.com/cirruslabs/orchard/releases) accordingly. +In case there will be backwards-incompatible changes introduced in the future, we will try to do our best and highlight this in the [release notes](https://github.com/openai/orchard/releases) accordingly. ## Observability diff --git a/docs/orchard/quick-start.md b/docs/orchard/quick-start.md index b7f3c1c..7d02c47 100644 --- a/docs/orchard/quick-start.md +++ b/docs/orchard/quick-start.md @@ -1,6 +1,6 @@ Tart is great for running workloads on a single machine, but what if you have more than one computer at your disposal and -a couple of VMs is not enough anymore for your needs? This is where [Orchard](https://github.com/cirruslabs/orchard) +a couple of VMs is not enough anymore for your needs? This is where [Orchard](https://github.com/openai/orchard) comes in to play! It allows you to orchestrate multiple Tart-capable hosts from either an Orchard CLI (which we demonstrate below) @@ -92,10 +92,9 @@ orchard delete vm tahoe-base 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](../licensing.md), set this variable to `gold` to increase the limit to 20 Orchard Workers. And if you've purchased a [Platinum Tier License](../licensing.md), set this variable to `platinum` to increase the limit to 200 Orchard Workers. | -| `ORCHARD_URL` | Override controller URL on per-command basis. | -| `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. | +| Variable name | Description | +|---------------------------------|------------------------------------------------------------------------------------------------------------------| +| `ORCHARD_HOME` | Override Orchard's home directory. Useful when running multiple Orchard instances on the same host and testing. | +| `ORCHARD_URL` | Override controller URL on a per-command basis. | +| `ORCHARD_SERVICE_ACCOUNT_NAME` | Override service account name (used for controller API auth) on a per-command basis. | +| `ORCHARD_SERVICE_ACCOUNT_TOKEN` | Override service account token (used for controller API auth) on a per-command basis. | diff --git a/docs/orchard/using-orchard-cli.md b/docs/orchard/using-orchard-cli.md index 8ba5db8..8f2a8ce 100644 --- a/docs/orchard/using-orchard-cli.md +++ b/docs/orchard/using-orchard-cli.md @@ -6,7 +6,7 @@ The easiest way to install Orchard CLI is through the [Homebrew](https://brew.sh brew install cirruslabs/cli/orchard ``` -Binaries and packages for other architectures can be found in [GitHub Releases](https://github.com/cirruslabs/orchard/releases). +Binaries and packages for other architectures can be found in [GitHub Releases](https://github.com/openai/orchard/releases). ## Setting up a context diff --git a/docs/quick-start.md b/docs/quick-start.md index 68b1ef2..ac33666 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -17,7 +17,7 @@ tart run tahoe-base It's also possible to manually install `tart` binary from the latest released archive: ```bash - curl -LO https://github.com/cirruslabs/tart/releases/latest/download/tart.tar.gz + curl -LO https://github.com/openai/tart/releases/latest/download/tart.tar.gz tar -xzvf tart.tar.gz ./tart.app/Contents/MacOS/tart clone ghcr.io/cirruslabs/macos-tahoe-base:latest tahoe-base ./tart.app/Contents/MacOS/tart run tahoe-base @@ -27,7 +27,7 @@ tart run tahoe-base to pick `tart.app/Contents/embedded.provisionprofile` for elevated privileges that Tart needs.

- +

## VM images @@ -74,7 +74,7 @@ tart set ubuntu --disk-size 50 tart run ubuntu ``` -These Linux images can be ran natively on [Vetu](https://github.com/cirruslabs/vetu), our virtualization solution for Linux, assuming that Vetu itself is running on an `arm64` machine. +These Linux images can be run natively on [Vetu](https://github.com/openai/vetu), a virtualization solution for Linux, assuming that Vetu itself is running on an `arm64` machine. Similarly to macOS, there's also a [full list of images](https://github.com/orgs/cirruslabs/packages?repo_name=linux-image-templates) in which you can discovery specific tags (e.g. `ghcr.io/cirruslabs/ubuntu:22.04`) and [Linux-specific Packer templates](https://github.com/cirruslabs/linux-image-templates) that were used to generate these images. diff --git a/docs/theme/overrides/home.html b/docs/theme/overrides/home.html index 38a5e8d..9d77daa 100644 --- a/docs/theme/overrides/home.html +++ b/docs/theme/overrides/home.html @@ -1,11 +1,5 @@ {% extends "base.html" %} -{% block announce %} - - ️🎉🎉🎉️  Big milestone for Cirrus Labs — we’re joining OpenAI to work on Agent Infrastructure  🎉🎉🎉 - -{% endblock %} - {% block tabs %} {{ super() }} @@ -191,7 +185,7 @@ />
-

Run at scale with Orchard

+

Run at scale with Orchard

Tart toolset includes Orchard Orchestration — tool to run and manage Tart virtual machines at scale on a cluster of Apple Silicon hosts. An Orchard Cluster exposes a simple REST API to @@ -220,7 +214,7 @@