[SOLVED] Fleshing out config scripts strategy for RHEL 6/7.
Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Not sure if you're going to kickstart these boxes, but either way you could build an RPM of scripts that have the necessary 'smarts' built into them to determine version of RHEL/subnet/etc., and act accordingly. Your template could install that RPM at build time, with the POST script in the RPM executing things for you, and doing a reboot. Things should come up the way you want them after that.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.