Harbor introduction
Harbor is an open source enterprise repository for container mirroring. If your enterprise is using container technology, harbor is a good choice for container mirroring.
Harbor contains the following features:
- Rights management (RBAC), LDAP, auditing
- Security vulnerability scanning
- Mirror check true
- Provide management interfaces
- Provision of a registry
- HA HA.
At the same time, according to the characteristics of Chinese users, the design of mirror copy and Chinese support and other functions.
“Our mission is to be the trusted cloud native mirror warehouse in the Kubernetes ecosystem.”
Official address: goharbor. IO /
Official demo address: demo.goharbor. IO /
Two, harbor installation
There are two types of installation: online and offline. This article uses online installation.
Making address: github.com/goharbor/ha…
1. Prepare for installation
Harbor v2.x contains the following components
Hardware requirements are as follows:
The software version requirements are as follows:
Firewall open ports are as follows:
Update dependent software versions:
Yum remove docker 1.13.1-205. Git7d71120. El7. Centos. X86_64 yum remove docker - common - 2:1. 13.1-204. Git0be3e21 el7. X86_64#Removed old version docker1.13 shipped with centos7
wget https://repo.huaweicloud.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
#Obtain the Huawei cloud Docker-CE image source
yum install docker-ce docker-compose openssl
#Stable Docker and OpenSSL are installed
#Test version[root@VM-0-5-centos yum. Repos. D]# docker version Client: Docker Engine - Community version: 20.10.6 API version: 1.41 Go version: go1.13.15 Git commit: 370c289 Built: Fri Apr 9 22:45:33 2021 OS/Arch: Linux /amd64 Context: default Experimental: True [root@VM-0-5-centos yum. Repos. D]# docker-compose version docker-compose version 1.18.0, Build 8DD22a9 docker-py version: 2.6.1 CPython version: 3.6.8 OpenSSL version: OpenSSL 1.0.2K-fips 26 Jan 2017Copy the code
2. Install the harbor
Obtain the v2.1.5 installation script and decompress it
wget https://pd.zwc365.com/seturl/https://github.com/goharbor/harbor/releases/download/v2.1.5/harbor-online-installer-v2.1.5. tgz
#Extract the Harbor folder[root@VM-0-5-centos harbor]# ls common.sh harbor.yml harbor.yml.tmpl input install.sh LICENSE prepare cp harbor.yml.tmpl /root/harbor/harbor.yml#Copy the yML configuration file to /root/harbor/harbor.yml
Copy the code
Edit the configuration file as follows to disable HTTPS authentication. vim /root/harbor/harbor.yml
Configure the docker image source, vim /etc/dock/daemon. json
{
"registry-mirrors": [
"https://uyqa6c1l.mirror.aliyuncs.com",
"https://hub-mirror.c.163.com",
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com",
"https://registry.docker-cn.com"
]
}
Copy the code
Start the Docker and execute the installation script.
Wait for the mirror to end
Verify the installation http://ip. The following installation is complete.
The next article will briefly explain how Docker gets its image from Harbor.
Feel free to point out any shortcomings in the comments section.
Favorites, likes and questions are welcome. Follow the top water cooler managers and do something other than pipe hot water.