102-9机器上安装部署harbor(二)

韵味老鸟 2024-07-14 13:10:57

102-9 机器上安装部署harbor (二)

#执行获取

cd /data/tools/harbor

./prepare

#执行安装,自动生成docker-compose.yaml文件并启动服务

./install.sh --with-notary --with-trivy --with-chartmuseum

[Step 4]: starting Harbor ...➜ Chartmusuem will be deprecated as of Harbor v2.6.0 and start to be removed in v2.8.0 or later. Please see discussion here for more details. https://github.com/goharbor/harbor/discussions/15057➜ Notary will be deprecated as of Harbor v2.6.0 and start to be removed in v2.8.0 or later. You can use cosign for signature instead since Harbor v2.5.0. Please see discussion here for more details. https://github.com/goharbor/harbor/discussions/16612[+] Running 17/17 ⠿ Network harbor_harbor-notary Created 0.1s ⠿ Network harbor_notary-sig Created 0.1s ⠿ Network harbor_harbor Created 0.1s ⠿ Network harbor_harbor-chartmuseum Created 0.1s ⠿ Container harbor-log Started 0.6s ⠿ Container harbor-portal Started 1.6s ⠿ Container redis Started 1.7s ⠿ Container chartmuseum Started 1.5s ⠿ Container harbor-db Started 1.4s ⠿ Container registry Started 1.7s ⠿ Container registryctl Started 1.5s ⠿ Container trivy-adapter Started 2.3s ⠿ Container notary-signer Started 2.0s ⠿ Container harbor-core Started 2.3s ⠿ Container notary-server Started 2.4s ⠿ Container harbor-jobservice Started 2.8s ⠿ Container nginx Started 3.0s✔ ----Harbor has been installed and started successfully.----

#启动harbor,前一步骤已经启动服务

cd /data/tools/harbor

docker-compose up -d

#访问验证,配置本地Host解析

https://harbor.meng.com

账号:admin

密码:Harbor12345

###安装harbor时支持 chartmuseum

vi harbor.yml# 修改配置项,把chart的配置项配置为enabledchart: absolute_url: enabled# 停止harbor服务docker-compose stop# 重新生成部署yaml./prepare# 安装chartmuseum./install.sh --with-chartmuseum# 关于使用chartmuseum# loginhelm registry login harbor.umi-meta.com --username=admin --password=lzSCoeNF3WnwDe1zwUq1# add repohelm repo add --username=admin --password=lzSCoeNF3WnwDe1zwUq1 meta-charts https://harbor.umi-meta.com/chartrepo/meta# update repohelm repo update meta-charts# push charthelm cm-push game-broker/ meta-charts -v 0.1.2

./install.sh --with-notary --with-trivy --with-chartmuseum

#增加支持Helm

#chartrepo,固定参数,bigdata自定义项目

helm repo add --ca-file /data/chartmuseum/charts/cert/ca.crt --cert-file /data/chartmuseum/charts/cert/harbor.meng.com.cert --key-file /data/chartmuseum/charts/cert/harbor.meng.com.key local-harbor --username=admin --password=Harbor12345 https://harbor.meng.com/chartrepo/meng

部署到/data/harbor目录下

0 阅读:1