Live data from Hacker News

Reclaiming the lost art of Linux server administration

pietrorea.com

21–30 of 485 posts

Re: Reclaiming the lost art of Linux server administration

#21

Regular SA and DBA jobs will be almost completely gone within a decade or so. Same as there are hardly any auto mechanics anymore because nobody can fix any of the new cars but the manufacturer. You'll only find those jobs at one of the handful of cloud companies. Nobody will know how to do anything for themselves anymore and all this experience and knowledge will be lost. There are no more actual administrators. Jus…

I've been hearing this for the past 20 years. And now my sysadmin skills are more and more in demand. For the past 5 years or so I started making more money than a dev because of supply and demand. Rent to AWS actually drives demand up quite a lot since the bills are huge and very few people understand what is under the hood and how it can be optimized. I doubt very much things will change in the near future. In the…

The low level stuff won't magically disappear, you still will need someone who can debug the kernel or whatever is under the hood when shit blows up in everyone's face

Re: Reclaiming the lost art of Linux server administration

#22

I used to reach for shell scripts to configure servers, then Puppet, then Salt, and then finally to Ansible. Configuring servers declaratively is such a massive improvement over shell scripts. The fact that Ansible is agentless is also very nice and works very well for when you only have a handful of servers. Only thing I dislike is YML, which I think is yucky!

It's a leaky abstraction, though. The problem is that many systems people that were raised only on these abstractions lack the depth to understand what's under the hood when those other layers do unexpected things.

Re: Reclaiming the lost art of Linux server administration

#23
post #9
post #4

Earlier quoted context omitted.

> That advice can cause substantial headache on Ubuntu/Debian, where the Almquist shell is /bin/sh. This does not implement much of bash and will fail spectacularly on the simplest of scripts. This is also an issue on systems using Busybox. At least for Debian and Ubuntu, that's why we start bash scripts with #!/bin/bash, of course. Your point is valid for Busybox, though.

Why would anyone want to target bash specifically which doesn't exist in all systems instead of just sticking to what's implemented in /bin/sh?

You don't really know exactly what you'll get with /bin/sh - you might get bash trying to behave like sh, you might get dash. At least with /bin/bash you're hopefully getting bash. Now you just have to wonder what version...

Re: Reclaiming the lost art of Linux server administration

#24
post #5

Earlier quoted context omitted.

> That advice can cause substantial headache on Ubuntu/Debian, where the Almquist shell is /bin/sh. This does not implement much of bash and will fail spectacularly on the simplest of scripts. That's not really a problem as long as you use #!/bin/bash shebang, and there is nothing wrong in doing that.

Unless bash lives in /usr/local/bin/bash

#!/usr/bin/env bash

Re: Reclaiming the lost art of Linux server administration

#25
post #6

Earlier quoted context omitted.

> that's why we start bash scripts with #!/bin/bash That will also fail spectacularly, as bash does not behave the same when called as /bin/bash as it does when it is /bin/sh. I have principally noticed that aliases are not expanded in scripts unless a shopt is issued, which violates POSIX. Forcing POSIXLY_CORRECT might also help.

Not sure what you are saying, bash behaves as bash when invoked as /bin/bash, and Bourne-shell-ish when invoked as /bin/sh. Lots more detail in the man page. I've never seen use of aliases in a bash script...? They are generally for CLI convenience.

Alias expansion within scripts is mandated by POSIX.

When bash is not in POSIX mode, it violates the standard.

  $ ll /bin/sh
  lrwxrwxrwx. 1 root root 4 Nov 24 08:40 /bin/sh -> bash

  $ cat s1
  #!/bin/sh
  alias p=printf
  p hello\\n

  $ cat s2
  #!/bin/bash
  alias p=printf
  p world\\n

  $ ./s1
  hello

  $ ./s2
  ./s2: line 3: p: command not found

Re: Reclaiming the lost art of Linux server administration

#26
How about security?

Any good resources / practices on making your server safe? and maybe not those kernel level tricks

also automated deployment

so I can commit and it'll be deployed on the server

I thought about using GitHub Actions so when I push, then the server receives HTTP Ping and clones repo and setups the app

Re: Reclaiming the lost art of Linux server administration

#27
post #5

Earlier quoted context omitted.

> That advice can cause substantial headache on Ubuntu/Debian, where the Almquist shell is /bin/sh. This does not implement much of bash and will fail spectacularly on the simplest of scripts. That's not really a problem as long as you use #!/bin/bash shebang, and there is nothing wrong in doing that.

Unless bash lives in /usr/local/bin/bash

and then you use "#!/usr/bin/env bash"

Re: Reclaiming the lost art of Linux server administration

#28
From my experience I would never recommend giving up control of your servers to some third party. Weeks wasted waiting for useless support teams to get back to you on something you could have fixed in 10 minutes if you had root. Opaque configuration issues you can't debug without said useless support team. Needing permission and approval for every little thing on prod. If I was ever at a high level in a company I'd never go farther than some AWS load balancing or whatever on cloud instances we still have root on.

Re: Reclaiming the lost art of Linux server administration

#29

Regular SA and DBA jobs will be almost completely gone within a decade or so. Same as there are hardly any auto mechanics anymore because nobody can fix any of the new cars but the manufacturer. You'll only find those jobs at one of the handful of cloud companies. Nobody will know how to do anything for themselves anymore and all this experience and knowledge will be lost. There are no more actual administrators. Jus…

>Same as there are hardly any auto mechanics anymore because nobody can fix any of the new cars but the manufacturer.

wait, what? definitely not in eastern eu

it seems like there's one mechanic per a few kms

but maybe due to the fact that average car is relatively old

Re: Reclaiming the lost art of Linux server administration

#30

Regular SA and DBA jobs will be almost completely gone within a decade or so. Same as there are hardly any auto mechanics anymore because nobody can fix any of the new cars but the manufacturer. You'll only find those jobs at one of the handful of cloud companies. Nobody will know how to do anything for themselves anymore and all this experience and knowledge will be lost. There are no more actual administrators. Jus…

They are called DevOps now, and management expects them to do everything that isn't pure development including classical IT, and also jump in to fix development if the respective dev is on leave.

Yes, I know that isn't what DevOps is supposed to be, but we all know how Agile turned out, management has a magic touch to distort such concepts.

Post reply on HN