Harbor部署为Chart仓库

2 篇文章 0 订阅

Harbor部署为Chart仓库

1:当前harbor环境已具备

[root@node-11 harbor]# 
[root@node-11 harbor]# docker-compose ps
      Name                     Command               State             Ports          
--------------------------------------------------------------------------------------
chartmuseum         /docker-entrypoint.sh            Up      9999/tcp                 
harbor-core         /harbor/harbor_core              Up                               
harbor-db           /docker-entrypoint.sh            Up      5432/tcp                 
harbor-jobservice   /harbor/harbor_jobservice  ...   Up                               
harbor-log          /bin/sh -c /usr/local/bin/ ...   Up      127.0.0.1:1514->10514/tcp
harbor-portal       nginx -g daemon off;             Up      8080/tcp                 
nginx               nginx -g daemon off;             Up      0.0.0.0:80->8080/tcp     
redis               redis-server /etc/redis.conf     Up      6379/tcp                 
registry            /entrypoint.sh /etc/regist ...   Up      5000/tcp                 
registryctl         /harbor/start.sh                 Up                               
[root@node-11 harbor]# 

2:启用HarborChart仓库服务

[root@node-11 harbor]# 
[root@node-11 harbor]# 
[root@node-11 harbor]# pwd
/software/harbor
[root@node-11 harbor]#  ./install.sh --with-chartmuseum

[Step 0]: checking installation environment ...

Note: docker version: 19.03.8

Note: docker-compose version: 1.18.0

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


[Step 2]: preparing environment ...
prepare base dir is set to /software/harbor
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registry/root.crt
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
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
loaded secret from file: /secret/keys/secretkey
Generated configuration file: /config/chartserver/env
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir


Note: stopping existing Harbor instance ...
Stopping nginx             ... done
Stopping harbor-jobservice ... done
Stopping harbor-core       ... done
Stopping harbor-portal     ... done
Stopping registry          ... done
Stopping redis             ... done
Stopping registryctl       ... done
Stopping harbor-db         ... done
Stopping harbor-log        ... done
Removing nginx             ... done
Removing harbor-jobservice ... done
Removing harbor-core       ... done
Removing harbor-portal     ... done
Removing registry          ... done
Removing redis             ... done
Removing registryctl       ... done
Removing harbor-db         ... done
Creating harbor-log ... done
Removing network harbor_harbor
Removing network harbor_harbor-chartmuseum
WARNING: Network harbor_harbor-chartmuseum not found.


Creating harbor-db ... done
Creating harbor-core ... done
Creating network "harbor_harbor-chartmuseum" with the default driver
Creating harbor-jobservice ... done
Creating harbor-portal ... 
Creating chartmuseum ... 
Creating registryctl ... 
Creating registry ... 
Creating redis ... 
Creating harbor-db ... 
Creating harbor-core ... 
Creating nginx ... 
Creating harbor-jobservice ... 

? ----Harbor has been installed and started successfully.----

Now you should be able to visit the admin portal at http://node-11. 
For more details, please visit https://github.com/goharbor/harbor .

[root@node-11 harbor]# 

启用后,默认创建的项目就带有helm charts功能了。

3:安装push插件

# helm plugin install https://github.com/chartmuseum/helm-push

4 :添加repo

[root@node-16 ~]# helm repo add  --username admin --password root123 myrepo http://100.100.100.100/chartrepo/library
"myrepo" has been added to your repositories
[root@node-16 ~]# 
[root@node-16 ~]#

 

5: 推送与安装Chart

[root@node-16 ~]# helm push mychart-0.1.0.tgz --username=admin --password=root123 http://100.100.100.100/chartrepo/library
Pushing mychart-0.1.0.tgz to http://10.83.35.11/chartrepo/library...
Done.
[root@node-16 ~]# 
[root@node-16 ~]# helm push demo-0.1.0.tgz --username=admin --password=root123 http://100.100.100.100/chartrepo/library
Pushing demo-0.1.0.tgz to http://100.100.100.100/chartrepo/library...
Done.
[root@node-16 ~]# 
[root@node-16 ~]# 

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值