LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Looking for Alternative to RHN Satellite Server basic functionality (https://www.linuxquestions.org/questions/linux-enterprise-47/looking-for-alternative-to-rhn-satellite-server-basic-functionality-518375/)

chad504 01-11-2007 10:16 AM

Looking for Alternative to RHN Satellite Server basic functionality
 
Due to the cost of RHN satellite server, I'm looking for an alternative. The essential concepts that I am looking to duplicate are:

I'm looking for a way to export an RPM list (inc. version) from a system, and duplicate it. Including installation of updated RPMs. where the end result is an exact cloe of an existing system.

Using a kickstart server and some other tools this sounds realistic. However, I cannot figure out what to google to get started, and I figure someone has already accomplished some prtion of this.

PatrickNew 01-11-2007 10:42 AM

You're just looking for a red hat clone? People have those. Try CentOS and... oh well there's others but I forget them. I'm sure their fans will mention them here though.

chad504 01-11-2007 10:47 AM

No, I have 128 Red Hat Licenses, I'm looking to duplicate the basic functionality, as outlined above, of the RHN Satellite Server. I need the ability to clone a system, duplicating the installed RPMs and versions. The cost to do this through a satellite server is prohibitive at the moment.

PatrickNew 01-11-2007 10:54 AM

Ah, you just want to clone the satellite server. Well, I'm afraid I'm quite useless there. The computers you are installing to, is it identical hardware? If so, you could set one system up exactly as you want it, with a clean install, the dd the character device of the hard disk into an image file, and have a quick script that would download the image file and dd it to the drive. Course, that's useless if the hardware isn't the same.

chad504 01-11-2007 11:04 AM

The hardware may/not be the same. The architecture will stay constant. Essentially I will configure a new server for a development environment, and once the applications/systems need to progress through production I want to be able to take a snapshot of that servers RPMs, including updates, and reproduce to a new server possibly a second/third/forth... development server or prod.

I'm not looking for soem of the basic functionality that the satellite server provides.
https://www.redhat.com/rhn/rhndetails/architecture/

jcims 01-17-2007 12:47 PM

Hi Chad,

Have you had any luck in this search? I'm trying to do the same thing for a customer of ours. They have a development and production environment, and i'm trying to come up with a way for them to install a set of packages in dev, test the setup, then copy that set of packages to production. (Edit: Right now they have ~250 updates waiting for them if they just do an up2date -u)

Seems like you could run rpm -qa on the 'source' box, tack on the architecture tags and then run 'up2date --get <filename>' on all of the lines of the output, but that seems super tedious and a bit risky. I couldn't find an rpm queryflag that provides the filename of the RPM that was installed, either.

chad504 01-18-2007 07:54 AM

No I haven't yet. I have used the 'rpm -qa" > file, to get a base list. However you need to do a lot of editing to get it cleaned up enough to use. The sed script for that one was ugly. I also thought about having a system save the updated RPMs, and copying them to my kickstart server, to host the updates.

I'm still working on the basic concept, I'll keep you posted.

jcims 01-19-2007 08:18 AM

Hey Chad,

This is the process i came up with, i haven't tested it yet tho:

rpm -q -a --queryformat="up2date --get %{NAME}-%{VERSION}-%{RELEASE}-{%ARCH}.rpm" | sort > end.sh

then copy it to the other system and

rpm -q -a --queryformat="up2date --get %{NAME}-%{VERSION}-%{RELEASE}-{%ARCH}.rpm" | sort > start.sh

diff start.sh end.sh | sed -e 's/> //' > get.sh

sh ./get.sh
rpm -Uvh *.rpm

That will get almost all of the packages updated, and you can hand-pick the rest.

Also

rpm -q -a --queryformat="%{NAME} %{VENDOR}" | grep -v "Red Hat"

will show all the non-redhat packages on the box


HTH

chad504 01-22-2007 02:59 PM

Ok, I took your ideas and expanded to this:

Here is what I created to generate a "gold image":
#!/bin/bash
FILENAME="rpm-`uname -n`.sh"
FILENAME="rpm-master`date '%m-%d-%y-%H.%M'.sh"
echo $FILENAME
rpm -qa --queryformat 'up2date -d %{NAME}-%{VERSION}-%{RELEASE}-%{ARCH}.rpm\n' | sort >$FILENAME


Then this to run on the new system:
#!/bin/bash
START_FILENAME="rpm-`uname -n`.sh"
MASTER_FILENAME="rpm-master-<date>.sh"
MASTER_PATH="http://<kickstart-server>/kickstart/clone/"

echo $FILENAME
wget -P /root/ $MASTER_PATH$MASTER_FILENAME
rpm -qa --queryformat 'up2date -d %{NAME}-%{VERSION}-%{RELEASE}-%{ARCH}.rpm\n' | sort >/root/$START_FILENAME
#diff /root/$START_FILENAME /root/$MASTER_FILENAME | sed -e 's/>//' |sed '/</d;/---/d' >/root/host-update.sh
diff /root/$START_FILENAME /root/$MASTER_FILENAME | sed -e 's/>//' |sed '/</d;/*-/d'


Then I encountered the issue that you cannot pull down a specific RPM from RHN, that I could find. I could only do a get for the package name, minus any version/architecture info.

chort 01-22-2007 03:07 PM

Perhaps something like cfengine would be useful? It's a tool for synchronizing configurations across multiple systems. When I was in the hosting business was used it to push out html branding and minor software revisions to hundreds of different servers in our datacenters.

chad504 01-24-2007 10:28 AM

I have found that I can do a up2date --get * it pulls down the headers, but not the associatedRPM files. I figured, that I could use this, and post them on my kickstart server. I have a valid number of licenses, for the updates, I'm looking for a way to do it locally, without 100 servers going out over my internet connection, plus the ability to clone a system, to a specific patch list and revision level.


All times are GMT -5. The time now is 03:06 PM.