1

For the second time in three months, bitbucket is down

https://status.developer.atlassian.com/

Now I wonder whether HA-git is possible or we should switch. Thanks to this it will be hard to finish the work before the deadline...

What other options do we have for the future? I am considering to start with on premise git as this did not break as often as the Saas solution. It ran without issues for almost 2 years and if there was a issue with the gitlab I configured then I could at least solve it or create a new gitlab and push the git repo as is.

Currently everybody is blocked as neither pull requests could be merged nor code could be pushed or pulled.

I do not want this anymore and I am quite disappointed.

As @Tensibai indicated that it is possible to use multiple remote git's:

My reply: "yes you are right. It is possible to setup multiple remote. What if code is pushed to gitlab and github and a PR is created on github. How to ensure that the code will be updated on gitlab and vice versa without making it tedious for most engineers?"

Based on the advice of @Tensibai, two different git repository will be added as a remote and it will be investigated how it works out.

  • Git is not centralised by nature, you should be able to merge work from two workstation with a git diff sent by mail. Another option is to use a machine with an ssh server for temporary centralisation as in the doc: git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server (remember you can setup multiple remotes on a repository) – Tensibai Mar 2 '18 at 22:05
  • @Tensibai yes you are right. It is possible to setup multiple remote. What if code is pushed to gitlab and github and a PR is created on github. How to ensure that the code will be updated on gitlab and vice versa without making it tedious for most engineers? – 030 Mar 2 '18 at 22:23
  • Web hooks, sync scripts, there's a bunch of way to tackle the problem but it's highly dependent on what your company is comfortable with I think. In brief there's no silver bullet that I know – Tensibai Mar 2 '18 at 23:07
  • Does HA stand for high availability? :-) – Peter Mar 3 '18 at 9:05
  • Yes, I will replace it by the high-availabilty tag – 030 Mar 3 '18 at 9:52
5

So, I know I’ve praised GitLab in my other answer to your questions before, but it really is awesome. They have a an HA solution called GitLab Geo. It’s primarily meant to speed up GitLab usage for geographically distributed teams, but the other main benefit is that the read-only secondary server can be easily promoted to be the master:

https://about.gitlab.com/features/gitlab-geo/

But to get back to your specific question: no. There is not really a way to get true high availability if you are relying on someone else. You can only ensure true HA if you have control over the infrastructure. This is one of the downfalls of using all SaaS solution. You have to hope thei internal ops teams have a good implementation under the hood.

For that reason, I wouldn’t even recommend using something like GitHub or GitLab.com SaaS paid plans. You should look into self hosted options considering this problem has severely affected your team’s ability to reach deadlines.

As @Tensibai mentioned, this is achievable with multiple remotes, sync scripts, watch processes, and other “glue code”, but it would be a lot of work and a lot to maintain. Another solution would be to self host a Git solution inside a docker container. You could have the file store backed by something like EFS and the database hosted in Amazon RDS. I’ve not tried this setup myself, but the theory is there: make the application hosting ephemeral, keep the files and datastore in a proven high-available system. Amazon’s uptime numbers are really good, though you still have the issue on relying on others here. The difference here is that the entire system isn’t out of your control. In the event your application Docker instance goes down, simply spin it up somewhere else and change the DNS.

That all being said, self-hosted GitLab on the other hand does have the magic bullet Geo solution that I previously mentioned. I’ve used it and it’s really nice 😉

2

Take a look at Gitea, https://gitea.io/en-US/, much easier to host yourself than Gitlab and you are in control if things go down. I think that by making the database backend HA you could roll out more Gitea frontends.

Another option to know about at least is Keybase private Git, https://keybase.io/blog/encrypted-git-for-everyone. Have not tried it or know anything about how it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.