3 ms·
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 htt
by bigfatkitten 2y ago
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 https://github.com/canonical/cloud-init
[2] https://www.puppet.com/ https://www.puppet.com/
- PaulHoule 2y agoI’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.
- bigfatkitten 2y agoI can't say Puppet has ever gotten in my way, but I've been using it for a very long time. I will admit it has a steep learning curve.
- politelemon 2y agoHave 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/introduction.html https://docs.ansible.com/ansible/latest/getting_started/intr...
- JP_Watts 2y agocloud-init looks great, I'll try it for new bare metal installs. How do you get it to work in Docker containers?
- thrw42A8N 2y agoYou don't use cloudinit with Docker containers. You'd use cloudinit to set up the Docker/K8s host on EC2 or similar IaaS. Software for Docker containers is built like this: https://12factor.net/ https://12factor.net/
- JP_Watts 2y agoJust configured my first cloud-unit file and put it on a partitioned USB with the Ubuntu Server iso. It worked! Thanks for the heads up.