Live data from Hacker News

What scripts have you built to stand up a new server?

news.ycombinator.com

1–10 of 55 posts

Re: What scripts have you built to stand up a new server?

#3

This is what cloud-init[1], Puppet[2] et al a for. I haven't done this with shell scripts in at least 15 years. [1] https://github.com/canonical/cloud-init [2] https://www.puppet.com/

I’ve written Java programs that write a bash script that runs under cloud init. It’s a lot less code than Puppet, it “just works” and you never hear that “you can’t get from there” or spend three days to find out how to configure something you could configure in three minutes if Puppet wasn’t involved.

Re: What scripts have you built to stand up a new server?

#5

This is what cloud-init[1], Puppet[2] et al a for. I haven't done this with shell scripts in at least 15 years. [1] https://github.com/canonical/cloud-init [2] https://www.puppet.com/

Have a look at ansible too, you can have what are called 'runbooks' to set up your server the way you want.

https://docs.ansible.com/ansible/latest/getting_started/intr...

Re: What scripts have you built to stand up a new server?

#6

On mobile at the moment, can't share - but I have a great library of Ansible roles. Strongly recommended for those looking for inspiration. Give "ansible-doc --list" a spin! This shows modules, it can filter for existing roles as well.

Thanks! I haven't looked at Ansible before

Re: What scripts have you built to stand up a new server?

#7

This is what cloud-init[1], Puppet[2] et al a for. I haven't done this with shell scripts in at least 15 years. [1] https://github.com/canonical/cloud-init [2] https://www.puppet.com/

cloud-init looks great, I'll try it for new bare metal installs. How do you get it to work in Docker containers?

Re: What scripts have you built to stand up a new server?

#9
This will be an unpopular answer, but none. Karpenter for AWS, Rackspace spot, or microk8s up… Stock Debian + Kubernetes means I never have to configure a host system again. Even raid these days is one line of config: “instanceStorePolicy: RAID0”.

My Raspberry Pis at home are maybe the only exception, in which case I don’t need to harden anything as they’re isolated on my network and run trivial things like a webcam.

I’ve been a Linux sysadmin my entire professional life, and I’ll never go back to VIMing conf files ever again. It’s wonderful.

That said, if you do have to do this, Packer and Ansible still exist.

Post reply on HN