rancher / rio

Application Deployment Engine for Kubernetes
https://rio.io
Apache License 2.0
2.27k stars 228 forks source link

China can't pull gcr.io images #956

Open backnero opened 4 years ago

backnero commented 4 years ago

It is not possible to pull the GCR.IO merger in China. Is there any solution during deployment? Or how to replace the mirror source?

StrongMonkey commented 4 years ago

@backnero In the future we can mirror all the images into rancher repo. Currently you have to edit the deployment directly to change images. I think currently only tekton components use gcr images.

backnero commented 4 years ago

There is currently a way to install the RIO environment in GFW by running docker pull on the node in advance. The script is as follows: Save as "images.properties" file

rancher/linkerd-install:stable-2.6.0=dockerhub.azk8s.cn/rancher/linkerd-install:stable-2.6.0
gcr.io/linkerd-io/controller:stable-2.6.0=gcr.azk8s.cn/linkerd-io/controller:stable-2.6.0
gcr.io/linkerd-io/proxy:stable-2.6.0=gcr.azk8s.cn/linkerd-io/proxy:stable-2.6.0
gcr.io/linkerd-io/proxy-init:v1.2.0=gcr.azk8s.cn/linkerd-io/proxy-init:v1.2.0
gcr.io/linkerd-io/grafana:stable-2.6.0=gcr.azk8s.cn/linkerd-io/grafana:stable-2.6.0
gcr.io/linkerd-io/web:stable-2.6.0=gcr.azk8s.cn/linkerd-io/web:stable-2.6.0
quay.io/solo-io/gloo-envoy-wrapper:0.20.8=quay.azk8s.cn/solo-io/gloo-envoy-wrapper:0.20.8
quay.io/solo-io/gateway:0.20.8=quay.azk8s.cn/solo-io/gateway:0.20.8
quay.io/solo-io/gloo:0.20.8=quay.azk8s.cn/solo-io/gloo:0.20.8
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller@sha256:72a2bda21b5bc23550e94fdf7cee8a6e5bd82601f5d81a6237fc2b8c42321a59=gcr.azk8s.cn/tekton-releases/github.com/tektoncd/pipeline/cmd/controller@sha256:72a2bda21b5bc23550e94fdf7cee8a6e5bd82601f5d81a6237fc2b8c42321a59
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook@sha256:1d6336f2748cb8e5c19b17191a54c6adbbc77e2d1c60818f93282ec482bb2957=gcr.azk8s.cn/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook@sha256:1d6336f2748cb8e5c19b17191a54c6adbbc77e2d1c60818f93282ec482bb2957

Save as "load_images.sh" file

#!/bin/bash
file="images.properties"
if [ -f "$file" ]
then
  echo "$file found."
  while IFS='=' read -r key value
  do
    #echo "${key}=${value}"
    docker pull ${value}
    docker tag ${value} ${key}
    docker rmi ${value}
  done < "$file"
else
  echo "$file not found."
fi

run ./load_images.sh