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
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:
- get/update the static contents
- serve them as a HTTP(s) service using nginx or whatever you like
This package is written to make step 1 easy and stupid.
- add this package
- modify the example script and save it as
- pull/build data
You can read the not-so-friendly docstrings for advanced usage, but here are something you may want:
- Redirect output
julia gen_static.jl > log.txt 2>&1
- Utilize multiple threads, set environment variable
JULIA_NUM_THREADS. For example,
JULIA_NUM_THREADS=8 julia gen_static.jlwould use 8 threads to pull data.
There are some environment variables that you can use to help configure the download worker
BIND_ADDRESSthat passes to
curl --interface $BIND_ADDRESS, this can be useful when multiple network cards are available (newly added in
This package is used to power the Julia pkg mirror in the following mirror sites:
- BFSU in Beijing Foreign Studies University
- TUNA in Tsinghua University
- SJTUG in Shanghai Jiao Tong University
- USTC in University of Science and Technology of China
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.