安裝harbor

前言

本文介紹如何安裝harbor

操作步驟

tar xvf harbor-offline-installer-v1.5.2.tgz
  • 配置harbor.cfg;

hostname必須帶端口哮洽,如hostname = 58.2.204.146:6110

email 配置

email_identity = 

email_server = smtp.angle.com
email_server_port = 25
email_username = projects@sangle.com
email_password = pro
email_from = project <projects@angle.com>
email_ssl = false
email_insecure = false

  • 配置 Harbor 監(jiān)聽端口 docker-compose.yml
  proxy:
    image: vmware/nginx-photon:v1.5.2
    container_name: nginx
    restart: always
    volumes:
      - ./common/config/nginx:/etc/nginx:z
    networks:
      - harbor
    ports:
      - 6110:80
      - 6111:443
      - 6112:4443
    depends_on:
      - mysql
      - registry
      - ui
      - log
    logging:
      driver: "syslog"
      options:
        syslog-address: "tcp://127.0.0.1:1514"
        tag: "proxy"
  • 運行install.sh 開始安裝Harbor;

harbor.cfg參數(shù)詳細說明

參數(shù)類型

配置參數(shù)在文件 harbor.cfg內(nèi).

該文件中有2類參數(shù)麦牺,必須參數(shù),和選填參數(shù);

必須參數(shù):這些參數(shù)是必須配置的凳干,如果重新配置這些參數(shù)彰阴,需要重新執(zhí)行install.sh

選配參數(shù):這些參數(shù)不是必須填寫的,我么可以設置成為默認參數(shù)田盈,在WEB啟動之后我們可以在UI界面中設置畜号,該類參數(shù)只有第一次運行的時候會生效;

參數(shù)說明

Required parameters:
  • hostname: The target host's hostname, which is used to access the UI and the registry service. It should be the IP address or the fully qualified domain name (FQDN) of your target machine, e.g., 192.168.1.10 or reg.yourdomain.com. Do NOT use localhost or 127.0.0.1 for the hostname - the registry service needs to be accessible by external clients!
  • ui_url_protocol: (http or https. Default is http) The protocol used to access the UI and the token/notification service. If Notary is enabled, this parameter has to be https. By default, this is http. To set up the https protocol, refer to Configuring Harbor with HTTPS Access.
  • db_password: The root password for the MySQL database used for db_auth. Change this password for any production use!
  • max_job_workers: (default value is 3) The maximum number of replication workers in job service. For each image replication job, a worker synchronizes all tags of a repository to the remote destination. Increasing this number allows more concurrent replication jobs in the system. However, since each worker consumes a certain amount of network/CPU/IO resources, please carefully pick the value of this attribute based on the hardware resource of the host.
  • customize_crt: (on or off. Default is on) When this attribute is on, the prepare script creates private key and root certificate for the generation/verification of the registry's token. Set this attribute to off when the key and root certificate are supplied by external sources. Refer to Customize Key and Certificate of Harbor Token Service for more info.
  • ssl_cert: The path of SSL certificate, it's applied only when the protocol is set to https
  • ssl_cert_key: The path of SSL key, it's applied only when the protocol is set to https
  • secretkey_path: The path of key for encrypt or decrypt the password of a remote registry in a replication policy.
  • log_rotate_count: Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.
  • log_rotate_size: Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes. If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G are all valid.
Optional parameters
  • Email settings: These parameters are needed for Harbor to be able to send a user a "password reset" email, and are only necessary if that functionality is needed. Also, do note that by default SSL connectivity is not enabled - if your SMTP server requires SSL, but does not support STARTTLS, then you should enable SSL by setting email_ssl = true. Setting email_insecure = true if the email server uses a self-signed or untrusted certificate. For a detailed description about "email_identity" please refer to rfc2595

  • harbor_admin_password: The administrator's initial password. This password only takes effect for the first time Harbor launches. After that, this setting is ignored and the administrator's password should be set in the UI. Note that the default username/password are admin/Harbor12345 .

更多詳細參數(shù)可見GITHUB 網(wǎng)站

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末允瞧,一起剝皮案震驚了整個濱河市简软,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌述暂,老刑警劉巖痹升,帶你破解...
    沈念sama閱讀 222,590評論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異畦韭,居然都是意外死亡疼蛾,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,157評論 3 399
  • 文/潘曉璐 我一進店門艺配,熙熙樓的掌柜王于貴愁眉苦臉地迎上來察郁,“玉大人,你說我怎么就攤上這事转唉∑つ疲” “怎么了?”我有些...
    開封第一講書人閱讀 169,301評論 0 362
  • 文/不壞的土叔 我叫張陵赠法,是天一觀的道長鳞芙。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么原朝? 我笑而不...
    開封第一講書人閱讀 60,078評論 1 300
  • 正文 為了忘掉前任驯嘱,我火速辦了婚禮,結果婚禮上喳坠,老公的妹妹穿的比我還像新娘鞠评。我一直安慰自己,他們只是感情好壕鹉,可當我...
    茶點故事閱讀 69,082評論 6 398
  • 文/花漫 我一把揭開白布剃幌。 她就那樣靜靜地躺著,像睡著了一般晾浴。 火紅的嫁衣襯著肌膚如雪负乡。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,682評論 1 312
  • 那天脊凰,我揣著相機與錄音抖棘,去河邊找鬼。 笑死狸涌,一個胖子當著我的面吹牛切省,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播帕胆,決...
    沈念sama閱讀 41,155評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼朝捆,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了懒豹?” 一聲冷哼從身側(cè)響起芙盘,我...
    開封第一講書人閱讀 40,098評論 0 277
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎脸秽,沒想到半個月后儒老,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,638評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡豹储,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,701評論 3 342
  • 正文 我和宋清朗相戀三年贷盲,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片剥扣。...
    茶點故事閱讀 40,852評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡巩剖,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出钠怯,到底是詐尸還是另有隱情佳魔,我是刑警寧澤,帶...
    沈念sama閱讀 36,520評論 5 351
  • 正文 年R本政府宣布晦炊,位于F島的核電站鞠鲜,受9級特大地震影響宁脊,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜贤姆,卻給世界環(huán)境...
    茶點故事閱讀 42,181評論 3 335
  • 文/蒙蒙 一榆苞、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧霞捡,春花似錦坐漏、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,674評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至砰碴,卻和暖如春躏筏,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背呈枉。 一陣腳步聲響...
    開封第一講書人閱讀 33,788評論 1 274
  • 我被黑心中介騙來泰國打工趁尼, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人碴卧。 一個月前我還...
    沈念sama閱讀 49,279評論 3 379
  • 正文 我出身青樓弱卡,卻偏偏與公主長得像乃正,于是被迫代替她去往敵國和親住册。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,851評論 2 361

推薦閱讀更多精彩內(nèi)容