centos7服务器升级harbor-2.0.6至2.7.0
  2KuXiRNFmqEE 2023年11月02日 51 0

📋 centos7服务器升级harbor-2.0.6至2.7.0

🧾 1.升级harbor-2.0.6至2.4.0

使用指南:由于2.0.6版本不能直接升级到2.7.0版本,所以需要先过渡到2.4.0版本。原因是PG版本升级不兼容。2.0.6使用PG版本为9,2.3.0之后PG版本为13


从 v1.10.x 及更高版本到当前版本的迁移。如果要从早期版本升级,请先参考分支中的迁移指南升级到 v1.10.x,然后按照本指南执行到此版本的迁移。

[root@localhost harbor]# cat /mnt/harbor-data/database/PG_VERSION
9.6
[root@localhost harbor]# ls
common  common.sh  docker-compose.yml  harbor.v2.0.6.tar.gz  harbor.yml  harbor.yml.tmpl  install.sh  LICENSE  prepare
[root@localhost harbor]# docker-compose down
Stopping harbor-jobservice ... done
Stopping nginx             ... done
Stopping harbor-core       ... done
Stopping registryctl       ... done
Stopping redis             ... done
Stopping harbor-db         ... done
Stopping harbor-portal     ... done
Stopping registry          ... done
Stopping harbor-log        ... done
Removing harbor-jobservice ... done
Removing nginx             ... done
Removing harbor-core       ... done
Removing registryctl       ... done
Removing redis             ... done
Removing harbor-db         ... done
Removing harbor-portal     ... done
Removing registry          ... done
Removing harbor-log        ... done
Removing network harbor_harbor
[root@localhost harbor]# cd ..
[root@localhost server]# mv harbor/ /my_backup_dir/harbor206
[root@localhost server]# ls /my_backup_dir/harbor206/
common     docker-compose.yml    harbor.yml       install.sh  prepare
common.sh  harbor.v2.0.6.tar.gz  harbor.yml.tmpl  LICENSE
[root@localhost server]# cp -r /mnt/harbor-data/database/ /my_backup_dir/database206
[root@localhost server]# ls
filebeat-7.6.1  nginx-1.20.1
[root@localhost server]# pwd
/mnt/lakecloud/server
[root@localhost server]# mv /tmp/harbor-offline-installer-v2.4.0.tgz .
[root@localhost server]# ls
filebeat-7.6.1  harbor-offline-installer-v2.4.0.tgz  nginx-1.20.1
[root@localhost server]# tar -zxvf harbor-offline-installer-v2.4.0.tgz
harbor/harbor.v2.4.0.tar.gz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/common.sh
harbor/harbor.yml.tmpl
[root@localhost server]# ls
filebeat-7.6.1  harbor  harbor-offline-installer-v2.4.0.tgz  nginx-1.20.1
[root@localhost server]# docker load -i harbor/harbor.v2.4.0.tar.gz
837f724ff5fa: Loading layer  37.24MB/37.24MB
9124c2238781: Loading layer   8.75MB/8.75MB
Loaded image: goharbor/nginx-photon:v2.4.0
eb743786ec74: Loading layer  6.825MB/6.825MB
f07730260c47: Loading layer  4.096kB/4.096kB
395a69b09302: Loading layer  3.072kB/3.072kB
ee8827a713fb: Loading layer  17.32MB/17.32MB
9c34ff7508f4: Loading layer  18.12MB/18.12MB
Loaded image: goharbor/registry-photon:v2.4.0
9b7a308e32a9: Loading layer   8.75MB/8.75MB
c69b6243b8dc: Loading layer  7.351MB/7.351MB
46a73692851f: Loading layer  1.754MB/1.754MB
Loaded image: goharbor/harbor-portal:v2.4.0
c3d075b59815: Loading layer  9.918MB/9.918MB
f051cb3ef891: Loading layer  3.584kB/3.584kB
1fbd5b59129c: Loading layer   2.56kB/2.56kB
33872f7735c1: Loading layer  86.95MB/86.95MB
552c88bbfdf2: Loading layer  87.74MB/87.74MB
Loaded image: goharbor/harbor-jobservice:v2.4.0
4386974468aa: Loading layer   6.82MB/6.82MB
579a66424b7a: Loading layer  5.928MB/5.928MB
2b9d2e280ef8: Loading layer  15.88MB/15.88MB
d9567ce114f8: Loading layer  29.29MB/29.29MB
5d01e6628d85: Loading layer  22.02kB/22.02kB
8c80a21febbf: Loading layer  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.4.0
7767a9a4479b: Loading layer   6.82MB/6.82MB
0664c36ecb86: Loading layer  5.928MB/5.928MB
ad0f949dfc16: Loading layer  14.47MB/14.47MB
df51bcd9a736: Loading layer  29.29MB/29.29MB
2cf7b7bb600e: Loading layer  22.02kB/22.02kB
a3b43b64a719: Loading layer  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.4.0
f3bbf8e07e1f: Loading layer  7.363MB/7.363MB
ea614a476036: Loading layer  4.096kB/4.096kB
38f5e7b4e1e1: Loading layer  3.072kB/3.072kB
78afbc6e6135: Loading layer  39.27MB/39.27MB
6203e5b43d83: Loading layer  12.37MB/12.37MB
800fc9f7d779: Loading layer  52.43MB/52.43MB
Loaded image: goharbor/trivy-adapter-photon:v2.4.0
26062a109175: Loading layer    165MB/165MB
d965f4f72e64: Loading layer  56.42MB/56.42MB
4cbed617b98c: Loading layer   2.56kB/2.56kB
d6ba7f839c51: Loading layer  1.536kB/1.536kB
cb64755bd037: Loading layer  12.29kB/12.29kB
d912ef25ddf8: Loading layer  2.883MB/2.883MB
d6e0e6116314: Loading layer  325.1kB/325.1kB
Loaded image: goharbor/prepare:v2.4.0
a4d3b0bdda2c: Loading layer  9.918MB/9.918MB
8705dba93357: Loading layer  3.584kB/3.584kB
3b18ca8d970c: Loading layer   2.56kB/2.56kB
5501a443efe0: Loading layer  75.58MB/75.58MB
6a4f6f64c587: Loading layer  5.632kB/5.632kB
1ca65148f507: Loading layer  96.26kB/96.26kB
ac72e3985f48: Loading layer  11.78kB/11.78kB
7df7af11dcf1: Loading layer  76.48MB/76.48MB
da200c4a0b84: Loading layer   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.4.0
e532b9dd2cad: Loading layer  9.918MB/9.918MB
aefdfde2cb3a: Loading layer  18.13MB/18.13MB
d9a12ea52fc1: Loading layer  4.608kB/4.608kB
aace45b92bba: Loading layer  18.93MB/18.93MB
Loaded image: goharbor/harbor-exporter:v2.4.0
2e6f948c8fc9: Loading layer  125.5MB/125.5MB
b68f7afd5541: Loading layer  3.584kB/3.584kB
90a54cd330e6: Loading layer  3.072kB/3.072kB
5f35f0a628eb: Loading layer   2.56kB/2.56kB
f71711eca8c6: Loading layer  3.072kB/3.072kB
16e7e1bb139f: Loading layer  3.584kB/3.584kB
6592efe3300a: Loading layer  19.97kB/19.97kB
Loaded image: goharbor/harbor-log:v2.4.0
036526e35499: Loading layer  1.096MB/1.096MB
3628054a5c02: Loading layer  5.888MB/5.888MB
97af3f2b464e: Loading layer  173.7MB/173.7MB
96a363eb0574: Loading layer  15.66MB/15.66MB
0e48103da27c: Loading layer  4.096kB/4.096kB
859913b38798: Loading layer  6.144kB/6.144kB
fc46054d0da1: Loading layer  3.072kB/3.072kB
5e39ba722047: Loading layer  2.048kB/2.048kB
48b1de6357a0: Loading layer   2.56kB/2.56kB
a81bf3b200cf: Loading layer   2.56kB/2.56kB
9bf31b1d83c5: Loading layer   2.56kB/2.56kB
a9b0d033a804: Loading layer  8.704kB/8.704kB
Loaded image: goharbor/harbor-db:v2.4.0
e67beb79d36a: Loading layer  6.825MB/6.825MB
dbddd54a4aab: Loading layer  4.096kB/4.096kB
25f22ce6e9f6: Loading layer  17.32MB/17.32MB
0d5000def090: Loading layer  3.072kB/3.072kB
c6e61062a951: Loading layer  28.69MB/28.69MB
b5436c54273a: Loading layer  46.81MB/46.81MB
Loaded image: goharbor/harbor-registryctl:v2.4.0
7f28070810c5: Loading layer  121.3MB/121.3MB
245d454f948e: Loading layer  3.072kB/3.072kB
b4a5f151f58b: Loading layer   59.9kB/59.9kB
1125bae1f2c4: Loading layer  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.4.0
bf6fc6847c5e: Loading layer  6.824MB/6.824MB
0b6586c93e0a: Loading layer   64.5MB/64.5MB
5f2896ebc8d8: Loading layer  3.072kB/3.072kB
1e0535e72851: Loading layer  4.096kB/4.096kB
55569fb37556: Loading layer  65.29MB/65.29MB
Loaded image: goharbor/chartmuseum-photon:v2.4.0
[root@localhost server]# cp /my_backup_dir/harbor206/harbor.yml /
[root@localhost server]# docker run -it --rm -v /:/hostfs goharbor/prepare:v2.4.0 migrate -i harbor.yml
migrating to version 2.1.0
migrating to version 2.2.0
migrating to version 2.3.0
migrating to version 2.4.0
Written new values to harbor.yml
[root@localhost server]# cp /harbor.yml harbor/
[root@localhost server]# cd harbor
[root@localhost harbor]# ls
common.sh  harbor.v2.4.0.tar.gz  harbor.yml  harbor.yml.tmpl  install.sh  LICENSE  prepare
[root@localhost harbor]# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.17
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.18.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/nginx-photon:v2.4.0
Loaded image: goharbor/registry-photon:v2.4.0
Loaded image: goharbor/harbor-portal:v2.4.0
Loaded image: goharbor/harbor-jobservice:v2.4.0
Loaded image: goharbor/notary-server-photon:v2.4.0
Loaded image: goharbor/notary-signer-photon:v2.4.0
Loaded image: goharbor/trivy-adapter-photon:v2.4.0
Loaded image: goharbor/prepare:v2.4.0
Loaded image: goharbor/harbor-core:v2.4.0
Loaded image: goharbor/harbor-exporter:v2.4.0
Loaded image: goharbor/harbor-log:v2.4.0
Loaded image: goharbor/harbor-db:v2.4.0
Loaded image: goharbor/harbor-registryctl:v2.4.0
Loaded image: goharbor/redis-photon:v2.4.0
Loaded image: goharbor/chartmuseum-photon:v2.4.0
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /mnt/lakecloud/server/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Creating harbor-log ... done
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
Creating registry ... done
Creating harbor-core ... done
Creating network "harbor_harbor" with the default driver
Creating harbor-jobservice ... done
Creating redis ...
Creating registryctl ...
Creating harbor-portal ...
Creating harbor-db ...
Creating registry ...
Creating harbor-core ...
Creating nginx ...
Creating harbor-jobservice ...
✔ ----Harbor has been installed and started successfully.----
[root@localhost harbor]# docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS                            PORTS                       NAMES
cddac0564376   goharbor/harbor-jobservice:v2.4.0    "/harbor/entrypoint.…"   6 seconds ago   Up 4 seconds (health: starting)                               harbor-jobservice
2fb3f6eb104d   goharbor/nginx-photon:v2.4.0         "nginx -g 'daemon of…"   6 seconds ago   Up 4 seconds (health: starting)   0.0.0.0:81->8080/tcp        nginx
fc2af6162fa0   goharbor/harbor-core:v2.4.0          "/harbor/entrypoint.…"   6 seconds ago   Up 5 seconds (health: starting)                               harbor-core
d02567dbe163   goharbor/registry-photon:v2.4.0      "/home/harbor/entryp…"   7 seconds ago   Up 6 seconds (health: starting)                               registry
a35450e2936b   goharbor/harbor-db:v2.4.0            "/docker-entrypoint.…"   7 seconds ago   Up 6 seconds (health: starting)                               harbor-db
8fd60eb534b4   goharbor/harbor-registryctl:v2.4.0   "/home/harbor/start.…"   7 seconds ago   Up 6 seconds (health: starting)                               registryctl
86e50cfc5e16   goharbor/harbor-portal:v2.4.0        "nginx -g 'daemon of…"   7 seconds ago   Up 6 seconds (health: starting)                               harbor-portal
0a6df78abb90   goharbor/redis-photon:v2.4.0         "redis-server /etc/r…"   7 seconds ago   Up 6 seconds (health: starting)                               redis
cd902a9e4ea3   goharbor/harbor-log:v2.4.0           "/bin/sh -c /usr/loc…"   8 seconds ago   Up 7 seconds (health: starting)   127.0.0.1:1514->10514/tcp   harbor-log
[root@localhost harbor]# ls
common     docker-compose.yml    harbor.yml       install.sh  prepare
common.sh  harbor.v2.4.0.tar.gz  harbor.yml.tmpl  LICENSE
  1. 升级harbor-2.4.0至2.7.0

