harbor helm倉庫使用git
官方文檔地址:https://github.com/goharbor/harborgithub
Monocular 從1.0 開始專一於helm 的UI展現,對於部署以及維護已經去掉了,官方也提供了相關的說明以及推薦了幾個可選的部署工具,從使用以及架構上來講kubeapps 就是Monocular + helm 操做的集合,比Monocular早期版本有好多提高docker
wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz
主要是harbor.cfg文件
目前主要配置hostname和port ,使用本身服務器的ip,修改默認端口號bash
hostname: 192.168.75.100 http: # port for http, default is 80. If https enabled, this port will redirect to https port port: 10000
# 先安裝docker-compose,地址:https://github.com/docker/compose/releases # 須要docker-compose(1.18.0+)版本 curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose # 查看docker-compose版本 [root@ks-allinone harbor]# docker-compose version docker-compose version 1.25.0, build 0a186604 docker-py version: 4.1.0 CPython version: 3.7.4 OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019 # 安裝 ./install.sh --with-clair --with-chartmuseum
使用
地址:http://192.168.75.100:10000
帳號:admin
默認密碼:Harbor12345服務器
其餘操做架構
# 安裝helm curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash # 安裝push 插件 helm init helm plugin install https://github.com/chartmuseum/helm-push # 查看安裝的插件 helm plugin list NAME VERSION DESCRIPTION push 0.7.1 Push chart package to ChartMuseum # 添加harbor helm 私服 # 首先須要建立項目myrepo(當前設計的模式爲public) # chartrepo是必備的,不可缺乏,否則就會推送到默認的library上面去了 helm repo add --username=admin --password=Harbor12345 myrepo http://192.168.75.100:10000/chartrepo/myrepo "myrepo" has been added to your repositories # or 添加特定倉庫 helm repo add --username=admin --password=Harbor12345 myrepo https://xx.xx.xx.xx/chartrepo/myproject # 建立demo helm create app Creating app # 推送到harbor,push helm push --username=admin --password=Harbor12345 app myrepo Pushing app-0.1.0.tgz to myrepo... Done.
登錄Kubeapps後,點擊右上角"Configuration"的"App Repositories",出來的界面就是各個倉庫地址app
點擊"Add App Repository",Name字段填寫"myrepo",URL字段填寫"http://192.168.75.100:10000/chartrepo/myrepo"
Authorization字段選擇"Basic Auth",在右邊出現的界面填寫上登錄Harbor倉庫的帳號和密碼,最後點擊"Install Repo",添加後的效果:
curl
而後返回登錄首頁,點擊"Catalog",在搜索框中輸入Harbor倉庫中添加的helm,好比"app",就會顯示出來
工具