tomjn / vagrant-tart-ruby

Tart provider for vagrant using Ruby API
MIT License
16 stars 1 forks source link

The genesis Tart base box #3

Open tomjn opened 1 year ago

tomjn commented 1 year ago

We need an initial primordial box to work with, ideally one for Intel and one for Arm.

Ideally this is done by starting up an ubuntu installer manually, then manually running the scripts that Bento boxes use to insert things like the insecure SSH key etc.

A vagrantfile needs writing too to add the metadata that vagrant expects

tomjn commented 1 year ago

A zip file with a metadata.json:

https://github.com/tomjn/vagrant-tart-ruby/issues/1#issuecomment-1366057224

Details on what's necessary for a base box are at:

https://developer.hashicorp.com/vagrant/docs/boxes/base

We can also optionally include an info.json to add an author and URL for when vagrant CLI is printing box information:

https://developer.hashicorp.com/vagrant/docs/boxes/info#box-info

tomjn commented 1 year ago

I tried converting my test Ubuntu 22 VM into a suitable box:

Unfortunately I ran them in the wrong order and didn't check in advance, and broke the VM, looks like I'll have to re-run the Ubuntu 22 server install again.

It would be great if I can run Packer with chef/bento it would make things a lot easier/faster. My attempts to make the Tart packer repo run haven't had much success

tomjn commented 1 year ago

For testing with VVV we'd want an Ubuntu 20 box, but a basic Ubuntu 22 box should allow more simple tests for feature development

tomjn commented 1 year ago

So I did not have much success with Ubuntu 20 LTS, lots of kernel panics, however I did succeed in the 22 LTS minimal server installer, and managed to download and grab the bento repo, run the scripts and craft a box file manually:

Screenshot 2023-02-12 at 15 17 13

The code to import it isn't there yet, but I see this as progress!

The contents of the zip are:

The resulting box lacks version metadata, but this is ok for now. I also suspect the checkout of the bento repo is still in the /home/root/bento which could shave a little bit of space off of the box size.

Also of note, running the bento scripts and minimise.sh reduced the VM export size from 1.9GB to ~650MB