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

Configurable package mirrors #156

Closed
daenney opened this issue Feb 17, 2014 · 5 comments
Closed

Configurable package mirrors #156

daenney opened this issue Feb 17, 2014 · 5 comments

Comments

@daenney
Copy link
Member

daenney commented Feb 17, 2014

It would be really nice if Beaker could get a feature where people can expose their preferred package mirrors and have the host reconfigured to use those.

Right now the Debian Puppet Labs images all use http.us.debian.org which from the Netherlands is painfully slow, it takes about 2m alone to fetch that index. If I compare that to ftp.nl.debian.org I'm done in 10sec and that's mostly because the buffer is still being flushed. You can guess how those numbers scale when it actually starts fetching all the stuff it needs for Rubygems, compilers etc.

I've got an evil shell() with a nice sed -i that takes care of the issue right now but it's fiddly as depending on wether it is Debian or Ubuntu a different mirror needs to be set, it all becomes really nasty.

What I'd like is a hook of some sort to reconfigure package mirrors based on a list I provide or automate it by detecting the user's location through something like http://ipinfo.io and the country key it returns.

@anodelman
Copy link
Contributor

I believe that this PR covers this issue:

#273

@daenney
Copy link
Member Author

daenney commented May 28, 2014

Hmm, yes and no. That configures a proxy, so I'd have to run the proxy myself but it would still be fetching from http.us instead of ftp.nl in my case. I can probably do some URL rewriting/matching in my proxy.

@anodelman
Copy link
Contributor

Did you find an appropriate workaround for this?

We've also updated proxying here (to ensure that it runs before SUT validation/configuration):
#518

@daenney
Copy link
Member Author

daenney commented Nov 5, 2014

I don't have a good solution for this. Essentially I'd need to add a layer to the Puppet Labs images that just do the right thing or stick with my evil sed. The other way would be to use Puppet itself and our apt module to reconfigure the host before Beaker triggers to update the package manager.

@anodelman
Copy link
Contributor

I think that using a shell/sed as a pre-suite step makes sense in this situation. We do not provide localized images for testing, and beaker is not responsible for configuring images - so this type of tweak is an excellent candidate for a custom pre-suite configuration step.

I'm going to close this out as we are not going to be taking any additional steps here.

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

No branches or pull requests

2 participants