Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've read a few guides outlining how to setup a local YUM repo, but none of them explicitly stated an answer to my question; If I set up a local YUM repo, does that mean that any CentOS servers which pull from said repo will never be "ahead" of the local YUM repo?

I want to ensure a consistent package distribution across all my servers. Right now, when I do a yum update, even on a daily basis, the servers can be out of alignment. For example if I run YUM update on my dev server in the morning, then run YUM update on one of my production servers in the afternoon, the production server may have picked up a new version of a package that the dev server did not pick up, due to the time window between the update commands.

Rather, I'd prefer that I run yum update from my dev server which has access to remote upstream yum repos, then let it sit for 2 weeks, after which I run yum update on my production servers against the local repo on my dev server.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Provided you disable updating/installing from the upstream repo, yes.

share|improve this answer
    
From your response I can infer that there is a setting to disable updating from upstream, yet pulling packages from local yum repo? –  Mike Purcell Mar 21 '12 at 22:09
    
Right. Add a .repo file for the local repo, and set enabled=0 in the upstream .repo. –  Ignacio Vazquez-Abrams Mar 21 '12 at 22:10
    
Awesome. Thanks. –  Mike Purcell Mar 21 '12 at 22:18
    
You happen to know a link to tutorial to set up a local centos repo? The ones I am reading keep talking about having to rsync all the remote centos files, I'd rather just push out the files on the server acting as the local centos repo. If a client tries to install a package not available on local repo, it simply fails. –  Mike Purcell Mar 22 '12 at 22:49
    
@Mike: Just run createrepo against the directory containing the packages, optionally passing -g if you have a comps.xml for supporting package groups. –  Ignacio Vazquez-Abrams Mar 23 '12 at 5:16

You could create separate directories for Prod and Dev. You sync from upstream into Dev only. Then periodically symlink/hardlink new packages from the Dev to Prod dir. Run createrepo on all the dirs, but point Prod servers to the Prod repo only.

You could also have multiple levels apart from Dev/Prod, and a designated period for moving packages from one level to another. That way, all servers in that time period are consistent.

Perhaps something like mrepo may help you in the process. Also pulp hit version 1.0.

share|improve this answer
    
Thanks man, I will check these out. I just want to make sure that my production boxes don't pull down an upstream app that hasn't been tested on dev env yet. –  Mike Purcell Mar 27 '12 at 23:16
    
Ideally, you should also manage the yum repo configs on the servers with puppet or chef. –  Not Now Mar 28 '12 at 0:33
    
Ya, I would if I had the time. Having to wear the sysadmin hat right now b/c no budget for a systems guy. –  Mike Purcell Mar 28 '12 at 0:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.