harbor从v1.1.1升级到v1.5.1的记录(二)

看完上一遍是habror升级之同步数据,接下来我们就讲部署的注意事项

下载在线升级的harborv1.5.1 harbor-online-installer-v1.5.1.tgz

解压

tar xvf harbor-online-installer-v1.5.1.tgz

修改配置文件harbor.cfg

因为harborv1.1.1 和v1.5.1相比较,v1.5.1新增了镜像邵渺功能,复制的策略也有改变,定时,立即等同步策略,这个功能可用可不用

因此,主要注意的地方就是修改相关的镜像存储的配置,harbor v1.1.1的registry的配置文件主要修改config.yaml文件

由之前的v1.1.1版本的修改文件 common/templates/registry/config.yml

storage:
    s3:
        accesskey: xxx
        secretkey: xxx
        region: xx
        regionendpoint: url 
        bucket: registrybucket
        encrypt: false
        secure: false
        v4auth: true
        chunksize: 5242880
        multipartcopychunksize: 33554432
        multipartcopymaxconcurrency: 100
        multipartcopythresholdsize: 33554432
    cache:
        blobdescriptor: redis
#    filesystem:
#        rootdirectory: /storage
    maintenance:
        uploadpurging:
            enabled: false
    delete:
        enabled: true

改为harbor v1.5.1的配置,如下

storage:
  cache:
    blobdescriptor: redis
  $storage_provider_info
  maintenance:
    uploadpurging:
      enabled: false
  delete:
    enabled: true
    ...
    ...
redis:
  addr: 192.168.1.11:6379
  db: 2
  dialtimeout: 10ms
  readtimeout: 10ms
  writetimeout: 10ms
  pool:
    maxidle: 16
    maxactive: 64
    idletimeout: 300s

通过修改registry相关的配置

### Docker Registry setting ###
#registry_storage_provider can be: filesystem, s3, gcs, azure, etc.
registry_storage_provider_name = s3
#registry_storage_provider_config is a comma separated "key: value" pairs, e.g. "key1: value, key2: value2".
#Refer to https://docs.docker.com/registry/configuration/#storage for all available configuration.
registry_storage_provider_config = accesskey: xxx, secretkey: xxx, region: lfrz1, regionendpoint: http:xxxx, bucket: registrybucket, encrypt: false, secure: false, v4auth: true, chunksize: 5242880, multipartcopychunksize: 33554432, multipartcopymaxconcurrency: 100, multipartcopythresholdsize: 33554432

还要注意ui加密的key也得复制过来,默认在/data/secretkey这个文件里,高可用时 也要注意这个的一致性

[root@harbor151 harbor]# cat /data/secretkey 
6d70UIQ8FRDxxsGp[root@harbor151 harbor]# 

然后在安装目录,直接执行

./install.sh

就升级成功了,另外还有相关的接口改变,根据具体的业务修改相应的接口信息
完毕

参考:
installation_guide

猜你喜欢

转载自blog.csdn.net/qq_21816375/article/details/81302188