CTK-001-编译

Flume的案列使用

  返回  

企业运维--docker-搭建harbor仓库

2021/7/21 9:30:15 浏览:

准备docker-compose

  1. compose链接:https://pan.baidu.com/s/1Yfa2bY9SpjwSFPz6YZ4mUQ#list/path=%2F
    提取码:y7c6
mv docker-compose /usr/local/bin/
chmod +x docker-compose
  1. 检查docker-compose是否安装成功
[root@server2 bin]# docker-compose --version
docker-compose version 1.21.1, build 5a3f1a3

准备harbor

  1. 解压harbor到 /usr/local
[root@server2 ~]# tar zxf harbor-offline-installer-v1.10.1.tgz -C /usr/local/
  1. 修改配置文件

[root@server2 harbor]# pwd
/usr/local/harbor
[root@server2 harbor]# ls
common.sh  harbor.v1.10.1.tar.gz  harbor.yml  install.sh  LICENSE  prepare
[root@server2 harbor]# vim harbor.yml 
[root@server2 harbor]# 

 5 hostname: 172.25.12.2
32   password: westos
64   max_job_workers: 3

3 .启动harbor

[root@server2 harbor]# ./install.sh 


[Step 0]: checking if docker is installed ...

Note: docker version: 19.03.15

[Step 1]: checking docker-compose is installed ...

Note: docker-compose version: 1.21.1

[Step 2]: loading Harbor images ...
47a4bb1cfbc7: Loading layer [==================================================>]  34.26MB/34.26MB
c2d9cf7a4eaf: Loading layer [==================================================>]  9.056MB/9.056MB
32b7eca4f03e: Loading layer [==================================================>]   9.71MB/9.71MB
5d104292391f: Loading layer [==================================================>]   9.71MB/9.71MB
Loaded image: goharbor/clair-adapter-photon:v1.0.1-v1.10.1
0039915754c6: Loading layer [==================================================>]  12.83MB/12.83MB
0a4ba5bc8bc2: Loading layer [==================================================>]  49.37MB/49.37MB
Loaded image: goharbor/harbor-jobservice:v1.10.1
db95a8bece9e: Loading layer [==================================================>]  78.32MB/78.32MB
f9aa9f9a3393: Loading layer [==================================================>]  3.072kB/3.072kB
f0baa86a6ccd: Loading layer [==================================================>]   59.9kB/59.9kB
2b8f0a44b78f: Loading layer [==================================================>]  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v1.10.1
a9f6374f6301: Loading layer [==================================================>]   9.05MB/9.05MB
b3c39a738965: Loading layer [==================================================>]  6.239MB/6.239MB
dce1aa68054e: Loading layer [==================================================>]  16.04MB/16.04MB
612aac9b538e: Loading layer [==================================================>]  28.24MB/28.24MB
8612386fb841: Loading layer [==================================================>]  22.02kB/22.02kB
53883649d694: Loading layer [==================================================>]  50.52MB/50.52MB
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.10.1
f3967aa0de5f: Loading layer [==================================================>]  115.8MB/115.8MB
42fd590be962: Loading layer [==================================================>]  12.14MB/12.14MB
096b03f3e32b: Loading layer [==================================================>]  3.072kB/3.072kB
aa66bf3b8224: Loading layer [==================================================>]  49.15kB/49.15kB
8e76391190c9: Loading layer [==================================================>]  3.584kB/3.584kB
131573c722d5: Loading layer [==================================================>]  13.02MB/13.02MB
Loaded image: goharbor/clair-photon:v2.1.1-v1.10.1
69e43242ff64: Loading layer [==================================================>]  50.39MB/50.39MB
5a3a8e835993: Loading layer [==================================================>]  3.584kB/3.584kB
4dff480c159c: Loading layer [==================================================>]  3.072kB/3.072kB
2be454a39481: Loading layer [==================================================>]   2.56kB/2.56kB
d6b4877d5c4e: Loading layer [==================================================>]  3.072kB/3.072kB
609537197cce: Loading layer [==================================================>]  3.584kB/3.584kB
b52d06cad304: Loading layer [==================================================>]  12.29kB/12.29kB
Loaded image: goharbor/harbor-log:v1.10.1
badcf9296df7: Loading layer [==================================================>]  9.056MB/9.056MB
8b17ed0102b2: Loading layer [==================================================>]  3.584kB/3.584kB
4d1cd50b8d4f: Loading layer [==================================================>]  3.072kB/3.072kB
491c41e50d6a: Loading layer [==================================================>]  21.76MB/21.76MB
0101dc4148c7: Loading layer [==================================================>]  22.59MB/22.59MB
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.10.1
77965b8f534b: Loading layer [==================================================>]  14.61MB/14.61MB
940bf05c9601: Loading layer [==================================================>]  28.24MB/28.24MB
7ca206eb72e3: Loading layer [==================================================>]  22.02kB/22.02kB
9898774a5bad: Loading layer [==================================================>]  49.09MB/49.09MB
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.10.1
86340c56281e: Loading layer [==================================================>]  9.055MB/9.055MB
8ac45c34690f: Loading layer [==================================================>]  42.31MB/42.31MB
4aa70453f992: Loading layer [==================================================>]  3.072kB/3.072kB
6cbc6ab111b2: Loading layer [==================================================>]  3.584kB/3.584kB
d6d7b70c18b5: Loading layer [==================================================>]  43.14MB/43.14MB
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.10.1
07efa003923d: Loading layer [==================================================>]  9.056MB/9.056MB
96dd65c291de: Loading layer [==================================================>]  3.584kB/3.584kB
802a1397679e: Loading layer [==================================================>]  21.76MB/21.76MB
92c283f6895a: Loading layer [==================================================>]  3.072kB/3.072kB
8b61b91240a6: Loading layer [==================================================>]  8.662MB/8.662MB
1fd753477b6f: Loading layer [==================================================>]  31.24MB/31.24MB
Loaded image: goharbor/harbor-registryctl:v1.10.1
48cda078e98d: Loading layer [==================================================>]  10.89MB/10.89MB
Loaded image: goharbor/nginx-photon:v1.10.1
2c00d9af2c3f: Loading layer [==================================================>]  34.31MB/34.31MB
0e4ae15c3d4e: Loading layer [==================================================>]  339.9MB/339.9MB
27810c9ff1a9: Loading layer [==================================================>]  135.2kB/135.2kB
Loaded image: goharbor/harbor-migrator:v1.10.1
93e0577272a9: Loading layer [==================================================>]  34.24MB/34.24MB
fb3507ff707e: Loading layer [==================================================>]  117.4MB/117.4MB
f59c6315bf8a: Loading layer [==================================================>]  42.32MB/42.32MB
5c5501748347: Loading layer [==================================================>]   2.56kB/2.56kB
3710d94e58dd: Loading layer [==================================================>]  1.536kB/1.536kB
06e0f1585c01: Loading layer [==================================================>]  166.4kB/166.4kB
bf5ac9b9c61c: Loading layer [==================================================>]   3.01MB/3.01MB
Loaded image: goharbor/prepare:v1.10.1
9ea2dad46741: Loading layer [==================================================>]  10.89MB/10.89MB
b280b9e7ca3b: Loading layer [==================================================>]  7.696MB/7.696MB
a1ce7c1130ee: Loading layer [==================================================>]  223.2kB/223.2kB
3b0492a7358b: Loading layer [==================================================>]  195.1kB/195.1kB
c64d6e6c80dd: Loading layer [==================================================>]  15.36kB/15.36kB
ace4e9064f06: Loading layer [==================================================>]  3.584kB/3.584kB
Loaded image: goharbor/harbor-portal:v1.10.1
b74d8257d4e7: Loading layer [==================================================>]  12.83MB/12.83MB
92f141040819: Loading layer [==================================================>]   42.5MB/42.5MB
33c99383fac5: Loading layer [==================================================>]  5.632kB/5.632kB
2bacc160d10f: Loading layer [==================================================>]  40.45kB/40.45kB
f51bed904fbe: Loading layer [==================================================>]   42.5MB/42.5MB
Loaded image: goharbor/harbor-core:v1.10.1
a2ffdaaa3434: Loading layer [==================================================>]  63.56MB/63.56MB
5745ac9e0297: Loading layer [==================================================>]  54.44MB/54.44MB
dc1d24cbb1d5: Loading layer [==================================================>]  5.632kB/5.632kB
4280f2f98340: Loading layer [==================================================>]  2.048kB/2.048kB
0f9279b20eec: Loading layer [==================================================>]   2.56kB/2.56kB
8b9162d25131: Loading layer [==================================================>]   2.56kB/2.56kB
50ad7481e5af: Loading layer [==================================================>]   2.56kB/2.56kB
54b809bfb5ec: Loading layer [==================================================>]  10.24kB/10.24kB
Loaded image: goharbor/harbor-db:v1.10.1


