我目前在Docker上安装了GitLab omnibus . 我计划通过将其添加到Kubernetes并使用Gluster持久化来获得相同的HA . 我玩过Guberter配置Kubernetes . 现在是时候将GitLab带入Kubernetes了 . GitLab使用PostgreSQL作为默认数据库 .
我的问题是要实施HA,我应该这样做
a)将GitLab拆分为GitLab应用程序和PostgreSQL容器,然后在他们自己的pod集群中运行(Application和DB),即单独部署GitLab app和PostgreSQL的副本?
要么
b)继续使用omnibus安装程序,只有这个单独的容器的副本?
它是否真的有所不同
1)写入发生在通过服务公开的数据库集群到GitLab应用程序
要么
2)直接写入omnibus GitLab容器(其中有db)
只是想确保我不会不必要地最终使设置变得复杂 . 在Kubernetes和Gluster一起使用GitLab已经让事情变得有点复杂 . 那么拆分应用程序和数据库是否有意义,或者仅仅是多功能设置就足够了?关注对db的并发写入 .
1 回答
根据http://docs.gitlab.com/ce/install/kubernetes/gitlab_omnibus.html#introduction you should use dedicated Redis and PostgreSQL HA集群 . 选项b)和1)
为减少停机时间,最好使用 PostgreSQL master-slave cluster(https://www.postgresql.org/docs/10/static/different-replication-solutions.html)和 Redis Cluster master-slave (https://redis.io/topics/cluster-tutorial) . "Note that the minimal (Redis) cluster that works as expected requires to contain at least three master nodes" .
如果您只使用GlusterFS将故障转移到PostgreSQL,那么当一个数据库实例崩溃而另一个数据库实例崩溃时,您可能会遇到一些需要手动修复的错误 . 像这样:How do I fix Postgres so it will start after an abrupt shutdown?