使用指南:由于2.0.6版本不能直接升级到2.7.0版本,所以需要先过渡到2.4.0版本。原因是PG版本升级不兼容。2.0.6使用PG版本为9,2.3.0之后PG版本为13


从 v1.10.x 及更高版本到当前版本的迁移。如果要从早期版本升级,请先参考分支中的迁移指南升级到 v1.10.x,然后按照本指南执行到此版本的迁移。

# 停机
[root@localhost harbor]# docker-compose down
Stopping harbor-jobservice ... done
Stopping nginx             ... done
Stopping harbor-core       ... done
Stopping registry          ... done
Stopping harbor-db         ... done
Stopping registryctl       ... done
Stopping harbor-portal     ... done
Stopping redis             ... done
Stopping harbor-log        ... done
Removing harbor-jobservice ... done
Removing nginx             ... done
Removing harbor-core       ... done
Removing registry          ... done
Removing harbor-db         ... done
Removing registryctl       ... done
Removing harbor-portal     ... done
Removing redis             ... done
Removing harbor-log        ... done
Removing network harbor_harbor
[root@localhost harbor]# ls
common     docker-compose.yml    harbor.yml       install.sh  prepare
common.sh  harbor.v2.4.0.tar.gz  harbor.yml.tmpl  LICENSE
[root@localhost harbor]# cd ..
[root@localhost server]# ls
filebeat-7.6.1  harbor  harbor-offline-installer-v2.4.0.tgz  nginx-1.20.1
# 备份harbor目录文件
[root@localhost server]# mv harbor /my_backup_dir/harbor240
#备份数据库
[root@localhost server]# cp -r /mnt/harbor-data/database /my_backup_dir/database240
[root@localhost server]# ls /my_backup_dir/database240/
pg13
[root@localhost server]# ls /my_backup_dir/database240/pg13/
base/                 pg_logical/           pg_stat/              pg_wal/
global/               pg_multixact/         pg_stat_tmp/          pg_xact/
pg_commit_ts/         pg_notify/            pg_subtrans/          postgresql.auto.conf
pg_dynshmem/          pg_replslot/          pg_tblspc/            postgresql.conf
pg_hba.conf           pg_serial/            pg_twophase/          postmaster.opts
pg_ident.conf         pg_snapshots/         PG_VERSION
[root@localhost server]# ls
filebeat-7.6.1  harbor-offline-installer-v2.4.0.tgz  nginx-1.20.1
[root@localhost server]# mv harbor-offline-installer-v2.4.0.tgz /tmp/
[root@localhost server]# mv /tmp/harbor-offline-installer-v2.7.0.tgz .
[root@localhost server]# ls
filebeat-7.6.1  harbor-offline-installer-v2.7.0.tgz  nginx-1.20.1
[root@localhost server]# tar -zxvf harbor-offline-installer-v2.7.0.tgz
harbor/harbor.v2.7.0.tar.gz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/common.sh
harbor/harbor.yml.tmpl
# 加载镜像
[root@localhost server]# docker load -i harbor/harbor.v2.7.0.tar.gz
8991ee7e1c66: Loading layer  37.72MB/37.72MB
caef0c5d2fe0: Loading layer  43.84MB/43.84MB
d0ae0913849c: Loading layer  66.03MB/66.03MB
d6c3137fc4e6: Loading layer   18.2MB/18.2MB
db156fb6962c: Loading layer  65.54kB/65.54kB
578a990cf79f: Loading layer   2.56kB/2.56kB
9415b3c8b317: Loading layer  1.536kB/1.536kB
bdb2dfba8b17: Loading layer  12.29kB/12.29kB
6a1b6c491cd2: Loading layer  2.613MB/2.613MB
c35c2488b48b: Loading layer    407kB/407kB
Loaded image: goharbor/prepare:v2.7.0
716575e41c45: Loading layer  145.8MB/145.8MB
af0525d96b0b: Loading layer  16.72MB/16.72MB
939977d7cbf6: Loading layer   5.12kB/5.12kB
005530be0f99: Loading layer  6.144kB/6.144kB
9764bccefdd0: Loading layer  3.072kB/3.072kB
38fe09b6e0e7: Loading layer  2.048kB/2.048kB
9d659849215a: Loading layer   2.56kB/2.56kB
bee3f2947ec7: Loading layer   2.56kB/2.56kB
e4e05d8658d3: Loading layer   2.56kB/2.56kB
e7991cc39265: Loading layer  9.728kB/9.728kB
Loaded image: goharbor/harbor-db:v2.7.0
d79110caaa26: Loading layer  8.902MB/8.902MB
b8cddfca4e88: Loading layer  3.584kB/3.584kB
071b47da1d9b: Loading layer   2.56kB/2.56kB
d22932d9f6c7: Loading layer  84.83MB/84.83MB
b2f2e9cbceac: Loading layer  5.632kB/5.632kB
53cce0f5bd54: Loading layer    108kB/108kB
40a6c61dcc44: Loading layer  44.03kB/44.03kB
6d7dba633513: Loading layer  85.77MB/85.77MB
44309ebcfcf7: Loading layer   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.7.0
cebcabcec86e: Loading layer    127MB/127MB
f3a76df94b70: Loading layer  3.584kB/3.584kB
ac9852cda3ce: Loading layer  3.072kB/3.072kB
a5bab3cf8af7: Loading layer   2.56kB/2.56kB
d52202b6a929: Loading layer  3.072kB/3.072kB
bd8a7ca8438d: Loading layer  3.584kB/3.584kB
a6a054173348: Loading layer  20.99kB/20.99kB
Loaded image: goharbor/harbor-log:v2.7.0
1a3b490c3dc4: Loading layer  8.902MB/8.902MB
7cbd50b78394: Loading layer  25.65MB/25.65MB
7119ae84be31: Loading layer  4.608kB/4.608kB
c9c5875f25c8: Loading layer  26.44MB/26.44MB
Loaded image: goharbor/harbor-exporter:v2.7.0
c8c89cfdc06a: Loading layer  119.1MB/119.1MB
Loaded image: goharbor/nginx-photon:v2.7.0
59736e375413: Loading layer  5.759MB/5.759MB
6cc787909b61: Loading layer  91.75MB/91.75MB
a56e97e08300: Loading layer  3.072kB/3.072kB
57925eac82a6: Loading layer  4.096kB/4.096kB
6e36a605c736: Loading layer  92.54MB/92.54MB
Loaded image: goharbor/chartmuseum-photon:v2.7.0
175f4dc2d45f: Loading layer  119.1MB/119.1MB
4e26408b204b: Loading layer  6.143MB/6.143MB
f2e93a87e40b: Loading layer  1.249MB/1.249MB
e5cceb0b0435: Loading layer  1.194MB/1.194MB
Loaded image: goharbor/harbor-portal:v2.7.0
b887c32c40a7: Loading layer  8.902MB/8.902MB
938a7e3c75f5: Loading layer  3.584kB/3.584kB
5a5a28182655: Loading layer   2.56kB/2.56kB
ebab1e49abda: Loading layer  103.3MB/103.3MB
4ce14e0439d9: Loading layer    104MB/104MB
Loaded image: goharbor/harbor-jobservice:v2.7.0
fbaa7a10893c: Loading layer  5.759MB/5.759MB
c688ac7b41fa: Loading layer  4.096kB/4.096kB
d7c1e408fc7d: Loading layer  17.41MB/17.41MB
55958792b639: Loading layer  3.072kB/3.072kB
a914e1c2d3e7: Loading layer  30.69MB/30.69MB
b91233145a72: Loading layer  48.89MB/48.89MB
Loaded image: goharbor/harbor-registryctl:v2.7.0
4bfd949c2891: Loading layer  5.759MB/5.759MB
7fd746eb54cc: Loading layer  4.096kB/4.096kB
026a4a79ef61: Loading layer  3.072kB/3.072kB
4e8dca75f609: Loading layer  17.41MB/17.41MB
7e017925a772: Loading layer   18.2MB/18.2MB
Loaded image: goharbor/registry-photon:v2.7.0
bd6904b66a79: Loading layer  5.754MB/5.754MB
4bea14657109: Loading layer  8.987MB/8.987MB
629d40c48f45: Loading layer  15.88MB/15.88MB
48d73b35455c: Loading layer  29.29MB/29.29MB
fe12338e806d: Loading layer  22.02kB/22.02kB
dcbe4fc18411: Loading layer  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.7.0
cc039d70dda6: Loading layer  119.9MB/119.9MB
c128fc8dd5aa: Loading layer  3.072kB/3.072kB
e030017184f0: Loading layer   59.9kB/59.9kB
f7a67f51f6d5: Loading layer  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.7.0
c4c80dff091a: Loading layer  5.754MB/5.754MB
26f51848acfb: Loading layer  8.987MB/8.987MB
fb0e59f893b6: Loading layer  14.47MB/14.47MB
e17fcd490db6: Loading layer  29.29MB/29.29MB
f0f3d13b4bdf: Loading layer  22.02kB/22.02kB
73965e1762cb: Loading layer  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.7.0
2d831b255ec9: Loading layer  6.287MB/6.287MB
603534b77185: Loading layer  4.096kB/4.096kB
edbbda0ede29: Loading layer  3.072kB/3.072kB
11ccb87ea0a3: Loading layer  180.6MB/180.6MB
13afce1af948: Loading layer  13.22MB/13.22MB
b05259901192: Loading layer  194.6MB/194.6MB
Loaded image: goharbor/trivy-adapter-photon:v2.7.0
[root@localhost server]# ls
filebeat-7.6.1  harbor  harbor-offline-installer-v2.7.0.tgz  nginx-1.20.1
# 使用旧版本的配置文件,生产新的配置文件
[root@localhost server]# cp /my_backup_dir/harbor240/harbor.yml /
cp: overwrite ‘/harbor.yml’? y
[root@localhost server]# docker run -it --rm -v /:/hostfs goharbor/prepare:v2.7.0 migrate -i harbor.yml
migrating to version 2.5.0
migrating to version 2.6.0
migrating to version 2.7.0
Written new values to harbor.yml
# 新生成的配置复制到工作目录
[root@localhost server]# cp /harbor.yml harbor
harbor/                              harbor-offline-installer-v2.7.0.tgz
[root@localhost server]# cp /harbor.yml harbor/
[root@localhost server]# cd harbor
[root@localhost harbor]# ls
common.sh  harbor.v2.7.0.tar.gz  harbor.yml  harbor.yml.tmpl  install.sh  LICENSE  prepare
[root@localhost harbor]# ll
total 775500
-rw-r--r-- 1 root root      3639 Dec 15 12:26 common.sh
-rw-r--r-- 1 root root 794060646 Dec 15 12:27 harbor.v2.7.0.tar.gz
-rw-r--r-- 1 root root      9434 Feb 22 16:05 harbor.yml
-rw-r--r-- 1 root root     11567 Dec 15 12:26 harbor.yml.tmpl
-rwxr-xr-x 1 root root      3171 Dec 15 12:26 install.sh
-rw-r--r-- 1 root root     11347 Dec 15 12:26 LICENSE
-rwxr-xr-x 1 root root      1881 Dec 15 12:26 prepare
[root@localhost harbor]# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.17
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.18.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/prepare:v2.7.0
Loaded image: goharbor/harbor-db:v2.7.0
Loaded image: goharbor/harbor-core:v2.7.0
Loaded image: goharbor/harbor-log:v2.7.0
Loaded image: goharbor/harbor-exporter:v2.7.0
Loaded image: goharbor/nginx-photon:v2.7.0
Loaded image: goharbor/chartmuseum-photon:v2.7.0
Loaded image: goharbor/harbor-portal:v2.7.0
Loaded image: goharbor/harbor-jobservice:v2.7.0
Loaded image: goharbor/harbor-registryctl:v2.7.0
Loaded image: goharbor/registry-photon:v2.7.0
Loaded image: goharbor/notary-server-photon:v2.7.0
Loaded image: goharbor/redis-photon:v2.7.0
Loaded image: goharbor/notary-signer-photon:v2.7.0
Loaded image: goharbor/trivy-adapter-photon:v2.7.0
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /mnt/lakecloud/server/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /data/secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
Creating harbor-log ... done
Note: stopping existing Harbor instance ...
Removing network harbor_harbor
WARNING: Network harbor_harbor not found.
Creating harbor-db ... done
Creating harbor-core ... done
Creating network "harbor_harbor" with the default driver
Creating nginx ... done
Creating registry ...
Creating redis ...
Creating harbor-db ...
Creating registryctl ...
Creating harbor-portal ...
Creating harbor-core ...
Creating harbor-jobservice ...
Creating nginx ...
✔ ----Harbor has been installed and started successfully.----
[root@localhost harbor]# docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS                            PORTS                       NAMES
6b0e8461dbc7   goharbor/nginx-photon:v2.7.0         "nginx -g 'daemon of…"   6 seconds ago   Up 5 seconds (health: starting)   0.0.0.0:81->8080/tcp        nginx
62ae158abb66   goharbor/harbor-jobservice:v2.7.0    "/harbor/entrypoint.…"   6 seconds ago   Up 4 seconds (health: starting)                               harbor-jobservice
28e2176fb1d7   goharbor/harbor-core:v2.7.0          "/harbor/entrypoint.…"   6 seconds ago   Up 5 seconds (health: starting)                               harbor-core
40c8e07413aa   goharbor/harbor-portal:v2.7.0        "nginx -g 'daemon of…"   7 seconds ago   Up 6 seconds (health: starting)                               harbor-portal
f9d764f75910   goharbor/harbor-registryctl:v2.7.0   "/home/harbor/start.…"   7 seconds ago   Up 6 seconds (health: starting)                               registryctl
6ece6e3fffb4   goharbor/harbor-db:v2.7.0            "/docker-entrypoint.…"   7 seconds ago   Up 6 seconds (health: starting)                               harbor-db
d2a20bccdb04   goharbor/registry-photon:v2.7.0      "/home/harbor/entryp…"   7 seconds ago   Up 6 seconds (health: starting)                               registry
7a1dece4b2ed   goharbor/redis-photon:v2.7.0         "redis-server /etc/r…"   7 seconds ago   Up 6 seconds (health: starting)                               redis
b00e5dc5612b   goharbor/harbor-log:v2.7.0           "/bin/sh -c /usr/loc…"   8 seconds ago   Up 7 seconds (health: starting)   127.0.0.1:1514->10514/tcp   harbor-log
[root@localhost harbor]# docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS                    PORTS                       NAMES
6b0e8461dbc7   goharbor/nginx-photon:v2.7.0         "nginx -g 'daemon of…"   46 seconds ago   Up 44 seconds (healthy)   0.0.0.0:81->8080/tcp        nginx
62ae158abb66   goharbor/harbor-jobservice:v2.7.0    "/harbor/entrypoint.…"   46 seconds ago   Up 44 seconds (healthy)                               harbor-jobservice
28e2176fb1d7   goharbor/harbor-core:v2.7.0          "/harbor/entrypoint.…"   46 seconds ago   Up 45 seconds (healthy)                               harbor-core
40c8e07413aa   goharbor/harbor-portal:v2.7.0        "nginx -g 'daemon of…"   47 seconds ago   Up 45 seconds (healthy)                               harbor-portal
f9d764f75910   goharbor/harbor-registryctl:v2.7.0   "/home/harbor/start.…"   47 seconds ago   Up 45 seconds (healthy)                               registryctl
6ece6e3fffb4   goharbor/harbor-db:v2.7.0            "/docker-entrypoint.…"   47 seconds ago   Up 45 seconds (healthy)                               harbor-db
d2a20bccdb04   goharbor/registry-photon:v2.7.0      "/home/harbor/entryp…"   47 seconds ago   Up 45 seconds (healthy)                               registry
7a1dece4b2ed   goharbor/redis-photon:v2.7.0         "redis-server /etc/r…"   47 seconds ago   Up 46 seconds (healthy)                               redis
b00e5dc5612b   goharbor/harbor-log:v2.7.0           "/bin/sh -c /usr/loc…"   48 seconds ago   Up 46 seconds (healthy)   127.0.0.1:1514->10514/tcp   harbor-log
# 升级完成


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  jnZtF7Co41Wg   2023年12月11日   31   0   0 nginx客户端服务端
  wwLZeziuqjLR   2023年12月11日   32   0   0 Dockercentos
  MCWYWqSAMsot   2023年12月11日   33   0   0 Docker
  stLBpDewCLT1   2023年12月08日   30   0   0 nginx
  DnoStTHsc0vp   2023年12月11日   27   0   0 Docker
  wwLZeziuqjLR   2023年12月08日   103   0   0 Dockercentosbash
  jnZtF7Co41Wg   2023年12月10日   22   0   0 nginx客户端服务端NFS