News for hackers. Stuff that matters.
Re:Running servers and services well is not trivial (2018) by pid-1 on Saturday March 26, 2022 @10:02AM (#30811853)
"just run your own git server" comments always make me scratch my head.

IMO folks managing services for personal use vastly underestimate how much harder everything can get in an actual business environment.

Re:Running servers and services well is not trivial (2018) by nijave on Saturday March 26, 2022 @10:15AM (#30811977)
I don't think it's necessarily just "personal use". The complexity quickly scales with the company size. Replacing Github with Gitlab might be a week-long project at a small company but could easily turn into a multi-year project at a large one.

It's not just a technical problem, either. Bigger companies tend to have more expertise-oriented teams (security, compliance, developer tooling, operations, internal infrastructure) which tends to make decisions more difficult than when a single person or team can do it themselves.

Re:Running servers and services well is not trivial (2018) by vlunkr on Saturday March 26, 2022 @11:12AM (#30812515)
> Replacing Github with Gitlab might be a week-long project at a small company

A week-long project initially. Now you have to install updates, set up and maintain secure access, reboot or troubleshoot when it dies, etc. Installing things is the easy part.

Re:Running servers and services well is not trivial (2018) by coward123 on Saturday March 26, 2022 @02:31PM (#30814101)
No kidding. I would have preferred to migrate the client to GitHub, but they were convinced that wasn't acceptable - had to run their own GitLab. Turned into a mess of managing Gitlab updates and BS rather than working on the product.
Re:Running servers and services well is not trivial (2018) by netizen-936824 on Saturday March 26, 2022 @12:02PM (#30813024)
What kind of a company doesn't have at least one sysadmin, I feel like that's kind of a critical position for maintaining systems?
Re:Running servers and services well is not trivial (2018) by icedchai on Saturday March 26, 2022 @01:46PM (#30813788)
You'd be surprised. Most dedicated sysadmins and DBA positions were done away with as part of the "devops" movement, especially as everything moved to the cloud and there were no longer physical systems to maintain. Developers are smart, they can just do that work too, right? It's all just typing. /s
Re:Running servers and services well is not trivial (2018) by buffet_overflow on Saturday March 26, 2022 @01:00PM (#30813447)
The problem is when they have more services than sysadmins. While the sysadmins are busy upgrading the git server, the logging infrastructure suffers. They pivot to work on that, now the CI/CD server is down/slow/randomly breaking. But the sysadmin that knew the ins and outs of it left last quarter so the new sysadmins don't want to touch it. Oh, and management doesn't prioritize any of this stuff, so actually jumping two versions on the git server is a much bigger, fragile ordeal now than it was a month ago.
Re:Running servers and services well is not trivial (2018) by CameronNemo on Saturday March 26, 2022 @03:19PM (#30814527)
Exactly.

Our team of 6 sysadmins manages:

- DNS appliances, storage appliances, NTP appliances,

- hypervisors, Dev/stage/prod k8s clusters, some other k8s clusters

- dev/prod Elasticsearch/Logstash/Kibana clusters

- internal GitLab, Jira, Confluence, nautobot, OpenDCIM, a deprecated Twiki

- several internal custom apps

- Probably more I am forgetting.

Nothing gets patched consistently. Everything is neglected to a certain degree.

Re:Running servers and services well is not trivial (2018) by stevekemp on Sunday March 27, 2022 @01:13PM (#30821936)
In a previous job I managed a migration from bitbucket (!) to self-hosted Github Enterprize. As part of the migration I forced the creation of a monthly "backup restore test".

Every month we had a recipe to spin up a new instance of the Github appliance, and import the most recent backup into it.

A lot of systems do tend to get a little neglected over time, and of course different organizations have different priorities, but I insisted on this because I figured for that particular company the Github instance was one of the most critical components - if it is down people can't work.

Re:Running servers and services well is not trivial (2018) by rhizome on Saturday March 26, 2022 @05:54PM (#30815697)
I'm not going to die on this hill, but that seems like a lot of complexity for a company with in-house skills, maybe even the worst of both (in-house vs cloud/managed) worlds.
Re:Running servers and services well is not trivial (2018) by nijave on Thursday March 31, 2022 @12:33PM (#30869178)
Haven't worked at a startup yet with a sysadmin. They either have devops or SREs take care of infrastructure but those types tend to be cross functional so they're also handling infrastructure, operations, incident response, developer tooling, CI/CD environments, code performance issues (basically everything that's not application development).

One company I was at heavily used SaaS and AWS for everything so there weren't very many systems to manage. We'd just jam everything in Docker containers and use AWS ECS. Patching hosts was just rotating to a new AMI on AWS; patching applications was updating dependencies.

Re:Running servers and services well is not trivial (2018) by throw0101a on Sunday March 27, 2022 @07:52PM (#30825365)
> What kind of a company doesn't have at least one sysadmin, I feel like that's kind of a critical position for maintaining systems?

Even if they have one, that sysadmin could be incompetent or out of their depth.

Just started a new job where the last guy was decent enough, but what ended up being built up needs to basically be redone, e.g., a giant /21 network: no server VLAN/subnet, or separate network for network management interfaces or server IPMI.

Re:Running servers and services well is not trivial (2018) by vlunkr on Monday March 28, 2022 @11:32AM (#30831596)
> could be incompetent or out of their depth

Or just overworked. In theory you can self-host everything, but there's a always a time tradeoff.

Re:Running servers and services well is not trivial (2018) by coward123 on Saturday March 26, 2022 @02:33PM (#30814119)
Loads of non-profits and small businesses that have surprisingly demanding tech needs but can't afford / don't understand / can't manage / have only a part-time need, etc.
Re:Running servers and services well is not trivial (2018) by netizen-936824 on Saturday March 26, 2022 @03:22PM (#30814558)
Its literally essential to have solid tech these days. I don't understand how businesses think they can operate while skimping or even skipping a halfway decently funded IT dept
Re:Running servers and services well is not trivial (2018) by WJW on Saturday March 26, 2022 @04:01PM (#30814860)
It's not even close to essential, since by far the majority of businesses are running without anything close to what people on HN would consider adequate. It only becomes a problem if too many of your competitors have good tech and even then only if your industry depends on (software) tech. Companies like bakeries and building contractors can run fine with shitty IT and even if their competitors do IT better, no customer is going to drive further to get a bread from someone who has proper backups instead of from the closest shop.
Re:Running servers and services well is not trivial (2018) by nijave on Thursday March 31, 2022 @12:39PM (#30869268)
Sysadmins are expensive. >$100k/yr (in the US, at least) for a full time sysadmin when your other employees are taking $40-60k/yr is a pretty huge expense. If you're not a technology company, there's a good chance you'll look to just outsource it anyway (how are you even going to vet/hire someone in IT when you have no IT department already)
Re:Running servers and services well is not trivial (2018) by throw0101a on Sunday March 27, 2022 @07:56PM (#30825390)
> I don't understand how businesses think they can operate while skimping or even skipping a halfway decently funded IT dept

If a business does not have someone knowledge about IT, how can they know that they have 'deficiencies' with regards to IT?

Things are the way they are and they think that's 'normal' because they don't know any better.

Re:Running servers and services well is not trivial (2018) by nijave on Thursday March 31, 2022 @01:00PM (#30869564)
Big business: We can look at our SIEM and endpoint management dashboards and determine that our end user machines are reaching end of useful life due to resource consumption and failure frequency

Small business: Please IT help my 5 year old laptop can't keep up and I swear it's not a virus. Yes, I updated everything

It's amazing watching friends/family outside of tech work. Within 2 minutes of watching someone's machine slow to a crawl, I open Task Manager on Windows and see they're out of RAM and their machine is heavily paging: Yeah, if you had another $40 8GB stick of RAM your machine would be significantly more responsive.

Re:Running servers and services well is not trivial (2018) by marginalia_nu on Saturday March 26, 2022 @10:37AM (#30812191)
A git server is just a computer with ssh access, though. Git itself is designed in a way where it doesn't even need a server.

If you keep it simple, it stays simple.

Re:Running servers and services well is not trivial (2018) by maccard on Saturday March 26, 2022 @11:48AM (#30812884)
A postgres server is just a computer with 5432 open instead of 22.

> If you keep it simple, it stays simple.

Things that work well for one person in isolation don't work at scale or for teams. How do you handle authentication for your git server? What about backups? Manage disk space? Updates? That's before you get to the point of dealing with workflows and integrations, or "it's slow when 10 people clone at the same time"

Re:Running servers and services well is not trivial (2018) by marginalia_nu on Saturday March 26, 2022 @12:06PM (#30813057)
Every cloned git repository is a backup. That's like the entire point of git. It's decentralized version control. This is why the notion of a "git server" is a bit of an oxymoron.

Most of the things you're struggling to solve are effectively preventing it from actually working as intended.

Re:Running servers and services well is not trivial (2018) by maccard on Saturday March 26, 2022 @12:51PM (#30813387)
> Every cloned git repository is a backup

Is it? If I checksum the .git folder on my workstation and my co-workers workstation they're going to come back different. There's no guarantees that I haven't rebased main, or that I have all of the branches that were stored on the remote. If something catastrophic happens to our main remote, which one of our versions do we restore to?

> It's decentralized version control.

Just because git is decentralised, doesn't mean that it can only be used in a decentralised way. How many teams are pushing/pulling like a p2p network, and deploying to servers/clients from their workstations and verifying that the commit hash of their local repository matches what's deployed? A vanishingly small number of people.

> Most of the things you're struggling to solve are effectively preventing it from actually working as intended

If everyone is using it wrong, the tool is wrong. There are billion dollar companies out there that are based on a centralised git service, which proves that people can (and do) use tools in the way that makes sense, not necessarily as they were designed. Personally I'm glad I don't have to share patches over mailing lists with my coworkers, but you do you.

Re:Running servers and services well is not trivial (2018) by nemetroid on Saturday March 26, 2022 @01:50PM (#30813816)
> There's no guarantees that I haven't rebased main,

You may have rebased your local main branch, but that doesn't affect your origin/main reference.

> or that I have all of the branches that were stored on the remote.

Everytime you pull or fetch, you get all the branches stored on the remote. Of course, you're not going to have any branches that were added after the last time you communicated with the remote.

> If something catastrophic happens to our main remote, which one of our versions do we restore to?

The origin/main that's the most recent.

Re:Running servers and services well is not trivial (2018) by maccard on Tuesday March 29, 2022 @06:17AM (#30840760)
Sorry I missed this reply:

> that doesn't affect your origin/main reference.

Who is to say that my origin/main is the same as your origin/main, or that my origin is the same as what our running application is using as it's origin?

> Of course, you're not going to have any branches that were added after the last time you communicated with the remote.

Exactly, so you're relying on the fact that _someone_ has the latest version without actually verifying it.

> The origin/main that's the most recent.

Assuming all our origins are the same.

Re:Running servers and services well is not trivial (2018) by senko on Saturday March 26, 2022 @01:39PM (#30813725)
I believe the core of your argument is that GitHub and GitLab provide more than just git DVCS. I don't think anyone argues with that.

However, this core argument is obscured by a very emotional rejection of what the parent is saying - that you don't always need these additional things, and that you can (sometimes? often?) keep things simple. I think that's an interesting point to discuss.

> If something catastrophic happens to our main remote, which one of our versions do we restore to?

Dunno, talk it through? I hope you have a good enough relationship with your coworker that you can discuss your work with them.

> Just because git is decentralised, doesn't mean that it can only be used in a decentralised way

The OP not only did not say git can only be used in a decentralised way, they actually mentioned a git server - ie. a central point.

> There are billion dollar companies out there that are based on a centralised git service, which proves that people can (and do) use tools in the way that makes sense, not necessarily as they were designed.

Nobody argued otherwise. But, it is also true that there are billion-dollar companies out there that use an internal git service. How do I know that? Both GitHub and GitLab sell on-premises versions to those types of companies :)

> Personally I'm glad I don't have to share patches over mailing lists with my coworkers, but you do you.

Rationally, this argument is so off it can only be result of an emotional outburst. OP never mentioned sharing patches over mailing lists, and has in fact stated that it's easy to host git server.

I understand and respect your argument and agree GitHub, GitLab and others provide valuable service. But gees, chill out, man. https://xkcd.com/386/

Re:Running servers and services well is not trivial (2018) by maccard on Tuesday March 29, 2022 @06:30AM (#30840837)
> You don't always need these additional things, and that you can (sometimes? often?) keep things simple. I think that's an interesting point to discuss.

Agreed, however in my experience advocates for this kind of simplicity "don't need" these things, except they ad-hoc rely on piecemeal solutions.

> Dunno, talk it through? I hope you have a good enough relationship with your coworker that you can discuss your work with them.

This works on a team of 2. On a team of 10/20/50/100, pausing everything for everyone to figure out seems like a terrible idea. And teams of 2 quickly become teams of 10.

> they actually mentioned a git server - ie. a central point.

But they ignore all of the overhead of running a server, and fall back on it being decentralized as a solution to the "problems" of runnign a server.

> Rationally, this argument is so off it can only be result of an emotional outburst.

I'd really rather you didn't stoop to personal attacks on me, especially as I've done nothing of the sort.

> OP never mentioned sharing patches over mailing lists, and has in fact stated that it's easy to host git server.

OP said in his comment "Most of the things you're struggling to solve are effectively preventing it from actually working as intended. ". Given that git was designed for the linux kernel [0], a reasonable criticism of "working as intended" is criticising the workflow it was designed around. Running a git server doesn't give you _any_ way to collaborate or work with people, you need to build all of that tooling on top of it. The linux kernel uses patches distributed by email, despite hosting a git server.

> But gees, chill out, man. https://xkcd.com/386/

I've downvoted you specifically for this part of your comment, it's an unnecessary personal attack.

[0] https://git-scm.com/book/en/v2/Getting-Started-A-Short-Histo...

Re:Running servers and services well is not trivial (2018) by senko on Tuesday March 29, 2022 @06:08PM (#30849003)
I disagree on many points here, but I don't think either of us is going to convince the other.

Instead, I'll just apologize: I'm sorry if my comment came across as an attack. I didn't mean it as such. I've seen too many flamewars over trivialities.

Re:Running servers and services well is not trivial (2018) by RealStickman_ on Saturday March 26, 2022 @12:50PM (#30813384)
You don't want to ask your users for their local backup

Edit: To expand on my comment a bit.

1. You will have to check with every user when they last pulled their repos and/or made any local change and wanted to push it.

2. While your git is offline and you're figuring out which version is the most up to date your users can't do any work with git

3. You just lost all your issues, pull requests, wiki articles and more that isn't stored in git

4. Making backups is your job as a systems administrator and you just failed spectacularly

Re:Running servers and services well is not trivial (2018) by Hackbraten on Saturday March 26, 2022 @01:17PM (#30813550)
But what would your disaster recovery process look like?
Re:Running servers and services well is not trivial (2018) by marginalia_nu on Saturday March 26, 2022 @01:36PM (#30813702)
$ git clone ...
Re:Running servers and services well is not trivial (2018) by Hackbraten on Sunday March 27, 2022 @04:04AM (#30818575)
Allow me to rephrase.

You’re responsible for 1000 Git repositories used by developers all over your department. Some (or even all) of those have just been wiped in a ransomware attack.

Whom are you going to tell to `git clone` what from where?

Re:Running servers and services well is not trivial (2018) by marginalia_nu on Sunday March 27, 2022 @09:48AM (#30820204)
From any machine who has checked out the code? That's sort of the point of git. Any cloned version of a repository is a "git server" in itself.
Re:Running servers and services well is not trivial (2018) by 0ldskool on Monday March 28, 2022 @07:19PM (#30836798)
So the solution is to individually track down each cloned git repo on developers workstations. Then have each developer open up SSH access for others to clone using SSH or run an HTTP server? Also keep in mind not all repo's may have been cloned, up-to-date, etc...

DVCS is designed to propagate code to many people and allow them to easily modify and share with others who also have a copy. If people don't have a copy they can get a copy of a copy (which at some point may have been modified). In a large company you need a Single source of centralized truth. You cannot build a company on the concept of "it works on my dev workstation" or the worse suggestion here "all the company's IP source code is on only on my dev workstation".

Re:Running servers and services well is not trivial (2018) by hedora on Saturday March 26, 2022 @03:18PM (#30814520)
You need to have port 22 open to manage the postgres server. Postgres also (probably) has a worse track record with remotely exploitable bugs than openssh.

Answering your other questions:

Authentication: ssh keys

Backups: the same way you back up the rest of the machine (s3 snapshots of ebs?), or run a second server at a different site with a cron job that runs "git fetch --all" or whatever.

Manage disk space: It's not the 90's anymore. How are you running a 1TB machine out of disk space with a git repo?

Updates: Enable unattended updates in whatever distro you are running. If you are running a separate backup server, pick more than one upstream operating system (redhat, Debian, arch, BSD), so a botched update won't break both.

Git hooks work fine for workflows and integrations.

Is it really slow when 10 people clone at once? How is that even possible on modern hardware with 100's GB of RAM and dozens of cores?

Re:Running servers and services well is not trivial (2018) by nijave on Saturday March 26, 2022 @10:42AM (#30812247)
Sure but the article isn't talking about a "git" server. It's talking about replacing Github with Gitlab which is a fully integrated developer workflow tool with code review functionality. They use "Git server" a lot in the article, but the opening and closing both specifically mention a Github replacement.
Re:Running servers and services well is not trivial (2018) by marginalia_nu on Saturday March 26, 2022 @11:30AM (#30812694)
Right, but git itself has no concept of code reviews, if that's what you want, maybe you shouldn't be looking for a git server, but some mechanism for code reviews.
Re:Running servers and services well is not trivial (2018) by jeltz on Saturday March 26, 2022 @03:15PM (#30814480)
Yes? That is presumably exactly what they are looking for. They just worded it poorly.

The reason people use GitHub and Gitlab is usually not because they want a git server. For that there are much better tools like gitolite.

Re:Running servers and services well is not trivial (2018) by jjtheblunt on Saturday March 26, 2022 @06:38PM (#30816003)
So what's running on machine X so that it can function as a remote for git pull etc?
Re:Running servers and services well is not trivial (2018) by TacticalCoder on Saturday March 26, 2022 @06:57PM (#30816091)
> So what's running on machine X so that it can function as a remote for git pull etc?

SSH and Git.

Re:Running servers and services well is not trivial (2018) by jjtheblunt on Monday March 28, 2022 @01:27PM (#30833072)
sshd can't alone be it...i bet there must be an account for git to access on the server when reaching out from the "client" / peer.