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: "[email protected]",

password: "66666666",

domain: "exmail.qq.com",

authentication: :login,

enable_starttls_auto: true,

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

待续.............

猜你喜欢

转载自www.cnblogs.com/jin-yuana/p/9791773.html