LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 12-01-2017, 04:05 PM   #1
kickbag99
LQ Newbie
 
Registered: Dec 2017
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 12-01-2017, 06:07 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,319

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by kickbag99 View Post
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.
 
1 members found this post helpful.
Old 12-01-2017, 06:47 PM   #3
kickbag99
LQ Newbie
 
Registered: Dec 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup tool (or strategy) for system config files joe_2000 Linux - Software 4 01-21-2016 11:15 AM
sendmail is not fleshing the mails. jojanmpaul Linux - Newbie 2 01-17-2014 06:10 AM
gtk-config and glib-config scripts not found? Frustin Linux - General 17 12-26-2008 03:14 PM
RHEL Patching Strategy. jasoneh Red Hat 3 11-24-2008 04:19 PM
RHEL update strategy question tibbitts Linux - Enterprise 2 08-16-2005 07:38 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration