[Spacewalk-list] Client setup

m.roth2006 at rcn.com m.roth2006 at rcn.com
Fri Feb 13 22:07:48 UTC 2009


Mike,

>Date: Fri, 13 Feb 2009 16:54:41 -0500
>From: "Michael ORourke" <mrorourke at earthlink.net>  
>From: <m.roth2006 at rcn.com>
>To: <spacewalk-list at redhat.com>
>Sent: Friday, February 13, 2009 3:18 PM
>> >Date: Fri, 13 Feb 2009 11:06:45 -0500 (EST)
>>>From: <m.roth2006 at rcn.com>
>>>
>>>It's not clear to me what I need to put on the spacewalk server, and what 
>>>on the client. I got spacewalk-client-tools, but it 
<MVNCH>
>> Is this something I have to explicitly get, with a seperate reposync, or a 
>> wget, to put it on my spacewalk server? What's the preferred method?
>
>I think the simplier solution is to create a directory on the spacewalk 
>server and put all the relevant RPMs in that directory.  For example:
>/var/www/html/pub/spacewalk-client-tools
>Then write a script that will 'wget' the necessary RPMs from that directory 
>and register the client.  Of course you could do both, create a "spacewalk 
>client tools" channel, and have a directory with all the needed RPMs. 
>Actually, I'm in the process of writing my own script that will 
>automatically register CentOS 5.2 clients (i386 & x86_64).  I'm using the 
>following Fedora example as a template: 
>https://fedorahosted.org/spacewalk/wiki/ManagingFedoraSystems   However my 
>script will pull all the keys and necessary client (and prequisites) rpms 
>from my spacewalk server.

Thanks, that's what I needed to know, and I like the idea of one script that does it all. Let me look at that example, and I'm all over it - the only question is bash or perl? <g>

Oh, btw, the script that I created to build my entire repository - feel free to use it, folks. It does everything, and creates a dated logfile with everything in it. I've put the echoes in for debugging, while I was working on it.

#!/bin/bash

for arch in x86_64 i386; do
   for repo in base updates extras addons; do
      if [ "$repo" == "base" ]; then
         dir="CentOS"
      else
         dir="RPMS"
      fi
      echo "reposync --arch=$arch --repoid=$repo -p /var/www/html/pub/CentOS5-$arch -l -g -n > reposync.lst.`date +%Y%m%d`"
      reposync --arch=$arch --repoid=$repo -p /var/www/html/pub/CentOS5-$arch -l -g -n > reposync.lst.`date +%Y%m%d` 2>&1
     echo "rhnpush -v --channel=centos5-$repo-$arch --server=http://corp-spwk-chi-02.trustwave.com/APP --dir=/var/www/html/pub/CentOS5-$arch/$repo/$dir --username=rhnpush"
     rhnpush -v --channel=centos5-$repo-$arch --server=http://corp-spwk-chi-02.trustwave.com/APP --dir=/var/www/html/pub/CentOS5-$arch/$repo/$dir --username=rhnpush --password=spwkpush >> reposync.lst.`date +%Y%m%d` 2>&1
   done
done


      mark




More information about the Spacewalk-list mailing list