CentOS 7.5 Installation and Configuration of Harbor 1.7

  • 2021-07-10 21:10:57
  • OfStack

1. Download the required package


wget -P /usr/local https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-online-installer-v1.7.1.tgz

2. Unzip the file


tar zxf /usr/local/harbor-online-installer-v1.7.1.tgz -C /usr/local/

3. Modify the Harbor configuration

hostname: Configure host name. You can't set 127.0. 0.1, localhost. You can set IP or domain name

ui_url_protocol: Specifies whether to use the HTTP protocol or the HTTPS protocol

Email settings: Mailbox settings, option configuration, only effective at the first start, can be modified after logging in UI

harbor_admin_password: Sets the administrator's initial password to be used only on the first logon

auth_mode: User authentication mode, the default is db_auth, or ldap_auth authentication can be used.

db_password: Using db requires specifying a password to connect to the database

self_registration: The default is on, and the new version can be modified in the graphical interface.

max_job_workers: Maximum number of operations, default is 10

customize_crt: Generate certificate for token; default is on

ssl_cert: Path to nginx, cert and key files, only using https protocol is meaningful

ssl_cert: Path to nginx, cert and key files, only using https protocol is meaningful

secretkey_path: The path of secretkey storage

admiral_url: Admiral 's url, comment this attribute, or set its value to NA when Harbor is standalone

clair_db_password: calir service is not enabled, but the following related parameter configuration should be checked in the "./prepare" file under the decompression directory, and cannot be commented, otherwise the environment preparation check cannot pass, and the related error of "ConfigParser.NoOptionError: No option u 'clair_db_password' in section: u 'configuration'" is reported; Or annotate related checks and definitions in "./prepare", but it should be noted that there are too many associations in the file, so it is recommended to modify the "harbor. cfg" file

ldap_url: ladp related settings. If ldap certification is not adopted, but the following related parameter configuration should be checked in the "./prepare" file under the decompression directory, which cannot be commented, otherwise the environment preparation check cannot pass, and report "ConfigParser. NoOptionError: No option u 'ldap_timeout' in section: u 'configuration'" related errors; Or comment related checks and definitions in "./prepare", but it should be noted that there are too many associations in the file, so it is recommended to modify the "harbor. cfg" file

ldap_scope:

self_registration: Self-registration is turned on by default and off is turned off

token_expiration: token valid time, default 30minutes

project_creation_restriction: Create project permission control, default is "everyone" (owner), can be set to "adminonly" (administrator)

verify_remote_cert: Is authentication ssl used when communicating with remote registry

Others use default values

4. Install docker-compose

yum install docker-compose

5. Execute prepare and install. sh under the Harbor directory

6. Other physical machines docker link to this machine

vi /etc/docker/daemon.json

Join


{
"insecure-registries" : ["Harbor Warehouse address "]
}

Step 7 Log in

docker login HarborIp

Summarize


Related articles: