Skip to content
New issue

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

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

Already on GitHub? # to your account

Mirroring support #4103

Open
XVilka opened this issue Mar 4, 2020 · 4 comments
Open

Mirroring support #4103

XVilka opened this issue Mar 4, 2020 · 4 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented Mar 4, 2020

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

@rjbou
Copy link
Collaborator

rjbou commented Mar 4, 2020

The steps are dispersed in the discourse thread. To summarize:

  • Set up the mirror
    • copy of opam-repository (git clone)
    • opam admin cache if you want to cache archives
    • opam admin index for http
    • have a webserver
    • for opam.ocaml.org, scripts are in this repo
  • Use the mirror
    • opam repo add mirror <url>, to have it as a fallback, or with --rank 1
    • with --set-default to have it as the default one for switch creation

It can be the occasion to have a blog post for that.

@XVilka
Copy link
Contributor Author

XVilka commented Mar 5, 2020

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.

@dbuenzli
Copy link
Contributor

dbuenzli commented Mar 5, 2020

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.

@XVilka

This comment has been minimized.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants