Support for Tart #26

Open
opened 2023-11-20 10:59:39 +00:00 by cachito-worker · 4 comments

Act Version
Latest Release

Feature Description
Special thanks to @earl-warren for adding support for LXC to Act. This addresses the shortcomings of Systemd under Docker containers, a development I wholeheartedly endorse.

There is now a solution called Tart. Tart is a virtualization toolkit designed for building, running, and managing macOS and Linux virtual machines (VMs) on Apple Silicon. It is constructed by CI engineers based on your automation needs. Here are some highlights of Tart:

Tart utilizes Apple's own Virtualization.Framework to achieve near-native performance.
Pull/push VMs from any OCI-compliant container registry.
Automatically create VMs using Tart Packer plugins.
Seamless integration with any CI system.
For more details, visit https://tart.run/quick-start/. Tart supports features such as mounting directories and provides functions for creating and destroying containers. Are you interested in integrating it?

% tart --help
USAGE: tart <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  create                  Create a VM
  clone                   Clone a VM
  run                     Run a VM
  set                     Modify VM's configuration
  get                     Get a VM's configuration
  list                    List created VMs
  login                   Login to a registry
  logout                  Logout from a registry
  ip                      Get VM's IP address
  pull                    Pull a VM from a registry
  push                    Push a VM to a registry
  import                  Import VM from a compressed .tvm file
  export                  Export VM to a compressed .tvm file
  prune                   Prune OCI and IPSW caches or local VMs
  rename                  Rename a VM
  stop                    Stop a VM
  delete                  Delete a VM
  suspend                 Suspend a VM

  See 'tart help <subcommand>' for detailed help.

Try running Tart VM on Apple Silicon devices running macOS 13.0 (Ventura) or later (25 GB image download):

brew install cirruslabs/cli/tart
tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest sonoma-base
tart run sonoma-base

SSH Access
Access via SSH:

ssh admin@$(tart ip sonoma-base)

Use regular SSH connections and the tart ip command:

brew install sshpass
sshpass -p admin ssh -o "StrictHostKeyChecking no" admin@$(tart ip sonoma-base) "uname -a"
sshpass -p admin ssh -o "StrictHostKeyChecking no" admin@$(tart ip sonoma-base) < script.sh

Mounting Directories
To mount a directory, use the following parameter when running the VM with --dir:

tart run --dir=project:~/src/project vm

Here, "project" specifies the mount name, and "~/src/project" is the path to the host directory to expose to the VM.

You can also mount directories in read-only mode by adding a third parameter:

tart run --dir=project:~/src/project:ro vm

To mount multiple directories, repeat the --dir parameter for each directory:

tart run --dir=www1:~/project1/www --dir=www2:~/project2/www
Act Version Latest Release Feature Description Special thanks to @earl-warren for adding support for LXC to Act. This addresses the shortcomings of Systemd under Docker containers, a development I wholeheartedly endorse. There is now a solution called Tart. Tart is a virtualization toolkit designed for building, running, and managing macOS and Linux virtual machines (VMs) on Apple Silicon. It is constructed by CI engineers based on your automation needs. Here are some highlights of Tart: Tart utilizes Apple's own Virtualization.Framework to achieve near-native performance. Pull/push VMs from any OCI-compliant container registry. Automatically create VMs using Tart Packer plugins. Seamless integration with any CI system. For more details, visit https://tart.run/quick-start/. Tart supports features such as mounting directories and provides functions for creating and destroying containers. Are you interested in integrating it? ``` % tart --help USAGE: tart <subcommand> OPTIONS: --version Show the version. -h, --help Show help information. SUBCOMMANDS: create Create a VM clone Clone a VM run Run a VM set Modify VM's configuration get Get a VM's configuration list List created VMs login Login to a registry logout Logout from a registry ip Get VM's IP address pull Pull a VM from a registry push Push a VM to a registry import Import VM from a compressed .tvm file export Export VM to a compressed .tvm file prune Prune OCI and IPSW caches or local VMs rename Rename a VM stop Stop a VM delete Delete a VM suspend Suspend a VM See 'tart help <subcommand>' for detailed help. ``` Try running Tart VM on Apple Silicon devices running macOS 13.0 (Ventura) or later (25 GB image download): ``` brew install cirruslabs/cli/tart tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest sonoma-base tart run sonoma-base ``` SSH Access Access via SSH: ``` ssh admin@$(tart ip sonoma-base) ``` Use regular SSH connections and the tart ip command: ``` brew install sshpass sshpass -p admin ssh -o "StrictHostKeyChecking no" admin@$(tart ip sonoma-base) "uname -a" sshpass -p admin ssh -o "StrictHostKeyChecking no" admin@$(tart ip sonoma-base) < script.sh ``` Mounting Directories To mount a directory, use the following parameter when running the VM with --dir: ``` tart run --dir=project:~/src/project vm ``` Here, "project" specifies the mount name, and "~/src/project" is the path to the host directory to expose to the VM. You can also mount directories in read-only mode by adding a third parameter: ``` tart run --dir=project:~/src/project:ro vm ``` To mount multiple directories, repeat the --dir parameter for each directory: ``` tart run --dir=www1:~/project1/www --dir=www2:~/project2/www ```
Owner

Could you please translate this issue in English?

Could you please translate this issue in English?
cachito-worker changed title from 關於對tart的支持 to Support for Tart 2023-11-20 11:37:59 +00:00
Author

Could you please translate this issue in English?

ok

> Could you please translate this issue in English? ok
Author

I have tried Tart, and the official support for GitLab is currently available. However, based on the commands it provides, it seems to have similar functionality to LXC or Docker. In theory, integration along the lines of LXC should be possible. Tart is very user-friendly, and the speed of starting a VM is quite fast; I have tested it on GitLab. Therefore, I believe that integrating Tart into Act would be a perfect addition.

I have tried Tart, and the official support for GitLab is currently available. However, based on the commands it provides, it seems to have similar functionality to LXC or Docker. In theory, integration along the lines of LXC should be possible. Tart is very user-friendly, and the speed of starting a VM is quite fast; I have tested it on GitLab. Therefore, I believe that integrating Tart into Act would be a perfect addition.
Owner

As you have maybe seen, there is extensive end-to-end testing for act and the runner, in the https://code.forgejo.org/forgejo/end-to-end repository. Such testing is required to verify it works as expected and can only be done with Free Software building blocks, which Tart is not.

You are of course very welcome to add Tart support based on ACT. But such a change can't be merged because it can't be tested to work. I hope you understand.

As you have maybe seen, there is extensive end-to-end testing for act and the runner, in the https://code.forgejo.org/forgejo/end-to-end repository. Such testing is required to verify it works as expected and can only be done with Free Software building blocks, which Tart is not. You are of course very welcome to add Tart support based on ACT. But such a change can't be merged because it can't be tested to work. I hope you understand.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/act#26
No description provided.