Open XVilka opened 4 years ago
The steps are dispersed in the discourse thread. To summarize:
opam admin cache
if you want to cache archivesopam admin index
for httpopam repo add mirror <url>
, to have it as a fallback, or with --rank 1
--set-default
to have it as the default one for switch creationIt can be the occasion to have a blog post for that.
Yes, I would be awesome to have a good step-by-step guide, especially since it will be the IT team who setups this kind of mirror, not seasoned OCaml users/developers.
It can be the occasion to have a blog post for that.
Blog posts are poor substitutes for manuals -- for one thing they are difficult to update. It's better to have that in the manual.
Let me know if I can help somehow. Also I checked the scripts from opam.ocaml.org and found some issues:
Currently it is impossible to make a local or regional mirror for both opam repository and source files in a batch, like some of the Linux distributions or package managers. It would be amazing and useful to setup a couple mirrors on a various regional CDNs, like some other languages/distributions did, And add the instruction on how to add them into the global mirror lists:
See example pages on how to setup the mirror:
See the example of a big mirror from Tencent with various languages, distributions and frameworks: https://mirrors.tencent.com/
I asked this on Discourse but got no easy solution