Most active commenters
  • chickensong(5)
  • dang(3)
  • lelanthran(3)

←back to thread

804 points jryio | 27 comments | | HN request time: 0.001s | source | bottom
Show context
tempest_ ◴[] No.45661573[source]
The cloud has made people forget how far you can get with a single machine.

Hosting staging envs in pricey cloud envs seems crazy to me but I understand why you would want to because modern clouds can have a lot of moving parts.

replies(11): >>45661597 #>>45661608 #>>45661636 #>>45661649 #>>45661714 #>>45661726 #>>45661756 #>>45661835 #>>45662162 #>>45662794 #>>45663024 #
rikafurude21 ◴[] No.45661636[source]
The cloud has made people afraid of linux servers. The markup is essentially just the price business has to pay because of developer insecurity. The irony is that self hosting is relatively simple, and alot of fun. Personally never got the appeal of Heroku, Vercel and similar, because theres nothing better than spinning up a server and setting it up from scratch. Every developer should try it.
replies(7): >>45661682 #>>45661700 #>>45661807 #>>45661828 #>>45661946 #>>45661954 #>>45663412 #
1. jampekka ◴[] No.45661828[source]
> The irony is that self hosting is relatively simple, and alot of fun. Personally never got the appeal of Heroku, Vercel and similar, because theres nothing better than spinning up a server and setting it up from scratch.

It's fun the first time, but becomes an annoying faff when it has to be repeated constantly.

In Heroku, Vercel and similar you git push and you're running. On a linux server you set up the OS, the server authentication, the application itself, the systemctl jobs, the reverse proxy, the code deployment, the ssl key management, the monitoring etc etc.

I still do prefer a linux server due to the flexibility, but the UX could be a lot better.

replies(6): >>45661938 #>>45662033 #>>45662094 #>>45663568 #>>45664287 #>>45666447 #
2. tbrownaw ◴[] No.45662033[source]
And all of that takes, what, a week? As a one time thing?
replies(1): >>45662464 #
3. teekert ◴[] No.45662094[source]
I use NixOS and a lot of it is in a single file. I just saw some ansible coming by here, and although I have no experience with it, it looked a lot simpler than Nix (for someone from the old Linux world, like me… eventhough Nix is, looking through your eyelashes, just a pile of key/value pairs).
replies(1): >>45663470 #
4. jcynix ◴[] No.45662464[source]
Takes less than a day, because most of the stuff is scriptable. And for a simple compute node setup at Hetzner (I.e. no bare metal, but just a VM) it takes me less than half an hour.
replies(1): >>45663972 #
5. dang ◴[] No.45662593[source]
Can you please edit out swipes, putdowns, name-calling, etc., from your HN posts? It's not what this site is for, and destroys what it is for.

This is in the site guidelines: https://news.ycombinator.com/newsguidelines.html.

replies(1): >>45675414 #
6. eru ◴[] No.45663470[source]
Nix is great, but it still requires some training and expertise.

And the overlap between what Nix does and what the 'cloud' does for you is only partial. (Eg it can still make sense to use Nix in the cloud.)

7. bigstrat2003 ◴[] No.45663568[source]
> It's fun the first time, but becomes an annoying faff when it has to be repeated constantly.

Certainly true, but there are a whole lot of tools to automate those operations so that you aren't doing them constantly.

replies(2): >>45664673 #>>45674582 #
8. tbrownaw ◴[] No.45663972{3}[source]
But if you're that familiar with it, the overpriced turnkey stuff wouldn't look so tempting in the first place.
9. tonyhart7 ◴[] No.45664287[source]
"The irony is that self hosting is relatively simple"

cloud is easy until is not, for 90% of us maybe we dont need a multi region with hot and cold storage

for those that need it, its neccesary

10. liqilin1567 ◴[] No.45664673[source]
Mind sharing these tools and what each one does?
replies(1): >>45664944 #
11. c0balt ◴[] No.45664944{3}[source]
Ansible, Salt and Puppet are mostly industry standard. Those tools are commonly referred to as configuration management (systems).

Ansible basically automates the workflow of: log in to X, do step X (if Y is not present). It has broad support for distros and OSes. It's mostly imperative and can be used like a glorified task runner.

Salt let's you mostly declaratively describe the state of a system. It comes with a agent/central host system for distributing this configuration from the central host to the minions (push).

Puppet is also declarative and also comes with an agent/central host system but uses a pull based approach.

Specialized/ exotic options are also available, like mgmt or NixOS.

replies(2): >>45665144 #>>45674719 #
12. liqilin1567 ◴[] No.45665144{4}[source]
Thanks, this is very detailed! Could you share some real-world use cases for these tools?

Actually I am looking for tools to automate DevOps and security for self-hosting

replies(3): >>45665822 #>>45666397 #>>45666464 #
13. indigo945 ◴[] No.45665822{5}[source]
Salt and Puppet are useful for managing a fleet of servers running various applications, especially when you need to scale those applications horizontally or want geo-distribution.

