From 09bd4fb54d1d7d7852de309a6eea582afb190449 Mon Sep 17 00:00:00 2001 From: shaowenchen Date: Wed, 11 Sep 2024 16:16:10 +0800 Subject: [PATCH] replace gh proxy --- docs/content/opscli-case.md | 2 +- docs/content/opscli-install.md | 4 ++-- getcli.sh | 2 +- pkg/constants/net.go | 2 +- readme.md | 2 +- tasks/collect-gpu-log.yaml | 2 +- tasks/cron-host.yaml | 4 ++-- tasks/install-descheduler.yaml | 2 +- tasks/install-metricsserver.yaml | 2 +- tasks/install-nerdctl.yaml | 2 +- tasks/install-nydus.yaml | 2 +- tasks/install-opscli.yaml | 2 +- tasks/set-mirror.yaml | 2 +- tasks/set-os-mirror.yaml | 2 +- tasks/velero-install.yaml | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/content/opscli-case.md b/docs/content/opscli-case.md index 19a898e4..306cd1fb 100644 --- a/docs/content/opscli-case.md +++ b/docs/content/opscli-case.md @@ -7,7 +7,7 @@ ```bash sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories apk add curl -curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh - +curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh - ``` - 在节点安装 fio diff --git a/docs/content/opscli-install.md b/docs/content/opscli-install.md index 96e74b67..1c460979 100644 --- a/docs/content/opscli-install.md +++ b/docs/content/opscli-install.md @@ -7,7 +7,7 @@ 国内使用: ```bash -curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh - +curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh - ``` 国外使用: @@ -23,7 +23,7 @@ curl -sfL https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VER 国内使用: ```bash -/usr/local/bin/opscli shell --content "curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VERSION=latest sh -" -i hosts.txt +/usr/local/bin/opscli shell --content "curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VERSION=latest sh -" -i hosts.txt ``` 国外使用: diff --git a/getcli.sh b/getcli.sh index 7fdc6604..6e791937 100644 --- a/getcli.sh +++ b/getcli.sh @@ -42,7 +42,7 @@ http_code=$(curl --connect-timeout 2 -s -o temp.out -w '%{http_code}' https://gi rm -rf temp.out || true if [ $http_code -ne 302 ]; then - DOWNLOAD_URL="https://mirror.ghproxy.com/${DOWNLOAD_URL}" + DOWNLOAD_URL="https://ghp.ci/${DOWNLOAD_URL}" fi OPSTEMPDIR=$(mktemp -d) diff --git a/pkg/constants/net.go b/pkg/constants/net.go index 2da67cac..cc80d9dd 100644 --- a/pkg/constants/net.go +++ b/pkg/constants/net.go @@ -1,3 +1,3 @@ package constants -const DefaultProxy = "https://mirror.ghproxy.com/" +const DefaultProxy = "https://ghp.ci/" diff --git a/readme.md b/readme.md index 66e739b8..b19690a7 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ If Good network connections to GitHub else Poor network connections to GitHub -`curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh -` +`curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh |VERSION=latest sh -` ### install Ops Controller diff --git a/tasks/collect-gpu-log.yaml b/tasks/collect-gpu-log.yaml index f2a5acca..0066b26d 100644 --- a/tasks/collect-gpu-log.yaml +++ b/tasks/collect-gpu-log.yaml @@ -28,7 +28,7 @@ spec: content: | rm -rf /tmp/col-gpu-log-${random} || true mkdir -p /tmp/col-gpu-log-${random} && cd /tmp/col-gpu-log-${random} - curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/hubimage/main/ai/col_gpu_log.sh | bash + curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/hubimage/main/ai/col_gpu_log.sh | bash mv *.tar.gz ${hostname}-col-gpu-log-${random}.tar.gz - name: upload to s3 remotefile: s3://collect-gpu-log/${hostname}-col-gpu-log-${random}.tar.gz diff --git a/tasks/cron-host.yaml b/tasks/cron-host.yaml index e1d6a1a0..667f9ab5 100644 --- a/tasks/cron-host.yaml +++ b/tasks/cron-host.yaml @@ -12,7 +12,7 @@ spec: - name: add dragonfly docker for containerd content: | if [ ! -f /usr/local/bin/gen-containerd-hosts.sh ]; then - curl -s https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/hubimage/main/nydus/dfget-containerd.sh | bash - + curl -s https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/hubimage/main/nydus/dfget-containerd.sh | bash - fi - name: add dragonfly others domain content: | @@ -24,7 +24,7 @@ spec: - name: add opscli content: | if [ ! -f /usr/local/bin/opscli ]; then - curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VERSION=latest sh - + curl -sfL https://ghp.ci/https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VERSION=latest sh - fi - name: add nerdctl content: | diff --git a/tasks/install-descheduler.yaml b/tasks/install-descheduler.yaml index 52137260..d9fe3b19 100644 --- a/tasks/install-descheduler.yaml +++ b/tasks/install-descheduler.yaml @@ -9,7 +9,7 @@ spec: typeRef: cluster variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ action: default: apply kubeconfig: diff --git a/tasks/install-metricsserver.yaml b/tasks/install-metricsserver.yaml index 379a87dd..aa819d0b 100644 --- a/tasks/install-metricsserver.yaml +++ b/tasks/install-metricsserver.yaml @@ -9,7 +9,7 @@ spec: typeRef: cluster variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ action: default: apply version: diff --git a/tasks/install-nerdctl.yaml b/tasks/install-nerdctl.yaml index ea732b85..6ab82f46 100644 --- a/tasks/install-nerdctl.yaml +++ b/tasks/install-nerdctl.yaml @@ -8,7 +8,7 @@ spec: desc: install nerdctl tool in specified host variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ version: default: 1.7.6 arch: diff --git a/tasks/install-nydus.yaml b/tasks/install-nydus.yaml index d55a9709..d6616892 100644 --- a/tasks/install-nydus.yaml +++ b/tasks/install-nydus.yaml @@ -8,7 +8,7 @@ spec: desc: install nydus kit in specified host variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ version: default: 2.2.4 rpcversion: diff --git a/tasks/install-opscli.yaml b/tasks/install-opscli.yaml index c0b62ad6..34bd0d0c 100644 --- a/tasks/install-opscli.yaml +++ b/tasks/install-opscli.yaml @@ -8,7 +8,7 @@ spec: desc: install opscli tool in specified host variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ steps: - name: Install Opscli content: curl -sfL ${proxy}https://raw.githubusercontent.com/shaowenchen/ops/main/getcli.sh | VERSION=latest sh - diff --git a/tasks/set-mirror.yaml b/tasks/set-mirror.yaml index 4ba7eaae..0cc062dc 100644 --- a/tasks/set-mirror.yaml +++ b/tasks/set-mirror.yaml @@ -9,5 +9,5 @@ spec: steps: - name: install required packages content: | - PROXY="https://mirror.ghproxy.com/" && + PROXY="https://ghp.ci/" && curl -sfL "$PROXY"https://raw.githubusercontent.com/shaowenchen/hubimage/main/mirror/ubuntu/get.sh | sh - diff --git a/tasks/set-os-mirror.yaml b/tasks/set-os-mirror.yaml index 5bf832f0..ad7ad258 100644 --- a/tasks/set-os-mirror.yaml +++ b/tasks/set-os-mirror.yaml @@ -8,7 +8,7 @@ spec: desc: set os mirror friendly to China for specified host variables: proxy: - default: https://mirror.ghproxy.com/ + default: https://ghp.ci/ steps: - name: Set mirror content: curl -sfL ${proxy}https://raw.githubusercontent.com/shaowenchen/hubimage/main/mirror/get.sh | sh - diff --git a/tasks/velero-install.yaml b/tasks/velero-install.yaml index c7aa5864..8d7421cc 100644 --- a/tasks/velero-install.yaml +++ b/tasks/velero-install.yaml @@ -11,7 +11,7 @@ spec: velero_version: default: v1.9.2 download_url: - default: https://mirror.ghproxy.com/https://github.com/vmware-tanzu/velero/releases/download/${velero_version}/velero-${velero_version}-linux-amd64.tar.gz + default: https://ghp.ci/https://github.com/vmware-tanzu/velero/releases/download/${velero_version}/velero-${velero_version}-linux-amd64.tar.gz region: required: true endpoint: