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
    9
    ·
    edit-2
    11 months 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.

  • Atemu@lemmy.ml
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    11 months ago

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

    NixOS.

    Similarly I would like to set up my user account settings

    Home-manager.

  • johntash@eviltoast.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 months ago

    You’re probably looking for some sort of configuration management tool like chef, ansible, saltstack, or puppet. If you’re not already familiar with one, ansible is pretty easy to get started with.

    If you’re also wanting something that can create the server itself, terraform is great and supports most cloud providers and supervisors.

  • Moonrise2473@feddit.it
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    If it’s because you set new servers very frequently: Ansible

    If it’s because moving stuff once every two years to a new server is an hassle: everything in custom docker images

  • MajorHavoc@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    I think you’re looking for Ansible. Have fun!

    The difference between an Anible playbook and a script, is Ansible has a ‘check’, ‘change’, ‘verify’ pattern, and is declarative (meaning that once the playbook is made, it tends to keep working on future versions of Ansible.)

    • marx2k@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      11 months ago

      Ehhh… as someone who does devops, you should dive into ansible core changelogs on github sometime ;)

      • MajorHavoc@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        11 months ago

        I assume you mean to check on his often they’re is the breaking changes? :)

        Declarative style isn’t perfect, but it’s a massive improvement from straight bash scripting.

        • marx2k@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          💯

          We’re an ansible shop and yeah it’s better than bash scripting (where it makes sense) but ansible… man it does have some peculiarities :/