I’ll have to index/ “map” an infrastructure of around 80 VMs. Each of this VMs has one or more custom services (ex. custom Tomcat servers, proxies etc.). Many services are deployed on 2-3 VMs, for HA/ redundancy reasons. Unfortunately, they were created over time, and, besides being custom services, they are not consistent regarding internal paths, naming conventions, dependency versions etc.
So, I’ll only be able to automate a fraction of this actions. During the mapping, I should get info about the
- running services and ports (netstat)
- binaries path (of the custom services, usually under a specific known directory)
- firewalld rules (firewall-cmd –list-all-zones)
- custom routes (route -n)
- network interfaces and IPs (ip a) and so on
I am thinking of making a script and manually run it on every node. This task has a short deadline so I can’t afford building an automation system right now, plus the naming conventions, paths have to be corrected first. In the future we plan to containerize apps and properly orchestrate them, but for now, we want to do a fairly quick evaluation of the context.
Would the script idea be efficient, what is a good practice way of approaching the situation, given the current setup?
For now, I intend to create an Ansible playbook containing the Linux commands, and write the output to the controller node, in separate files for each type of service.
unix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.