[Spacewalk-list] script to create webserver accessible repo of packages under Spacewalk channels

Boyd, Robert Robert.Boyd at peoplefluent.com
Tue Sep 4 18:14:07 UTC 2012


Jeremy,

This looks very promising for my situation.   On the down side though I am completely unfamiliar with building a kickstart file in Spacewalk.   I've done a tiny bit of work with Cobbler in recent months.   How involved is it to put together kickstart(s) that would cover the range of OSes and architectures that I have ( CentOS 4(32 and 64 bit), RHEL4(32 & 64), CentOS 5(32 & 64), RHEL5(32 & 64), RHEL6(64)) ?   Is it possible to build 1 kickstart to rule them all? Or 1 kickstart per major release?  Or am I going to have to create a separate kickstart for each release-architecture pair?

Thanks,
Robert

From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Jeremy Davis
Sent: Tuesday, September 04, 2012 1:41 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] script to create webserver accessible repo of packages under Spacewalk channels

Hello All,

I have been watching this email for just a little bit and thought I would provide a little information that might be of some help. Spacewalk provides yum repositories based on the kickstart configuration. While configuring a kickstart file in Spacewalk it provides urls that are used during the install process for systems. These same urls can be used for systems that are not joined to Spacewalk. These urls use the same packages and repodata used in your Spacewalk channels except for the base channel (os in CentOS terms). Below you will find an example of a yum client .repo config that uses these kickstart urls.

This config is setup with the following structure:
centos-production-base-v5-64bit (Base channel) = syncs with http://centos.public.mirror/CentOS/5/os/x86_64/<http://ftp.linux.ncsu.edu/pub/CentOS/5/os/x86_64/>.
centos-production-updates-v5-64bit (Child channel of base above) = syncs with http://centos.public.mirror/CentOS/5/updates/x86_64/<http://ftp.linux.ncsu.edu/pub/CentOS/5/os/x86_64/>.
centos-production-extras-v5-64bit (Child channel of base above)= syncs with http://centos.public.mirror/CentOS/5/extras/x86_64/<http://ftp.linux.ncsu.edu/pub/CentOS/5/os/x86_64/>.
spacewalk-client-prod-v5-64bit (Child channel of base above) = syncs with Spacewalk client repository.
spacewalk-epel-prod-v5-64bit (Child channel of base above) = syncs with EPEL repository for v5 64bit.

NOTE: These URLs do not work when going to the URL with a browser as you will need to ask for a certain file just like yum would do in order to pull stuff via the browser.
NOTE 2: I have a Development and Test environment configured inside the same Spacewalk install. This is done by having base channels setup as above by changing the production to either dev or test and also changing the arch and version(64bit and v5) to the correct arch and version (I currently have v4, v5, and v6 with 32bit and 64bit).

[spacewalk-base]
name=Spacewalk base
baseurl=http://proxy_FQDN/ks/dist/centos-production-base-v5-64bit
enabled=1

[spacewalk-updates]
name=Spacewalk updates
baseurl=http://proxy_FQDN/ks/dist/child/centos-production-updates-v5-64bit/centos-production-base-v5-64bit
enabled=1

[spacewalk-extras]
name=Spacewalk extras
baseurl=http://proxy_FQDN/ks/dist/child/centos-production-extras-v5-64bit/centos-production-base-v5-64bit
enabled=1

[spacewalk-client]
name=Spacewalk client
baseurl=http://proxy_FQDN/ks/dist/child/spacewalk-client-prod-v5-64bit/centos-production-base-v5-64bit
enabled=1

[spacewalk-epel]
name=Spacewalk epel
baseurl=http://proxy_FQDN/ks/dist/child/spacewalk-epel-prod-v5-64bit/centos-production-base-v5-64bit
enabled=1

On Tue, Sep 4, 2012 at 10:43 AM, Boyd, Robert <Robert.Boyd at peoplefluent.com<mailto:Robert.Boyd at peoplefluent.com>> wrote:
Matthew,

At the remote sites I'm using Spacewalk Proxy Servers.   How can/will this script work with those? Should I use reposync+createrepo to build mirrors on the Proxy servers?  Or is there another way?  Most of my clients won't have direct access to the master due to network and firewall restrictions.

Robert

-----Original Message-----
From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> [mailto:spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>] On Behalf Of Matthew Patton
Sent: Saturday, September 01, 2012 3:23 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] script to create webserver accessible repo of packages under Spacewalk channels

On Mon, 27 Aug 2012 19:46:59 -0400, Matthew Patton <mpatton at inforelay.com<mailto:mpatton at inforelay.com>>
wrote:

> On https://fedorahosted.org/spacewalk/wiki/BrainBox there is a requst
> for:
> <quote>
> Allow a channel to be available as a raw yum repo. This would work for
> building tools like mock. I often have to keep rpms around in 2 spots
> so I can perform mock biulds. Please, please fix this. --stahnma
>   Seconded, it would also make migration, manual changes easier? An
> export as yum repo hierarchy button somewhere? and would help with
> Koji integration. -- Phil </quote>

I apologize to the list for the pitiful effort of my previous post.

Turns out Satellite generates repodata for each channel and stuffs it into /var/cache/rhn/repodata. So I wrote a vastly better script that extracts the information and symlinks into the hierarchy Satellite maintains. This obviates the need to spend 2x on disk space or maintain a separate repository. If you should have a 'mrepo' configuration that is uploaded into Satellite, this script can be trivially extended to remove the original RPM and symlink into the Satellite's copy.

Please note the script just takes the first match should there be an exact filename match. It also doesn't deal with EPOCH but it appears Satellite does it's own housecleaning in that regard.

If you write a yum repo file and put it somewhere that Apache can access it, and likewise symlink into /var/cache/rhn/repodata, any remote yum client can take full advantage of the Satellite channels without having to join. This is particularly useful when you want to install the rhn-client packages on a system that has no existing ties to Satellite.

...

The script itself is at
http://pastebin.com/UUmcF4yT


--
Cloud Services Architect, Senior System Administrator InfoRelay Online Systems (www.inforelay.com<http://www.inforelay.com>)

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120904/d6a91c15/attachment.htm>


More information about the Spacewalk-list mailing list