alipay / container-observability-service

Simplify Kubernetes applications operation with one-stop observability services, including resource delivery SLO,root cause diagnoses and container lifecycle tracing and more.
Apache License 2.0
86 stars 15 forks source link

Feat: make images download quickly in China #113

Open linuzb opened 4 months ago

linuzb commented 4 months ago

What would you like to be added?

Push the lunettes image to both dockerhub and the image repository deployed in china, so that Chinese users can deploy it quickly.

Why is this change required? What problem does it solve?

China's network access to dockerhub is relatively slow, providing images deployed in China can speed up the deployment of Chinese users

linuzb commented 4 months ago

合并之后的操作

当代码合并之后,需要进行以下操作才可以发布新的版本

步骤1:创建阿里云镜像服务

详细步骤可以参考文档 创建镜像namespace

最终的镜像地址格式为

registry.cn-<个人版实例所在地域>.aliyuncs.com/<命名空间名称>/<镜像仓库名称>:<镜像版本号>

注意,选择地域影响了最终的域名。

步骤2:创建镜像仓库

该步骤指的镜像仓库为镜像仓库名称,即 namespace 后面那个仓库名称。

由于我们本次pr会将其它依赖组件同步到 lunettes 镜像 namespace 下,例如 lunettes/prometheus:tag, 因此需要在namespace 下创建镜像仓库 prometheus。

2.1 dockerhub 手动创建仓库

dockerhub 需要先手动创建仓库,然后才可以push镜像

以下是需要创建的仓库

2.2 aliyun 自动创建仓库

阿里云默认情况下已经开启自动创建仓库,可以无需操作。

image

步骤3:github action 设置 secret

我们需要为 github action 设置镜像仓库的 secret,以便于访问阿里云镜像仓库

3.1 dockerhub

已经设置,本次课忽略

3.2 设计阿里云镜像中心密码并配置github action secret

image

github action 中需要配置的 secret 为