当前位置:网站首页>[deploy private warehouse based on harbor] 3 deploy harbor
[deploy private warehouse based on harbor] 3 deploy harbor
2022-06-11 06:58:00 【Lone ranger_ Atao】
Catalog
1.1 install Docker Service and configure Alibaba cloud accelerator
1.1.1 Install the base package
1.1.2 To configure YUM Mirror warehouse
1.1.4 modify deamon.json To configure docker Alicloud image Accelerator
1.2 install docker-compose service
2.3 modify harbor.yml The configuration file
3.1 Access address and account number
Last one , We have the machine ready , The next step is to operate the machine for a while .
The first thing to understand is ,harbor rely on docker and docker-compose, So we need to install these two services .
1 Prepositive action
1.1 install Docker Service and configure Alibaba cloud accelerator
1.1.1 Install the base package
yum -y install yum-utils device-mapper-persistent-data lvm2 1.1.2 To configure YUM Mirror warehouse
yum-config-manager --add-repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo1.1.3 install Docker service
# Inquire about docker edition
yum list docker-ce --showduplicates|sort -r
# Install the specified version , Choose according to the production environment I installed 18.09.8 edition
yum -y install docker-ce-18.09.8 1.1.4 modify deamon.json To configure docker Alicloud image Accelerator
I don't have Alibaba cloud image accelerator , So we can only use the netizens' for the time being :
Running the following command will automatically complete the configuration ( After you run the command, you will generate /etc/docker/daemon.json):
( The following command copies all , And paste it into the at one time terminal Inside , It will run automatically immediately , And finally stop on the last line of command , Enter again , It is all finished )
mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{
"registry-mirrors": ["https://k1ktap5m.mirror.aliyuncs.com"]
}
EOF
mkdir -p /etc/systemd/system/docker.service.d
systemctl daemon-reload
systemctl restart docker && systemctl enable docker1.2 install docker-compose service
Official address :
Releases · docker/compose · GitHub
https://github.com/docker/compose/releases
1.2.1 download
Log in GitHub , Find the corresponding version to download ( The following command , The author installed 1.27.4 Version of docker-compose), And put the downloaded file in /usr/local/bin Under the table of contents
curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose1.2.2 Add execute permission
chmod +x /usr/local/bin/docker-compose1.2.3 View version
docker-compose -version2 Deploy harbor
2.1 download
Log in to the official address to download the corresponding version : https://github.com/goharbor/harbor/releases
https://github.com/goharbor/harbor/releases
I download 2.1.1 The version of the command is as follows :
wget https://github.com/goharbor/harbor/releases/download/v2.1.1/harbor-offline-installer-v2.1.1.tgz2.2 decompression
take harbor The service is pressurized to /home Under the table of contents , All the following operations take the decompressed directory as the current directory
tar xvf harbor-offline-installer-v2.1.1.tgz -C /home/ && cd /home/harbor/2.3 modify harbor.yml The configuration file
By default, only one is unzipped harbor.yml.tmpl, This is harbor.yml The template of
Based on this, create a harbor.yml The template of :
cp harbor.yml.tmpl harbor.ymlnormal ,harbor.yml Is to provide https Access to the , So you can configure https, But I think localization is a mirror warehouse , There is no need to toss about so much , So I used http Access to , The following configuration is for http Configuration of the access mode of , If you want to https access , I will attach a reference link to it later .
[[email protected] harbor]# vi harbor.yml
.....
.....
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: 192.168.211.5 ########## Modify domain name , Because I don't set the domain name , So I set the local ip
http: # port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https related config
# https:######### Comment out
# # https port for harbor, default is 443
# port: 443 ######### Comment out
# # The path of cert and key files for nginx
# certificate: /home/harbor/certs/harbor.crt ######### Comment out
# private_key: /home/harbor/certs/harbor.key ######### Comment out
.....
.....
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: admin ######### admin User login password
# Harbor DB configuration
database:
# The password for the root user of Harbor DB. Change this before any production use.
password: root ######### Database password
# The default data volume
data_volume: /data ######### The directory is created by itself , Fill in... According to the actual situation , The author stays still 2.4 Start the service
./install.sh Success log :

3 Use harbor platform
3.1 Access address and account number
The access address is harbor Of the deployed machine ip, The port number is us harbor.yml The port number specified in the . The default account is admin, The password is also in the configuration file , We designated .
Let's say mine is :
account number :admin/admin

3.2 Main panel
Log in :

Click item library Go to project details :

The following push command , stay http It cannot be used directly under the agreement , Because the default is https Protocol to push , So just write 192.168.211.5 If the port is not written , Default access 443 port . The following command is only a reference , Next , I will share the right http The writing method of the push command of the protocol .
Next , Push the mirror image to harbor
边栏推荐
猜你喜欢

Use of qscriptengine class

Implementation of customization function page of online Fox game server room configuration wizard service
![[probability theory and mathematical statistics] Dr. monkey's notes p41-44 statistics related topics, determination of three distributions, properties, statistics subject to normal distribution in gen](/img/93/d1014b07c924195e062dc83d69b14a.png)
[probability theory and mathematical statistics] Dr. monkey's notes p41-44 statistics related topics, determination of three distributions, properties, statistics subject to normal distribution in gen

你知道IT人才外派服务报价是怎样的么?建议程序员也了解下

client-go gin的简单整合六-list-watch二(关于Rs与Pod以及Deployment的完善)
![Illustration of JS implementation from insertion sort to binary insertion sort [with source code]](/img/e5/1956af15712ac3e89302d7dd73f403.jpg)
Illustration of JS implementation from insertion sort to binary insertion sort [with source code]

ESP32学习笔记(49)——ESP-WIFI-MESH接口使用

saltstack部署lnmp

Latex various arrows / arrows with text labels / variable length arrows
![Handwritten promise [05] - exception capture of promise method and optional parameters of then method implementation](/img/e7/87069f921ae003511e32b23653703c.jpg)
Handwritten promise [05] - exception capture of promise method and optional parameters of then method implementation
随机推荐
Use of qscriptengine class
Array information management system reconfiguration preheating (1) how to write basic logic using linear continuous structure?
Completed in May, 22
Quality-aware Feature Aggregation Networkfor Robust RGBT Tracking
网狐游戏服务器房间配置向导服务定制功能页实现
[matlab printed character recognition] OCR printed letter + number recognition [including source code 1861]
Whether the ZABBIX monitoring host is online
Method to determine whether it is an array
JS judge whether the year is a leap year and the number of days in the month
【Matlab印刷字符识别】OCR印刷字母+数字识别【含源码 1861期】
Open source cartoon server mango
Start the Nacos server of shell script
Drawing with qpainter
Graph Attention Tracking
About the designer of qtcreator the solution to the problem that qtdesigner can't pull and hold controls normally
3.1 naming rules of test functions
3.1 测试函数的命名规则
Redux learning (I) -- the process of using Redux
Quick sorting of graphic array [with source code]
Redux learning (III) -- using Redux saga, writing middleware functions, and splitting reducer files