gitlab高可用


 

1. gitlab 使用容器方式啟動的,分別在 192.168.1.247 , 192.168.1.248 兩個節點部署;
2. 兩個節點共同掛載nfs存儲到本地/nfs-storage;

```bash
192.168.1.249:/storage /nfs-storage nfs rsize=8192,wsize=8192,timeo=14,intr
```

3. gitlab 容器將數據目錄映射在nfs-掛載目錄,實現兩個節點故障切換后數據一致\(轉到Gitlab/README.md\)

4. 使用Keepalived 地址漂移功能進行故障切換\(轉到Gitlab\_高可用-Keepalived\)

5. 使用compose啟動后可能會有無法發送郵件的問題,安裝以下方法修改重啟即可;

[https://github.com/sameersbn/docker-gitlab/blob/18a5b1a5ab059f89628b59752ec07af9e6d147d5/assets/runtime/config/gitlabhq/gitlab.yml](https://github.com/sameersbn/docker-gitlab/blob/18a5b1a/assets/runtime/config/gitlabhq/gitlab.yml)

/home/git/gitlab/config/initializers/smtp\_settings.rb

```
ActionMailer::Base.smtp_settings = {
address: "smtp.exmail.qq.com",

port: 465,

user_name: "git@boke.com",

password: "66666666",

domain: "exmail.qq.com",

authentication: :login,

enable_starttls_auto: true,

openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options
}
```

待續.............


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM