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

Use Cache for Downloads #198

Open
mindrunner opened this issue Jan 18, 2017 · 4 comments · May be fixed by #451
Open

Use Cache for Downloads #198

mindrunner opened this issue Jan 18, 2017 · 4 comments · May be fixed by #451

Comments

@mindrunner
Copy link

Hi
I am provisioning OSX virtual machines with xcode-install. One of the longer Tasks is Downloading the XCode DMGs. I want to mount a shared folder where the files can be cached, so that not every VM has to trigger the download again. I tried setting XCODE_INSTALL_CACHE_DIR, but does not seem to work. My workaround at the moment is to manually Download and use '--url=' parameter pointing to the local file. Though, it then is copied to ~/Library/Cache or somewhere before mounting. How can I improve my solution?
Furthermore, how can I achieve same thing for all simulators?

@loyaltyarm
Copy link

Not sure of your use case, but are you able to use templates for your virtual machines? If so you could probably save time by provisioning a template and using a linked clone rather than re-provisioning each VM with xcode-install. This type of solution may not apply if you are doing this with something like VMWare Fusion.

@mindrunner
Copy link
Author

Thats not really an option. I want to create fresh machines from scratch. I found some work around by mounting a shared folder into the Cache-Folder inside the VM. This seems to be working for me and I provisioning is quite a bit faster now. :)

@loyaltyarm
Copy link

Ah okay. You could alternatively use a server like munki to have these cached on your local network and bootstrap from that endpoint on boot of a fresh machine. Munki also allows for something similar where the resulting payload from a package check-in payload would end up in /Library/Managed Installs/Cache and you could install from there. It would be similar to your solution above, but would save you the mounting step, and add a munki tooling install into your VM provisioning. Happy to chat on the #fastlane slack team if you're around regarding your use case.

@mindrunner
Copy link
Author

Cool, Thanks for pointing me to munki. Will try that out when I have more demand for it. At the moment, my solution works great for us! :)

Cheers

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

Successfully merging a pull request may close this issue.

2 participants