Skip to content

Commit

Permalink
lug: move mx-packages to s3 (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum authored Oct 16, 2023
1 parent 1471991 commit c8fccb2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
10 changes: 5 additions & 5 deletions caddy/Caddyfile.siyuan
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ https://mirror.sjtu.edu.cn {
not path /mageia/*
not path /openkylin/*
not path /openkylin-cdimage/*
not path /mx-packages/*
not path /homebrew-bottles/*
not path /rust-static/*
not path /pypi-packages/*
Expand Down Expand Up @@ -298,7 +299,6 @@ https://mirror.sjtu.edu.cn {
not path /parrot/*
not path /raspberrypi/*
not path /mx-isos/*
not path /mx-packages/*
not path /packagist/*
not path /mongodb/*
not path /julia/*
Expand Down Expand Up @@ -485,6 +485,10 @@ https://mirror.sjtu.edu.cn {
handle /openkylin-cdimage/* {
reverse_proxy rsync-gateway:8000
}
redir /mx-packages /mx-packages/ 301
handle /mx-packages/* {
reverse_proxy rsync-gateway:8000
}
redir /openvz /openvz/ 301
handle /openvz/* {
file_server browse {
Expand Down Expand Up @@ -964,10 +968,6 @@ https://mirror.sjtu.edu.cn {
handle_path /mx-isos/* {
redir * https://mirrors.sjtug.sjtu.edu.cn/mx-isos{uri} 302
}
redir /mx-packages /mx-packages/ 301
handle_path /mx-packages/* {
redir * https://mirrors.sjtug.sjtu.edu.cn/mx-packages{uri} 302
}
redir /packagist /packagist/ 301
handle_path /packagist/* {
redir * https://mirrors.sjtug.sjtu.edu.cn/packagist{uri} 302
Expand Down
14 changes: 5 additions & 9 deletions caddy/Caddyfile.zhiyuan
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
not path /opensuse/*
not path /openkylin/*
not path /openkylin-cdimage/*
not path /mx-packages/*
not path /openvz/*
not path /remi/*
not path /scientific/*
Expand Down Expand Up @@ -443,15 +444,6 @@ https://mirrors.sjtug.sjtu.edu.cn {
@hidden path */.*
respond @hidden 404
}
redir /mx-packages /mx-packages/ 301
handle /mx-packages/* {
file_server browse {
root /mnt
hide .*
}
@hidden path */.*
respond @hidden 404
}
redir /packagist /packagist/ 301
handle /packagist/* {
file_server browse {
Expand Down Expand Up @@ -679,6 +671,10 @@ https://mirrors.sjtug.sjtu.edu.cn {
handle_path /openkylin-cdimage/* {
redir * https://mirror.sjtu.edu.cn/openkylin-cdimage{uri} 302
}
redir /mx-packages /mx-packages/ 301
handle_path /mx-packages/* {
redir * https://mirror.sjtu.edu.cn/mx-packages{uri} 302
}
redir /openvz /openvz/ 301
handle_path /openvz/* {
redir * https://mirror.sjtu.edu.cn/openvz{uri} 302
Expand Down
12 changes: 12 additions & 0 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,18 @@ repos:
serve_mode: rsync_gateway
<<: *rsync_fetcher_common
<<: *oneshot_common
# mx-packages
- type: shell_script
name: mx-packages
script: /worker-script/rsync-fetcher.sh
interval: 9602
source: rsync://[email protected]/workspace
# Password is made public at https://mxlinux.org/wiki/rsyncserver/mirroring-mx-antix-linux/
# So we do not hide it behind secrets
password: T1tpw4rstmr
serve_mode: rsync_gateway
<<: *rsync_fetcher_common
<<: *oneshot_common
# openvz
- type: shell_script
script: /worker-script/rsync.sh
Expand Down
10 changes: 0 additions & 10 deletions config.zhiyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,6 @@ repos:
# So we do not hide it behind secrets
password: dstuPwd
<<: *oneshot_common
- type: shell_script
name: mx-packages
script: /worker-script/rsync_password.sh
path: /mnt/mx-packages
interval: 9602
source: [email protected]::workspace
# Password is made public at https://mxlinux.org/wiki/rsyncserver/mirroring-mx-antix-linux/
# So we do not hide it behind secrets
password: T1tpw4rstmr
<<: *oneshot_common
- type: shell_script
script: /worker-script/zhiyuan/worker-script/packagist.sh
interval: 4800
Expand Down
5 changes: 5 additions & 0 deletions rsync-gateway/config.siyuan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ namespace = "openkylin-cdimage"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
s3_prefix = "rsync/openkylin-cdimage"

[endpoints.mx-packages]
namespace = "mx-packages"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
s3_prefix = "rsync/mx-packages"

[endpoints.bioconductor]
namespace = "bioconductor"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
Expand Down

0 comments on commit c8fccb2

Please sign in to comment.