I’m trying to add new nodes (Linux servers) to my cluster but I have to first configure my nodes properly, i.e. setting up the firewall, closing ports, disabling password login, setting up git, etc… This is all very time consuming and can go wrong easily due to human mistakes. How do I automate this process ideally? What tools are used for this? I read about Terraform, Ansible, but I feel kinda lost with all those different technologies. My desired result would be whenever I buy a new VPS, I run a script (or connect it to a master node) and then configuration happens based on a template or so

Thanks in advance

1 Answer 1


What you are trying to accomplish is referred to as infrastructure as code.

Which tools you select will depend on where you are operating, and what your business needs are. If you are operating in AWS exclusively, you can skip 3rd party solutions and focus on their CloudFormation service. Terraform (infrastructure) and Ansible (configuration) are popular cloud agnostic tools if you are operating On-Prem or across multiple cloud providers.

  • This is the way. We use Jenkins as the orchestrator calling on terraform to create initial vanilla hosts on AWS/GC/OnPrem (vCenter. The terraform outputs are YML structured and used as direct input into Ansible for specific configuration and application deployment. It takes a while to achieve >90% full automation but the payback is huge.
    – wowbagger
    Apr 24, 2021 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.