Ansible can also do that, on top of literally anything else you could want - network configuration, infrastructure automation, deployment pipelines, migrations, anything. As always, that flexibility can be a blessing or a curse, but I think Ansible manages it well because it's so KISS.

RedHat's commercial Ansible Automation Platform gives you more power for when you need it, but you don't need it starting out.

14. comprev ◴[] No.45666397{5}[source]
A combination of HashiCorp Packer and Ansible means I can "publish" a VM ready-to-rock image to a public cloud provider gallery and use it to run a VM in said cloud.

Ansible-Lockdown is another excellent example of how Ansible can be used to harden servers via automation.

15. lelanthran ◴[] No.45666447[source]
> It's fun the first time, but becomes an annoying faff when it has to be repeated constantly.

I have to ask - do scripts not work for you?

When I had to do this back in 2005 it was automated with 3 main steps:

1. A preseed (IIRC) debian installation disc (all the packages I needed where installed at install time), and

2. Which included a first-boot bash script that retrieved pre-compiled binaries from our internal ftp site, and

3. A final script that applied changes to the default config files and ran a small test to ensure everything started.

Zero human interaction after powering a machine on with the disc in the drive.

These days I would do it even better (system-d configs, Nix perhaps, text files (such as systemd units) can be retrieved automagically after boot, etc).

replies(1): >>45674472 #
16. c0balt ◴[] No.45666464{5}[source]
The other commenter already answered the usecase question, for self-hosting you will likely find ansible the easiest entrypoint.

It is in general the simplest of these systems to get started with and you should be able to incrementally adopt it. There is also a plethora of free online resources available for it.

17. chickensong ◴[] No.45674472[source]
Your example only covers basic provisioning. The additional items mentioned by the parent comment can be a significant investment, both initially and over time.
replies(1): >>45678261 #
18. chickensong ◴[] No.45674582[source]
Even with automation, it can be a full-time job just to keep pace with the rate of change, never mind the initial development which can be non-trivial.
19. chickensong ◴[] No.45674719{4}[source]
> Puppet is also declarative and also comes with an agent/central host system but uses a pull based approach.

The person you're replying to mentioned a self-hosting use case, so this probably isn't relevant for that, but Ansible can also be configured for a pull approach, which is useful for scaling.

20. YouAreWRONGtoo ◴[] No.45675414{3}[source]
I can't help it that humanity is so stupid.
replies(1): >>45677933 #
21. dang ◴[] No.45677933{4}[source]
That's true, but you can stop posting to HN from that place.

Edit: I feel like I should give you a more fulsome response, so here goes:

I understand the frustration. I feel it too, even apart from HN making me feel it as part of my job. But I've had to learn some lessons about this, such as:

1. It doesn't help to assume the position of the-one-who-is-not-stupid. Doing that is supercilious and just means you'll contribute to making things worse.

2. Far better is to accept that, as one is human, one shares in all the qualities of being human, including a full complement of stupidity.

3. I forget the third lesson!

replies(1): >>45682490 #
22. lelanthran ◴[] No.45678261{3}[source]
> Your example only covers basic provisioning.

No. It covered setting up all the applications needed as well (nginx, monitoring agent, etc), installing keys/credentials.

What did parent mention that can't be covered by the approach I used?

replies(1): >>45680428 #
23. chickensong ◴[] No.45680428{4}[source]
I guess I read your comment as OS, the app, and configs, while the parent mentions auxiliary items, ending with "etc etc". The point is, all the extra things that aren't the app take knowledge and resources to set up and maintain.

Sure you can script all the things into 3 steps, just like you can draw an owl with a couple circles.

replies(1): >>45683116 #
24. YouAreWRONGtoo ◴[] No.45682490{5}[source]
Regarding 2., I am not stupid; I might be ignorant in some fields, but do you see me arguing against a world expert in some field I know nothing about?

Stupid people ruin everything.

replies(1): >>45687622 #
25. lelanthran ◴[] No.45683116{5}[source]
> The point is, all the extra things that aren't the app take knowledge and resources to set up and maintain.

Maintain, maybe. The setup for everything extra can scripted, and include a few packages I had to build from source myself because there was no binary download.

replies(1): >>45685388 #
26. chickensong ◴[] No.45685388{6}[source]
I hear you, and I'm passionate about automating all the things. I just wanted to add some perspective to the discussion to set expectations for less experienced people who might be considering a switch from PaaS to DIY.

I'm not a PaaS user, and I encourage people to avoid vendor lock-in and be in control of their own destiny. It takes work though, and you need to sweat the details if you care about reliability and security, which continue to be problem areas for more DIY solutions.

If people aren't willing to put in the work, I'd rather they stick to the managed services so they don't contribute to eroding the already abysmal trust of the industry at large.

27. dang ◴[] No.45687622{6}[source]
Ok, but please do stop posting to HN about how stupid others are. Being smarter is your burden to bear.