This package is used to set up a Julia Package Storage Server for mirror sites. The protocol details are described in https://github.com/JuliaLang/Pkg.jl/issues/1377.
TL;DR; A storage server contains all the static contents you need to download when you do ]add PackageName
.
If you just want a cache layer service, PkgServer.jl is a better choice. This package is made to permanently keep the static contents.
To set up a storage server, you'll need to:
This package is written to make step 1 easy and stupid.
]add StorageMirrorServer
gen_static.jl
julia gen_static.jl
You can read the not-so-friendly docstrings for advanced usage, but here are something you may want:
julia gen_static.jl > log.txt 2>&1
JULIA_NUM_THREADS
. For example,
JULIA_NUM_THREADS=8 julia gen_static.jl
would use 8 threads to pull data.There are some environment variables that you can use to help configure the download worker curl
:
BIND_ADDRESS
that passes to curl --interface $BIND_ADDRESS
, this can be useful when multiple
network cards are available (newly added in v0.2.1
)This package is used to power the Julia pkg mirror in the following mirror sites:
The first version of this package is modified from the original implementation gen_static.jl. During the development of this package, I get a lot of helps from Elliot Saba and Stefan Karpinski to understand the Pkg & Storage protocol designs. Chi Zhang from SJTUG has shown his great patience and passion in testing out the rolling versions and given me a lot of feedbacks and suggestions.