[Yum-devel] Amazon S3 Yum plugin

James Antill james at fedoraproject.org
Mon Mar 28 15:49:59 UTC 2011


On Sun, 2011-03-27 at 22:31 -0400, Robert Mela wrote:
> Our company is using Yum on Amazon Web Services and we needed a way to 
> install RPMs from protected S3 locations.
> 
> We looked for a yum s3 plugin and did not find one.

 I thought someone had done a simple one, but the only one I see now is
the one you based your code off of.

> So, in willful denial of the fact that I can barely even use Yum, I 
> decided to write a Yum S3 plugin.   The result is at 
> https://github.com/rmela/yum-s3-plugin/
> 
> I know almost nothing about the Yum plugin API and it probably shows.    
> But the plugin does work and is extremely useful to us. There appears to 
> be some interest in Yum-S3 integration, so others may find this plugin 
> useful.

 Yeh, it looks pretty good to me :). I don't see why we wouldn't want to
let you put it in yum-utils, if you want.

> If there is a better option out there I'd be thrilled to know ( I'm 
> wondering how I could have missed it. )
> 
> Otherwise I offer this plugin, and would be happy if anyone else wants 
> to own it and shepherd it to completion and maybe post it in a Yum 
> plugin repository.

 The only two minor changes I'd do is that in config_hook() you probably
want something like:

    global SECRET_KEY, KEY_ID
    SECRET_KEY = conduit.confString('main', 'secret_key')
    KEY_ID     = conduit.confString('main', 'key_id')

    if SECRET_KEY is None or KEY_ID is None:
        # Turn off s3, or die ... whichever.

...and for replacing the repo. the code:

		del repos.repos[repo.id]
		repos.add(new_repo)

...should be:

		repos.delete(repo.id)
		repos.add(new_repo)

...but then for this and RHN we probably need a better way to replace a
repo. (or some way so you don't have to) ... but I can't think of one
atm.



More information about the Yum-devel mailing list