If you are a linux user, I am pretty sure you must have reinstalled it time and again. May be for an upgrade, may be for fun. But when you do a reinstall, the painful part is to redo all the configurations and reinstall all the software packages. It is time consuming and sometimes I just can't remember what packages I had installed in my old machine. So I have come up with some workarounds but I would be glad to know your trick too. Do share you knowledge on this topic.
This is for a product setup, so that's why I have chosen PHP. I have made a module that benefits from PHPs SSH connector and from there do the whole setup. It also uses Amazon AWS' API to create a server so in 1 command I can create a new instance that will automatically be booted up as web- or database server. It can also, with another command, create both and link them together.
I tried with Docker but this added too much overhead on the maintenance. The PHP solution is really nice because it's just a list of commands send to the server.
Is your question about your own Linux work station/laptop/sandbox, or about a server?
If you're talking about a server, Ansible, but also Terraform and cloud-init directive (injected in AWS via userdata) make it super easy to have a descriptive one-command install to get an immutable infrastructure. With more context I could provide more details, feel free to ask
j
stuff ;)
j
stuff ;)
hmm there several ways:
For example: stateful (puppet (provisioning client) + puppeteer (provisioning - server)) are things like puppet -> you save your puppet configuration and you system will be restored to this template. (ruby)
so you update your puppet configuration and your system will update as well as you got a meta representation of you configuration.
stateless ansible / fabric again same thing you can version it in git and trigger your setup via ansible script. They basically do the thing that Emil Moe mentioned but you can have it concurrent with results (python)
Those are just the top of my head things. And ofc I tend to put everything biznez related into a LXC container aka docker. But even here as moe mentioned it depends on your usecase as well as time and interest in this topic.