Commit Graph

59 Commits

Author SHA1 Message Date
Nikolay Edigaryev 54a321df7f
Sort "tart list" by default (#94) 2022-05-19 15:05:16 -04:00
Fedor Korotkov b3695c8406
Log output of hooks (#92) 2022-05-19 19:37:04 +03:00
Fedor Korotkov 0a257a1547
Option to run in recovery mode (#91)
* Option to run in recovery mode

* Fixed typo

* Use Dynamic package to call private APIs

* Improved comment

* Move options closer to invocation
2022-05-19 08:17:05 -04:00
Nikolay Edigaryev 60c15e3e49
tart list: fix heading order (#90) 2022-05-18 14:20:52 -04:00
Fedor Korotkov a1bcbdbf0b
Bump default CPU cores (#86)
To prevent frustrations like #68
2022-05-18 18:12:45 +03:00
Fedor Korotkov 7fec41b2cb
Document VM location on disk (#87)
Fixes #68
2022-05-18 18:01:13 +03:00
Fedor Korotkov ea4fb9a2d5
Add Geekbench report link (#83)
Fixes #82
2022-05-17 15:20:04 -04:00
Nikolay Edigaryev c2da3fd919
Support "tart --version" (#81)
* Support "tart --version"

* Move CI.swift patcher into a separate script

Otherwise it doesn't work in GoReleaser.
2022-05-17 10:40:21 -04:00
Fedor Korotkov 63a2793c32
Support upper case in remote names (#79) 2022-05-16 18:14:42 +03:00
Fedor Korotkov 0fc3d3d1f4
Add virtual sound devices (#78) 2022-05-16 17:21:21 +03:00
Nikolay Edigaryev 60b705478b
Handle Ctrl + C properly (#73)
* Terminate when Ctrl+C is encountered when entering credentials

* Handle Ctrl+C by catching SIGINT and converting it to task cancellation

* maxCharacters instead of (buf.count - 2)

* readStdinCredential: fix maxCharacters to be 255

* "user" variable should be named "credential"
2022-05-16 09:56:30 -04:00
Nikolay Edigaryev fa9e3146c1
tart list: filter out uninitialized VM directories (#76) 2022-05-16 08:30:58 -04:00
Nikolay Edigaryev 3dfe8f870c
Provide more details when VM's network attachment disconnects (#74) 2022-05-16 08:23:34 -04:00
Fedor Korotkov 7afa446a73
Change default disk size upon creation (#71)
To help with frustrations like https://github.com/cirruslabs/tart/issues/44#issuecomment-1126831261

Experts will still use `--disk-size` flag to tailor disk size for their needs.
2022-05-16 09:44:31 +03:00
Nikolay Edigaryev d1bed25023
tart pull: be more liberal when accepting local image as argument (#70)
* tart pull: be more liberal when accepting local image as argument

* Update Sources/tart/Commands/Pull.swift

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>

* Single sentence and consistent capitalization

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
2022-05-15 18:03:15 -04:00
Fedor Korotkov b39c3c9b52
Reworked CI integration documentation (#69)
It was a bit confusing to folks not familiar with Cirrus CLI. Reworked the documentation to better introduce Cirrus CLI.
2022-05-15 13:25:25 +03:00
Nikolay Edigaryev 8554e56e4b
Registry: use issued_at field in the token response message (#65)
* Registry: use issued_at field in the token response message

* Configure JSONDecoder instead of the Decodable itself
2022-05-12 22:33:02 +03:00
Nikolay Edigaryev 3fdcc5c33c
.goreleaser(brews): depend on macOS Monterey (#64)
* .goreleaser(brews): depend on macOS Monterey

* README.md: mention that macOS Monterey or later is required
2022-05-12 00:42:12 +03:00
Austin Culter 182ddf0268
Minor typo: 'reposiotry' > 'repository' (#61)
On the tin.
2022-05-10 17:16:03 -04:00
Fedor Korotkov 24375c24f3
Print total size of compressed layers (#60)
Before pulling an image.
2022-05-10 16:20:52 -04:00
Fedor Korotkov 4ebec53c77
Two more FAQs (#58)
* Two more FAQs

* Better summary

* Another clarification
2022-05-10 23:13:17 +03:00
Fedor Korotkov 2f5a6790d8
Refactored registry token handling (#57)
* Refactored registry token handling

* Update Sources/tart/OCI/Registry.swift

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* Target our dedicated M1 Mini

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
2022-05-09 16:13:22 +03:00
Fedor Korotkov cc697b4f6e
More images in docs (#56)
* More images in docs

* More images in docs

* Updated GIF
2022-05-09 12:59:51 +03:00
Nikolay Edigaryev f6acbe8fe5
Registry: invalidate expired tokens (#55) 2022-05-08 19:46:11 -04:00
Fedor Korotkov 341fd168b3
Fixed release build entitlements (#54) 2022-05-08 13:05:10 +03:00
Fedor Korotkov e8a6efa60a
Return title to docs (#53)
* Return title to docs

* smaller
2022-05-07 11:24:25 +03:00
Fedor Korotkov efc9c74b6c
Report if an image already pulled (#52) 2022-05-06 17:06:28 -04:00
Fedor Korotkov f712ba8ce3
Proper documentation (#49)
* WIP proper docs

* Update README.md

* wip

* More updates

* Apply suggestions from code review

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* Use GitHub Packages links

* Promote Cirrus CLI first and then mentioned Cirrus CI

* Apply suggestions from code review

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
2022-05-06 23:59:33 +03:00
Nikolay Edigaryev 4a60c41dd3
Registry: provide response body on auth token request failure (#51)
* Registry: provide response body on auth token request failure

* Clone.swift: fix typo
2022-05-06 14:19:27 -04:00
Fedor Korotkov f20a98bf01
Smart generation of new MAC addresses (#45)
* Introduce --new-mac-address flag for Clone command

Related to https://github.com/cirruslabs/tart/issues/20#issuecomment-1116732505

* Smart generation of new MAC addresses
2022-05-06 20:38:56 +03:00
Nikolay Edigaryev d5e3a7718e
Registry: suport pulling public images (#50) 2022-05-06 20:30:04 +03:00
Nikolay Edigaryev a4db60d656
Registry: don't loose query parameters on URL absolutization (#47)
* Registry: don't loose query parameters on URL absolutization

* Registry: throw a proper exception when Location header parsing fails
2022-05-06 09:03:58 -04:00
Fedor Korotkov 29e08220e4
Get OCI credentials only when needed (#46)
So we don't even request them for a public image
2022-05-06 02:12:38 +03:00
Fedor Korotkov cdf4932aa3
Improved logging a bit (#43)
* Improved logging a bit

* Progress for all bytes
2022-05-05 10:43:09 -04:00
Nikolay Edigaryev 95316c0d67
Support pulling/pushing VMs to OCI-compatible registries (#32)
* Support pulling/pushing VMs to OCI-compatible registries

* Registry: rename request() to endpointRequest() for clarity

* Registry: include JSON details on HTTP status code mismatch errors

* .cirrus.yml: run tests

* Fix testDigest

* Registry: set Content-{Length,Type} headers when pushing blob

* Refactor Registry.auth() and enrich RegistryError.AuthFailed

* Remove useless comment

* Fix WWWAuthenticate a bit and add tests

* WWWAuthenticate: expect a Bearer scheme

* Registry.auth(): document the passing of ["scope", "service"] parameters

* Clarify unexpected HTTP code error when retrieving auth token

* Make RemoteName parser more relaxed for now

* tart clone: pull the VM if it's OCI-based first

* VMStorageOCI: ensure the old symbolic link is overwritten

* tart push: support multiple remote VM names

* Logging: push/pull progress

* Use 500 MB chunks (instead of 500 MiB) to evenly cut disk

...which also uses powers of 10.

* Credentials: only read credentials labeled "Tart Credentials"
2022-05-03 14:30:26 -04:00
Fedor Korotkov 4a5efefbc9
Embed AppIcon.png within binary (#30)
* Build product explicitly

Without it resources are not embedded in the executable

* Embed icon in code
2022-04-22 10:29:52 +03:00
Fedor Korotkov f07ffed6c8
--wait option for IP command (#29) 2022-04-19 19:56:59 +03:00
fedor 4ca7787958 Added config release 2022-04-18 11:44:29 -04:00
Fedor Korotkov 8b5b0536b7
Fixed env variable name 2022-04-18 11:24:42 -04:00
Fedor Korotkov d55e5457f9
Make the disk size configurable upon creation (#26)
* Make the disk size configurable upon creation

I haven't found a way to make a VM aware of a larger disk size. So I didn't add `--disk-size` option to `set` command.

* Fixed size so it's pretty in the UI

* Hidden option to resize disk for testing
2022-04-18 17:46:19 +03:00
Fedor Korotkov 609a2530dd
Use GoReleaser for releases (#27) 2022-04-18 16:33:10 +03:00
Fedor Korotkov ad2db1461f
Update App Icon (#28) 2022-04-17 13:52:54 +03:00
Fedor Korotkov cc31388c1b
Renamed disk file (#24)
.img is a standard extension for disk images on macOS. With this extension clicking on the file in finder it will be open in Dick Utilities for inspection.
2022-04-14 22:49:38 +03:00
Fedor Korotkov e100cc0d7f
Add App Icon (#23) 2022-04-14 13:23:21 -04:00
Fedor Korotkov 75b5d63387
Refactored UI (#22)
* Simplified crafting of a VM config

* Configure display

* Propagate VM name to the title
2022-04-13 16:42:27 -04:00
Nikolay Edigaryev 466c3c568a
Add ability to modify VM's configuration (number of CPUs and memory size) (#16)
* VMConfig: store minimum CPU count and memory size separately

* Add ability to modify VM's configuration

* Enforce minimum CPU and memory requirements

* VMConfig: remove migration logic
2022-04-11 13:39:34 +03:00
Fedor Korotkov 9f8d3017d9
Handle incomplete MAC address (#15) 2022-03-29 12:07:03 -04:00
Fedor Korotkov 49d430b3c4
Update dependencies and styles (#12)
* Update deps and .editorconfig

* run config
2022-03-24 18:54:49 +03:00
Fedor Korotkov dc1e502404
Logger (#11)
* Log progress

* ProgressObserver

* Reverted run configuration

* Cache *.ipsw files

* Use fraction

* Use datatask and pre-create cache folder
2022-03-22 22:17:23 -04:00
Fedor Korotkov 483627904c
Swift package simplified (#7)
* Convert project to a Swift Package

* SwiftEntitlementsPlugin

* Include .swiftpm

* Removed plugin

* Run configuration to run signed binary

* Cirrus CI Configuration

* Fixed worker label
2022-03-07 11:46:49 -05:00