Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Caching folder/system for ISO #567

Open
LeeNX opened this issue Jun 6, 2024 · 9 comments
Open

[Feature]: Caching folder/system for ISO #567

LeeNX opened this issue Jun 6, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@LeeNX
Copy link

LeeNX commented Jun 6, 2024

Is your proposal related to a problem?

Not a problem with this awesome tool, but with slow internet access.

Describe the solution you'd like.

If a shared folder where downloading isos could be downloaded and saved within dockur/windows or even checked if the iso already exists.

Describe alternatives you've considered.

I am aware and used the custom.iso workaround, but I have to manage this per instances and think other people testing installs might find this useful too.

Additional context

Could save quite a bit of bandwidth for users and providers of the isos, even if most people have access to quick internet.

Thanks for an most wicked tool. Never believed I would install so many Windows for testing than I have done in the last few days.

@LeeNX LeeNX added the enhancement New feature or request label Jun 6, 2024
@luisgmuniz
Copy link
Contributor

I would suggest this should be handled at the readme. Something similar to:

If you want to download the ISO beforehand, you can use Mido:

wget https://raw.githubusercontent.com/ElliotKillick/Mido/main/Mido.sh
chmod a+x Mido.sh
./Mido.sh --help 

@luisgmuniz
Copy link
Contributor

...the other approach could be to use directly the needed code, taken from the scripts under src/*.sh:

. src/define.sh
. src/mido.sh
set +eu
VERSION="win81"
LANGUAGE="English"
parseVersion
parseLanguage
downloadImage "${VERSION//\//}.iso" "$VERSION" "$LANGUAGE"

This also could be in the readme. Maybe, even a small wrapper could be written.

This being said, I think the previous one is a much more reasonable approach.

Advantages of this approach:

  • You don't need "external software"

Disadvantages:

  • Everything else :-)
  • Not easy if you're not used to shell scripting
  • No error handling. As an example, I tried to download the "Spanish" version of "win81"; as long as neither the error nor the info functions were available (where are those defined?) it took me a while to realize trace that I was blocked by IP, and that that version/language has no mirror available.

@kroese
Copy link
Contributor

kroese commented Jun 7, 2024

You can also just start the container and wait until the download is complete, and copy it from the /storage folder. Its even possible to set:

environment:
  REMOVE: "N"

this will preserve the .ISO in the /storage folder even after the installation is finished.

Maybe another variable can be added, that automaticly exits the container after the download, so that you dont need to stop manually. But to be honest I dont think many people will need that.

@LeeNX
Copy link
Author

LeeNX commented Jun 7, 2024

Thanks for all the feedback and options. I basically did the pull the download iso out of the /storage/tmp folder while installing, from a remote PC that does not have the ISO downloads throttled. Still took a few hours to rsync the ISO to my local machine.

Somebody really serious would just setup a download proxy, I am sure.

I might still poke at this. Thinking having a folder with the ISOs, that are used instead of download seems easy enough, but I would need to roll my sleeves up and get stuck in.

@kroese
Copy link
Contributor

kroese commented Jun 7, 2024

@LeeNX I think there are many existing proxy-servers that have the feature to act as a local caching server. The advantage would be that it would not only apply just to this specific container, but automaticly to all other software on your machine.

I am really afraid by implementing a feature like that in this container, we would essentially be re-inventing the wheel. As soon we would have to be adding features like cache-expiry, disk-quotas, etc. Its better to leave those tasks to other projects that are dedicated to that job. So my suggestion is to install a third-party proxy and then configure your Docker container to use that proxy.

@LeeNX
Copy link
Author

LeeNX commented Jun 7, 2024

Thanks @kroese, but that was not me saying implement a proxy, I was just noting that somebody would already have a proxy service.

I am more thinking about shared folder of ISOs, before downloading, check if that ISOs is not already downloaded, if the size and checksum is correct, use that ISO instead of downloading again.

But until I put in a PR that has some tested, it's just an idea and there are more than at least two ways to get by.

@LeeNX
Copy link
Author

LeeNX commented Jun 7, 2024

See if I can add a note in the readme.md adding a way to re-use downloaded ISOs with the env REMOVE: "N" setting.

@kroese
Copy link
Contributor

kroese commented Jun 7, 2024

@LeeNX Sorry, I misread what you said. But if someone wants to have a shared library of ISO's, it's probably because they want to roll out multiple instances of Windows. But in that case, it's much more efficient/quicker to also skip the whole installation. Which can be done by just copying the whole /storage folder to another location. That way you dont even need any ISO's anymore, because you are copying the pre-installed hard drive image instead. So is that not an option in your case?

@LeeNX
Copy link
Author

LeeNX commented Jun 7, 2024

Again, thank you @kroese, giving me pretty good ideas of other use cases.

I can see how bring up another instance could reduce deployment time by using pre-setup instance, it would just take a bit of space.

My use case is that I get feedback on some tool not working on X OS. Been able to bring up a clean and quick image is my use case. For Linux I have used Vagrant, but been using docker images more and more of late. This fits quite nicely for my disposable Windows OS testing.

Thanks for all the useful feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants