Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2
Yes, I thought this part would be fairly apparent from the documentation / explanation of what that script does. The way the spacewalk-create-yumrepo.py code works is that it reads the information from a channel that exists in spacewalk and creates a directory the necessary structures and links to serve as a front end to the packages in that channel. You must create the channel and repository setup in spacewalk and be importing/synching the packages from the source repository into spacewalk. Once the channel is set up and the repository populated, then you can run the script. Robert Boyd Sr. Systems Engineer PeopleFluent p. 919-645-2972 | c. 919-306-4681 e. robert.b...@peoplefluent.com<mailto:robert.b...@peoplefluent.com> [http://mktg.peoplefluent.com/rs/peopleclick/images/140410_PF4colorLOGOx150.png]<http://www.peoplefluent.com/> Click here<http://www.peoplefluent.com/> to experience the power of the new PeopleFluent Mirror Suite ™ Visit: www.peoplefluent.com<http://www.peoplefluent.com/> | Read: PeopleFluent Blog<http://peoplefluent.com/resources/peoplefluent-blog> | Follow: @PeopleFluent<http://twitter.com/peoplefluent> From: spacewalk-list-boun...@redhat.com [mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Jason Calafiore Sent: Thursday, February 26, 2015 10:41 AM To: spacewalk-list@redhat.com Subject: Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2 Hi Robert, I've been looking at this solution and I ran into an issue on step 3 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in /usr/local/bin) /usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p -c -d /var/www/html/pub// /usr/local/bin/spacewalk-create-yumrepo.py -s 156.80.52.242 -u ghs_admin -p "password" -c Spacewalk-Client -d /^Cr/www/html/pub/spacewalk-client/packages When I run this I get the following... xmlrpclib.Fault: Do I have to create a channel first in spacewalk gui or should I be referring to my CentOS base channel? Thank you, Jason * From: "Boyd, Robert" * To: "spacewalk-list redhat com" * Subject: Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2 * Date: Fri, 20 Feb 2015 17:39:02 + I think you might consider using spacewalk-create-yumrepo.py to do this. If you have a channel or subchannel with the Spacewalk Client packages you can use that python script to create a yum style repo front end to the Spacewalk content. Then you can set up a temporary spacewalk-client repo config for yum on your clients that will point to the repo address on your Spacewalk server. Here’s a fairly recent message from the list that discusses the create yum repo process: Thank you a lot: I install it and works fine to me! I'm thinking of improve it to include parameters to define "last" or "all" packages, and also to perform createrepo automatically on changed repos. If I do it, I'll submit to original author. 2014-10-07 13:27 GMT-03:00 Glen Collins mailto:glenc2004%20comcast%20net>>: Oh, one thing I need to mention. I did have to make one change to the code in the script so it would link all rpm's. The code from GIT actually only links the latest in the channel and not everything. So the change I made was Change "spacewalk.channel.software.listLatestPackages" to "spacewalk.channel.software.listAllPackages". See below - ## for pkg in spacewalk.channel.software.listLatestPackages(spacekey, options.channel): for pkg in spacewalk.channel.software.listAllPackages(spacekey, options.channel): det=spacewalk.packages.getDetails(spacekey, pkg['id']) fn=det['path'].split("/")[-1] if not os.path.exists("%s/packages/%s" % (options.directory, fn)): os.symlink("%s/%s" % (options.satdir, det['path']), "%s/packages/%s" % (options.directory, fn)) spacewalk.auth.logout(spacekey) - Regards, Glen Collins - Original Message - Hi Fabiano, Are you asking if you can create a pseudo repo in Spacewalk that can mimic a YUM repository via HTTP? If that is what you are asking, then yes it is possible. And I have done it so I can install my spacewalk clients using the yum method. Here is what you do... 1) Download and install: https://github.com/angrox/spacewalk-api-scripts 2) Create directory under: /var/www/html/pub/ (this is accessible using the URL http://http://%3Csw/> IP ADDR>/pub/) 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in /usr/local/bin) /usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p -c -d /var/www/html/pub// 4) Run createrepo against the new directory: createrepo /
Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2
Hi All, Could someone help me with this issue? Jason On Thu, Feb 26, 2015 at 10:40 AM, Jason Calafiore wrote: > Hi Robert, > I've been looking at this solution and I ran into an issue on step 3 > 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in > /usr/local/bin) > >/usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p > -c -d /var/www/html/pub// > > > /usr/local/bin/spacewalk-create-yumrepo.py -s 156.80.52.242 -u ghs_admin > -p "password" -c Spacewalk-Client -d > /^Cr/www/html/pub/spacewalk-client/packages > > When I run this I get the following... > > xmlrpclib.Fault: channel: Spacewalk-Client'> > > > Do I have to create a channel first in spacewalk gui or should I be > referring to my CentOS base channel? > > Thank you, > Jason > > -- > > - *From*: "Boyd, Robert" >- *To*: "spacewalk-list redhat com" >- *Subject*: Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2 >- *Date*: Fri, 20 Feb 2015 17:39:02 + > > -- > > I think you might consider using spacewalk-create-yumrepo.py to do this. > > > > If you have a channel or subchannel with the Spacewalk Client packages you > can use that python script to create a yum style repo front end to the > Spacewalk content. Then you can set up a temporary spacewalk-client repo > config for yum on your clients that will point to the repo address on your > Spacewalk server. > > > > Here’s a fairly recent message from the list that discusses the create yum > repo process: > > > > Thank you a lot: I install it and works fine to me! > > I'm thinking of improve it to include parameters to define "last" or "all" > packages, and also to perform createrepo automatically on changed repos. If > I do it, I'll submit to original author. > > > > 2014-10-07 13:27 GMT-03:00 Glen Collins : > > > Oh, one thing I need to mention. I did have to make one change to the code > in the script so it would link all rpm's. The code from GIT actually only > links the latest in the channel and not everything. So the change I made > was > > Change "spacewalk.channel.software.listLatestPackages" to > "spacewalk.channel.software.listAllPackages". See below > > - > > ## for pkg in spacewalk.channel.software.listLatestPackages(spacekey, > options.channel): > for pkg in spacewalk.channel.software.listAllPackages(spacekey, > options.channel): > det=spacewalk.packages.getDetails(spacekey, pkg['id']) > fn=det['path'].split("/")[-1] > if not os.path.exists("%s/packages/%s" % (options.directory, fn)): > os.symlink("%s/%s" % (options.satdir, det['path']), > "%s/packages/%s" % (options.directory, fn)) > spacewalk.auth.logout(spacekey) > > - > > > Regards, > > Glen Collins > > - Original Message - > > Hi Fabiano, > > Are you asking if you can create a pseudo repo in Spacewalk that can > mimic a YUM repository via HTTP? If that is what you are asking, then yes > it is possible. And I have done it so I can install my spacewalk clients > using the yum method. Here is what you do... > > 1) Download and install: https://github.com/angrox/spacewalk-api-scripts > > 2) Create directory under: /var/www/html/pub/ (this is > accessible using the URL http://http://%3Csw/> IP > ADDR>/pub/) > > 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in > /usr/local/bin) > >/usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p > -c -d /var/www/html/pub// > > 4) Run createrepo against the new directory: createrepo > /var/www/html/pub// > > 5) And then configure you client using the stand YUM file in > /etc/yum.repos.d > > 6) Verify you can see it using your web browser. You may run into > permissions issue accessing the repomd.xml in the repodata directory. What > I do is a chmod -R 755 on the entire /var/www/html/pub// so > I don't have any issues with he web server accessing the files. > > What this is doing is creating links to the actual RPM's in > /var/satellite/. so when you access it via HTTP it looks exactly like a > standard YUM repo. So you don't have to have any extra copies of any of the > RPM's taking up extra space. Now while I only have done this for the SW > client install, I can assume since it works for the client and it should > work for everything
Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2
Hi Robert, I've been looking at this solution and I ran into an issue on step 3 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in /usr/local/bin) /usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p -c -d /var/www/html/pub// /usr/local/bin/spacewalk-create-yumrepo.py -s 156.80.52.242 -u ghs_admin -p "password" -c Spacewalk-Client -d /^Cr/www/html/pub/spacewalk-client/packages When I run this I get the following... xmlrpclib.Fault: Do I have to create a channel first in spacewalk gui or should I be referring to my CentOS base channel? Thank you, Jason -- - *From*: "Boyd, Robert" - *To*: "spacewalk-list redhat com" - *Subject*: Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2 - *Date*: Fri, 20 Feb 2015 17:39:02 + -- I think you might consider using spacewalk-create-yumrepo.py to do this. If you have a channel or subchannel with the Spacewalk Client packages you can use that python script to create a yum style repo front end to the Spacewalk content. Then you can set up a temporary spacewalk-client repo config for yum on your clients that will point to the repo address on your Spacewalk server. Here’s a fairly recent message from the list that discusses the create yum repo process: Thank you a lot: I install it and works fine to me! I'm thinking of improve it to include parameters to define "last" or "all" packages, and also to perform createrepo automatically on changed repos. If I do it, I'll submit to original author. 2014-10-07 13:27 GMT-03:00 Glen Collins : Oh, one thing I need to mention. I did have to make one change to the code in the script so it would link all rpm's. The code from GIT actually only links the latest in the channel and not everything. So the change I made was Change "spacewalk.channel.software.listLatestPackages" to "spacewalk.channel.software.listAllPackages". See below - ## for pkg in spacewalk.channel.software.listLatestPackages(spacekey, options.channel): for pkg in spacewalk.channel.software.listAllPackages(spacekey, options.channel): det=spacewalk.packages.getDetails(spacekey, pkg['id']) fn=det['path'].split("/")[-1] if not os.path.exists("%s/packages/%s" % (options.directory, fn)): os.symlink("%s/%s" % (options.satdir, det['path']), "%s/packages/%s" % (options.directory, fn)) spacewalk.auth.logout(spacekey) - Regards, Glen Collins - Original Message - Hi Fabiano, Are you asking if you can create a pseudo repo in Spacewalk that can mimic a YUM repository via HTTP? If that is what you are asking, then yes it is possible. And I have done it so I can install my spacewalk clients using the yum method. Here is what you do... 1) Download and install: https://github.com/angrox/spacewalk-api-scripts 2) Create directory under: /var/www/html/pub/ (this is accessible using the URL http://http://%3Csw/> IP ADDR>/pub/) 3) Call the script: spacewalk-create-yumrepo.py (Which I installed in /usr/local/bin) /usr/local/bin/spacewalk-create-yumrepo.py -s -u admin -p -c -d /var/www/html/pub// 4) Run createrepo against the new directory: createrepo /var/www/html/pub// 5) And then configure you client using the stand YUM file in /etc/yum.repos.d 6) Verify you can see it using your web browser. You may run into permissions issue accessing the repomd.xml in the repodata directory. What I do is a chmod -R 755 on the entire /var/www/html/pub// so I don't have any issues with he web server accessing the files. What this is doing is creating links to the actual RPM's in /var/satellite/. so when you access it via HTTP it looks exactly like a standard YUM repo. So you don't have to have any extra copies of any of the RPM's taking up extra space. Now while I only have done this for the SW client install, I can assume since it works for the client and it should work for everything include the OS, EPEL and all the other channels you may have in SW. Regards, Glen Collins - Original Message - Fabiano Martins wrote: % Hi all, % % I have a Spacewalk 2.2 server running on my environment. % % But some machines aren't registered on Spacewalk (RHELs registered on RHN, % CentOSs that sysadmin don't like to register on Spacewalk, etc.). % % Once my Spacewalk server already have a mirror of external repos (EPEL, % VMWare, etc.), I would that these exceptions not use my Internet link when % installing/updating packages. % % Have a form to offer these repos mirrored into Spacewalk as a "pure http" % repo? Hello Fabiano, Unfortunately Spacewalk can't do this. % I know that I c
Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2
www.peoplefluent.com<http://www.peoplefluent.com/> | Read: PeopleFluent Blog<http://peoplefluent.com/resources/peoplefluent-blog> | Follow: @PeopleFluent<http://twitter.com/peoplefluent> From: spacewalk-list-boun...@redhat.com [mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Alexander Innes Sent: Thursday, February 19, 2015 6:21 PM To: spacewalk-list@redhat.com Subject: Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2 1) centos is virtually same as centos, its needed for both 2) yup On 19 February 2015 at 22:28, Jason Calafiore mailto:jason.calafi...@gmail.com>> wrote: Hi All, I am testing Spacewalk and trying to register my first CentOS client. I am following the directions on the main documentation. https://fedorahosted.org/spacewalk/wiki/RegisteringClients According to the directions I need to install on the client OS * Install spacewalk-client-repo RPM * Do a yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin 1. Are those yum packages needed for CentOS or only RHEL? 2. The client OS is not connected to the internet, hence the reason I am want to use spacewalk to do patch management. So the main issue is how to get the necessary RPM’s on the client. I’ve downloaded the spacewalk-client-repo on the Spacewalk server and added it /var/www/html so that I could download and install it from the client. Is this what others have done to deal with this situation? Thank you, Jason ___ Spacewalk-list mailing list Spacewalk-list@redhat.com<mailto:Spacewalk-list@redhat.com> https://www.redhat.com/mailman/listinfo/spacewalk-list ___ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list
Re: [Spacewalk-list] Registering Clients in Spacewalk 2.2
1) centos is virtually same as centos, its needed for both 2) yup On 19 February 2015 at 22:28, Jason Calafiore wrote: > Hi All, > > I am testing Spacewalk and trying to register my first CentOS client. I > am following the directions on the main documentation. > > > > https://fedorahosted.org/spacewalk/wiki/RegisteringClients > > > > According to the directions I need to install on the client OS > > > >- Install spacewalk-client-repo RPM >- Do a yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto >yum-rhn-plugin > > > > >1. Are those yum packages needed for CentOS or only RHEL? >2. The client OS is not connected to the internet, hence the reason I >am want to use spacewalk to do patch management. So the main issue is how >to get the necessary RPM’s on the client. I’ve downloaded the >spacewalk-client-repo on the Spacewalk server and added it /var/www/html so >that I could download and install it from the client. Is this what others >have done to deal with this situation? > > > Thank you, > > Jason > > ___ > Spacewalk-list mailing list > Spacewalk-list@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-list > ___ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list
[Spacewalk-list] Registering Clients in Spacewalk 2.2
Hi All, I am testing Spacewalk and trying to register my first CentOS client. I am following the directions on the main documentation. https://fedorahosted.org/spacewalk/wiki/RegisteringClients According to the directions I need to install on the client OS - Install spacewalk-client-repo RPM - Do a yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin 1. Are those yum packages needed for CentOS or only RHEL? 2. The client OS is not connected to the internet, hence the reason I am want to use spacewalk to do patch management. So the main issue is how to get the necessary RPM’s on the client. I’ve downloaded the spacewalk-client-repo on the Spacewalk server and added it /var/www/html so that I could download and install it from the client. Is this what others have done to deal with this situation? Thank you, Jason ___ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list