[Step 3]: preparing environment ...

[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
ERROR:root:Error: The protocol is https but attribute ssl_cert is not set

报错了百度一下
ERROR:root:Error: The protocol is https but attribute ssl_cert is not set
得到解决方法,将harbor.yml中https注释

# https related config
#https:
  # https port for harbor, default is 443
  #port: 443
  # The path of cert and key files for nginx
  #certificate: /your/certificate/path
  #private_key: /your/private/key/path

再启动一次

[root@server2 harbor]# ./install.sh 

[Step 0]: checking if docker is installed ...

Note: docker version: 19.03.15

[Step 1]: checking docker-compose is installed ...

Note: docker-compose version: 1.21.1

[Step 2]: loading Harbor images ...
^C
[root@server2 harbor]# ./install.sh 

[Step 0]: checking if docker is installed ...

Note: docker version: 19.03.15

[Step 1]: checking docker-compose is installed ...

Note: docker-compose version: 1.21.1

[Step 2]: loading Harbor images ...
Loaded image: goharbor/clair-adapter-photon:v1.0.1-v1.10.1
Loaded image: goharbor/harbor-jobservice:v1.10.1
Loaded image: goharbor/redis-photon:v1.10.1
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.10.1
Loaded image: goharbor/clair-photon:v2.1.1-v1.10.1
Loaded image: goharbor/harbor-log:v1.10.1
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.10.1
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.10.1
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.10.1
Loaded image: goharbor/harbor-registryctl:v1.10.1
Loaded image: goharbor/nginx-photon:v1.10.1
Loaded image: goharbor/harbor-migrator:v1.10.1
Loaded image: goharbor/prepare:v1.10.1
Loaded image: goharbor/harbor-portal:v1.10.1
Loaded image: goharbor/harbor-core:v1.10.1
Loaded image: goharbor/harbor-db:v1.10.1


[Step 3]: preparing environment ...

[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/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/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/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /secret/keys/secretkey
Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir



[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating harbor-db     ... done
Creating harbor-portal ... done
Creating redis         ... done
Creating registryctl   ... done
Creating registry      ... done
Creating harbor-core   ... done
Creating harbor-jobservice ... done
Creating nginx             ... done
✔ ----Harbor has been installed and started successfully.----

成功
4. 输入172.25.12.2进入harbor
在这里插入图片描述

联系我们

如果您对我们的服务有兴趣,请及时和我们联系!

服务热线:18288888888
座机:18288888888
传真:
邮箱:888888@qq.com
地址:郑州市文化路红专路93号