Code Monkey home page Code Monkey logo

harborha's Introduction

Harbor HA 安裝手冊

Harbor HA 架構

!!! 此文件的IP以及環境配置皆以這張架構圖為準,若環境不同,請參考架構圖自行更換IP !!!

Role Node 1 IP Node 2 IP Node 3 IP
Harbor 100.67.191.10 100.67.191.11 N\A
HarborLB 100.67.191.119 100.67.191.118 N\A
HarborVIP 100.67.191.201
MariaDB 100.67.191.121 100.67.191.122 100.67.191.123
MariaLB 100.67.191.129 100.67.191.128 N\A
MariaVIP 100.67.191.120
Redis 100.67.191.111 100.67.191.112 N\A
RedisVIP 100.67.191.110
NFS Server 100.67.191.8

Harbor 此架構主要由三大項目組成

1. Harbor Node和其LoadBalancer

(Active/Active)
藉由keepalived將流量平均分配到其下Harbor Node

2. MariaDB Cluster

(Active/Active)
由三個MariaDB 透過Galera 建立cluster,在藉由Keepalived將流量平均分配

3. Redis Cluster

(Active/StandBy)
透過Redis本身的Master/Slave設定加上Keepalived的腳本設計,達到Redis的高可用架構

軟體版本/需求

Software Version Description
Harbor v1.5.0 https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installer-v1.5.0.tgz
Redis >= 4.0.6
MariaDB >= 10.2.14
Python > v2.7
Docker > 1.10
Docker compose > 1.6.0

Network Ports / Settings

Port Protocol Description
80 http Harbor UI and API will accept requests on this port for http protocol
443 https Harbor UI and API will accept requests on this port for https protocol
4443 https Connections to the Docker Content Trust service for Harbor, only needed when Notary is enabled
6379 Default redis port
3306 Default MariaDB port
5432 Default Postgress port

Keepalived setting

role vid
Harbor 75
Redis 11
MariaDB 21

環境建置

Redis HA Cluster

Link to redis cluster setup guide


Maria DB Cluster

Link to MariaDB cluster setup guide


NFS 架設

Harbor建議使用具有共享且同步功能的儲存空間例如 Swift, S3, azure, Ceph 或是NFS
在這個範例內我們直接在100.67.191.8上面架設了一個nfs server.
可參考
Setup NFS Mounts On Ubuntu 16.04 LTS Servers For Client Computers To Access


Harbor Cluster

Link to harbor cluster


HA 注意事項

  1. 確保防火牆不會阻擋我們使用到的port
  2. Node fail 之後重開 有可能iptable prerouting會消失 建議設定成每次開機自動設定
  3. Harbor Node上面NFS的mount也建議設定為開機自動Mount
  4. Redis Node上面redis sever fail或是node reboot後都要同時啟動redis-server和keepalived
  5. 不同service 的keepalived virtual router id必須不同,否則keepalived會失效。

Reference

Redis Keepalived HA
MariaDB cluster
Harbor HA Guide

harborha's People

Contributors

mjace avatar

Stargazers

[Hurd]Donkey avatar  avatar Sheng Zheng avatar libincla avatar  avatar Alan Peng avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.