I would like to have a mechanism to set up a server automagically…

Similarly I would like to set up my user account settings (Tmux plugins, .zshrc and vim settings, etc) that I can replicate in multiple machines via a script (I have a custom script for this but I want a more solid alternative)

Thoughts on what infra-as-code solution would work best? Any similar experiences or use cases with one Thanks!
Cc @selfhost@lemmy.ml @selfhosted@lemmy.world

  • Voroxpete@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    1 year ago

    “I want to automatically build VMs, networks, and other infra in the cloud using repeatable specifications.”

    Terraform

    “I want to host my own cloud (either by paying for bare metal hosting, or providing my own) that I can deploy those VMs on.”

    Openstack or Openshift

    “I want to automatically configure servers after deployment.”

    Ansible

    “I want to deploy services to those servers in a simple, repeatable fashion.”

    Docker, Podman, or Kubernetes.

      • Voroxpete@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        I completely agree. But I’m working from the assumption that if OP actually needs the ability to automatically provisions platforms, they’re probably working at a larger scale than the typical small self-hosted home server. And I like to give options.

        IMO, the only tools here that most self hosters need are Docker, and maybe Ansible, though even that is a stretch because in most cases you’re just going to have one server running all your containers and that’s it.

        It’s the whole “Cattle vs Pets” question. When you’re a typical self hoster, you’re probably better off just treating every server as a pet. But if you’re using self hosting as a way of building job skills (which is exactly how I broke into IT) then you absolutely want to start learning how to wrangle cattle.