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

bin/gen_static.jl: only serve a subset of packages? #5

Open
DilumAluthge opened this issue Dec 11, 2019 · 2 comments
Open

bin/gen_static.jl: only serve a subset of packages? #5

DilumAluthge opened this issue Dec 11, 2019 · 2 comments

Comments

@DilumAluthge
Copy link
Member

I'd like to set up a static server, but I only want to host a subset of packages. What would be the best way to accomplish this?

I guess one approach would be for me to make a fork of General, and then delete everything from the fork that I don't want to host. But that will become a real pain to maintain.

I'm wondering if there is an easier approach?

@StefanKarpinski
Copy link
Collaborator

StefanKarpinski commented Dec 11, 2019

The static server here is really only meant as the simplest possible proof of concept implementation for development and testing of the Pkg server. It doesn't fully satisfy the full Pkg storage contract since it doesn't permanently persist things. If you want to develop a more fully featured static Pkg storage server, it's probably best to fork this script into a separate package and add features there. If that's done, I'd be happy to delete this script and use the separate implementation.

@johnnychen94
Copy link
Contributor

johnnychen94 commented Apr 28, 2020

This is what I just built using johnnychen94/StorageMirrorServer.jl#1 and it's functioning well. It would be great to get some feedback and suggestions.

using Pkg
Pkg.update()

using StorageServer

# packages under JuliaImages and their dependencies are all included
pkgs = read_packages("General") do pkg
    occursin("JuliaImages", pkg.url)
end

make_tarball("General";
             packages=pkgs)
bash$ du -sh static/
17G	artifact
475M	package
512	registries
130M	registry

The next feature I plan to add is downloading tarballs from an existing upstream storage/pkg server, that is, a mirror function.

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

3 participants