MicrosoftEdge / dev.microsoftedge.com-vms

Scripts used to generate the free VMs available at https://dev.microsoftedge.com
MIT License
81 stars 22 forks source link

Fix Vagrant boxes so they are DIRECTLY usable #27

Open dragon788 opened 4 years ago

dragon788 commented 4 years ago

Fixes #15 and should make developers 100x more likely to actually use it

msftclas commented 4 years ago

CLA assistant check
All CLA requirements met.

dragon788 commented 4 years ago

@molant are you a maintainer on this?

dragon788 commented 4 years ago

With this a user can simply supply config.vm.box_url: https://aka.ms/msedge.win10.vagrant instead of having to curl $URL -o vagrant.box.zip ; unzip vagrant.box.zip; vagrant box add --name ARGH ./vagrant.box or do really gross things inside the Vagrantfile.

dragon788 commented 4 years ago

@molant Hopefully your time off was well spent and you can take a look at this soon.

This may also help with #22 if we can figure out who owns it and update the URL to simply point to https://aka.ms/msedge.win10.vagrant and then the box doesn't necessarily need to be "versioned" on the VagrantUp site (though that would be nice for users to be able to know reliably that they have the right/latest version).

I also forgot to add that this should fix the vagrant box add --name msedge.win10 https://aka.ms/msedge.win10.vagrant style usage as well.

molant commented 4 years ago

Thanks for your submission @dragon788 and being patient with me.

Last time I tried to do something with .box I had problems on the CDN side so before I merge this into master I'll have to run everything locally and find out what was going on. Unfortunately, I have to reinstall the machine I used to do this and also 🤞 that nothing has changed on the Windows install process since then.

Also keep in mind that even though the scripts automate quite a lot, releasing a new version of the machines takes quite a bit of time and it's not very high at the moment in the priority list with all the work we are doing on the new version of Edge 😓

I'll circle back internally to see if there are cycles or someone that can do a release for the next version of Windows which should be soon-ish.

dragon788 commented 4 years ago

I have a feeling that when it's uploaded to blob storage the .box extension doesn't match any known mime types so it may need to have that set explicitly to zip since that's the internal binary structure that uses.

I'll try to take a look at the deploy script and see if I can find the right spot to set that since the rest are also zips there is no harm in being explicit.

https://stackoverflow.com/a/29539722/3794873

dragon788 commented 4 years ago

Ok, so for AzCopy v8 we'll need something like /SetContent=application/zip or for AzCopy v10+ we'll need --content-type application/zip.

https://github.com/MicrosoftEdge/dev.microsoftedge.com-vms/blob/f61e112dc7bbb1ab8fce0e8a852237e090141a36/scripts/vmgen.ps1#L307

molant commented 4 years ago

Thanks for looking into this @dragon788

yeroc commented 4 years ago

@molant Any chance of getting some movement on this?

molant commented 4 years ago

Unfortunately I don't think so. I switched teams and with the switch to Chromium VMs are not very high in the priority list. @kypflug anything that can be done regarding the VMs? One last set with this changes?

dragon788 commented 4 years ago

@kypflug @molant my change doesn't affect any of the box build process other than skipping an unnecessary layer of archiving only for Vagrant.

I could additionally add the changes to define the content type for the .box if that makes it easier to approve and test the publishing process.

I've been working with Windows in Vagrant quite a bit recently and there is a lot of interest in having an official Windows box available from the list at VagrantCloud even if it was hosted elsewhere, especially since the Windows 10 versions of the modern.ie VMs are now so far out of date that a developer who wants to test Windows 10 shouldn't really use it because it can't be updated to a current supported release of Windows.

I have an idea on improving this process and making it less of a burden for anyone at Microsoft to maintain but I probably need to talk to a product owner for modern.ie or developer enablement like Microsoft Dev Essentials.

chkpnt commented 4 years ago

Until the boxes provided by Microsoft are more usabale out-of-the-box, you may want to check out my little helper: https://github.com/chkpnt/MSEdge-Vagrant

It's just a Vagrantfile and and a provisioning-script, which helps to prepare the box for the actual usage (keyboard, timezone, dark mode, hosts).

grafik