Fleshing out config scripts strategy for RHEL 6/7.
Howdy,
I'm trying to come up with a strategy to streamline part of our VM deployments. Background info: Running VMware virtualization Using custom RHEL6/7 minimal templates A copy of each template is placed in a pair of Datacenters segmented from other Datacenter pairs. When bringing up a new VM from the template we need to do various tasks. config network i.e. edit /etc/sysconfig/network edit /etc/sysconfig/network-scripts/ifcfg-eth0 edit /etc/resolv.conf ... update and config subsystem i.e. config ntp servers edit /etc/sssd/sssd.conf edit /etc/krb5.conf add regional repos ... We don't want to upkeep 10+ different templates in each pair of Datacenters. Nor do we want to manually config and join these to a domain each time we spin up a new VM. As these VMs could become any number of types of servers for many different applications, our goal is to get them connected to the network and a domain so one of the state config tools can take over. Since when the VMs come up in VMware, we only have console access until network access is configured. I have made some shell scripts that prompt the user for ip,subnet,gateway,etc because that info is independent of datacenter location. but the rest of the configuration is dependent on datacenter location i.e. ntp servers or krb5.conf realms. Current plan: Create Master config files with all configurations for all datacenters and then create a shell script to uncomment all lines in all conf files based on datacenter. then make the master config files and script part of the template. I am worried about the maintainability of these scripts. I am wondering if the domain join and config of subsystems should be offloaded as part of the machine state. Any thoughts and opinions would be welcome. |
Quote:
That way, you could only maintain 1 RPM file that's architecture-agnostic, to do the work you want. Simple to maintain with SVN/Git/whatever you use now. Just a thought. |
Thanks for the great reply.
I really like the idea of 1 rpm file that is architecture-agnostic. I am going to mess around with this idea and see if cant get a POC running and bring it to the team next week. Thanks again. |
All times are GMT -5. The time now is 04:50 PM. |