[Spacewalk-list] Spacewalk with Oracle Linux

Mullis, Josh (CCI-Atlanta) Josh.Mullis at cox.com
Thu Oct 18 23:13:11 UTC 2012


We have been successfully using OEL with spacewalk for a while now.
It's a bit tricky, but it works.  Below is how we accomplished this.
(I'll put this in the spacewalk wiki soon)


Give it a shot and let me know if this works for you.
-josh





1.       Build an OEL KVM virtual machine on the spacewalk server

2.       Register the vm with ULN

3.       Subscribe the vm to the channels you want

4.       Setup an NFS share and mount it on both the vm and spacewalk server

5.       Create directories for each channel on the nfs share

6.       Create the channels in spacewalk

7.       The "## SYNC SCRIPT ##" section does the following:

a.       Logs into the vm via ssh keys and pulls down the packages into the NFS directories

b.      Pushes the packages in the directories to spacewalk channels

8.  The "## ADD TO REG SCRIPT ##" section does the following

a.       Removes all ULN related packages

                                                               i.      oel uses up2date that is compiled with a CSI flag (oracle contract number) that just will not work with spacewalk

                                                             ii.      note the order of the rpm commands.  I think we had issues doing it any other way.

b.      Installs yum and dependencies

                                                               i.      I got these and all deps from the rhel5 channel and dropeed them into a www dir

c.       Blocks up2date packages from being installed during future system upgrades




## SYNC SCRIPT ##

# Login to spacewalk-oelvm and sync from uln -> /spacewalk
# Make sure the nfs is mounted #
ssh -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no root at 192.168.122.215 "mount" |grep '/spacewalk' >/dev/null
if [ "$?" = "0" ]
then

             ssh -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no root at 192.168.122.215 \
             "up2date --showall --channel el5_x86_64_latest | xargs \
             up2date --nox --get --nosrc --download --channel el5_x86_64_latest \
                --tmpdir=/spacewalk/repo-sync/uln/oel-x86_64-server-updates-5/ ; \

             up2date --showall --channel exadata_dbserver_11.2.3.1.0_x86_64_base | xargs \
             up2date --nox --get --nosrc --download --channel exadata_dbserver_11.2.3.1.0_x86_64_base \
                --tmpdir=/spacewalk/repo-sync/uln/oel-x86_64-server-exadata_dbserver-11.2.3.1.0/ ; \

             up2date --showall --channel el5_x86_64_addons | xargs \
             up2date --nox --get --nosrc --download --channel el5_x86_64_addons \
                --tmpdir=/spacewalk/repo-sync/uln/oel-x86_64-server-addons-5/ ; \

             up2date --showall --channel el5_u3_x86_64_patch | xargs \
             up2date --nox --get --nosrc --download --channel el5_u3_x86_64_patch \
                --tmpdir=/spacewalk/repo-sync/uln/oel-x86_64-server-patch-5.3/ ; \

             up2date --showall --channel el5_u5_x86_64_patch | xargs \
             up2date --nox --get --nosrc --download --channel el5_u5_x86_64_patch \
                --tmpdir=/spacewalk/repo-sync/uln/oel-x86_64-server-patch-5.5/"

fi

# OEL 5 64 Updates
CHANNEL=oel-x86_64-server-updates-5
echo $CHANNEL
rhnpush -v --server localhost -u rhnpush -p "$PUSH_PW" --channel=$CHANNEL --dir=/spacewalk/repo-sync/uln/$CHANNEL/

<REPEAT ABOVE FOR EACH CHANNEL>








## ADD TO REG SCRIPT ##

## If OEL5, remove ULN packages, block up2date and install spacewalk client rpms ##
if [ "$OS_VER" = "oel5" ]
then
     rpm -e --nodeps up2date &>/dev/null
     rpm -e --nodeps up2date-gnome &>/dev/null
     rpm -e --nodeps rhnlib &>/dev/null
     rpm -e --nodeps hal &>/dev/null
     rpm -e --nodeps hal-devel &>/dev/null
     rpm -e --nodeps yum-rhn-plugin &>/dev/null
     rpm -e --nodeps yum &>/dev/null
     rpm -e --nodeps rhnlib &>/dev/null
     rpm -e --nodeps python-ethtool &>/dev/null
     rpm -e --nodeps python-dmidecode &>/dev/null
     rpm -e --nodeps rhn-client-tools &>/dev/null
     rpm -e --nodeps python-iniparse &>/dev/null
     rpm -e --nodeps yum-metadata-parser &>/dev/null
     rpm -e --nodeps rhn-check &>/dev/null
     rpm -e --nodeps rhnsd &>/dev/null
     rpm -e --nodeps yum-rhn-plugin &>/dev/null
     rpm -e --nodeps rhn-setup &>/dev/null
     rpm -ivh http://$SW_HOST/pub/client-rpms/oel5/x86_64/rhnlib.rpm
     rpm -ivh http://$SW_HOST/pub/client-rpms/oel5/x86_64/python-ethtool.rpm
     rpm -ivh http://$SW_HOST/pub/client-rpms/oel5/x86_64/python-dmidecode.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/oel5/x86_64/hal.rpm
     rpm -ivh http://$SW_HOST/pub/client-rpms/oel5/x86_64/rhn-client-tools.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/rhel5/x86_64/m2crypto.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/rhel5/x86_64/python-iniparse.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/rhel5/x86_64/yum-metadata-parser.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/rhel5/x86_64/yum.rpm
     rpm -Uvh http://$SW_HOST/pub/client-rpms/oel5/x86_64/rhn-check.rpm http://$SW_HOST/pub/client-rpms/oel5/x86_64/rhnsd.rpm http://$SW_HOST/pub/client-rpms/oel5/x86_64/yum-rhn-plugin.rpm http://$SW_HOST/pub/client-rpms/oel5/x86_64/rhn-setup.rpm

     grep '^exclude=pirut,up2date,up2date-gnome' /etc/yum.conf >/dev/null
     if [ "$?" != "0" ]
     then echo >>/etc/yum.conf
          echo '[main]' >>/etc/yum.conf
          echo 'exclude=pirut,up2date,up2date-gnome' >>/etc/yum.conf
     fi
fi









From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Gerhardus Geldenhuis
Sent: Thursday, September 20, 2012 11:35 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] Spacewalk with Oracle Linux

Hi Prakash,
The latter managing OEL clients with spacewalk.

Regards
On 20 September 2012 15:37, Velayutham, Prakash <Prakash.Velayutham at cchmc.org<mailto:Prakash.Velayutham at cchmc.org>> wrote:
Are you asking about running Spacewalk server in OEL, or how to manage OEL clients with Spacewalk?

Prakash

On Sep 20, 2012, at 10:30 AM, Gerhardus Geldenhuis wrote:

> Hi
>
> Was curious if anyone has successfully used Spacewalk with Oracle Linux. The company that I am working for has decided not just to get in bed with the devil but be joined at the hip. The Oracle tools at the moment does not seem up to job to provision and manage Oracle Linux machines. I am interested in anyone's experience good or bad. If it is of a sensitive nature than please feel free to email me offline.
>
> The changes that Oracle makes seems small enough so should be theoretically possible. I have not yet done my own testing and will do so in due course.
>
> Regards
> --
> Gerhardus Geldenhuis
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
> https://www.redhat.com/mailman/listinfo/spacewalk-list

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list



--
Gerhardus Geldenhuis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20121018/1bff87a1/attachment.htm>


More information about the Spacewalk-list mailing list