Installing python eggs using puppet.

1,015 views
Skip to first unread message

tarjei

unread,
Jun 26, 2008, 4:14:59 AM6/26/08
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm looking into using puppet to deploy different python applications to
different servers.

I want to be able to sandbox the different applications using virtenv.
A basic setup would be:

1. create user
2. install the virtual environment for that user
- -> as the user: virtualenv /userdir
3. Install package dependencies.
- -> as the user: easy_install <mypackage>.egg
This should install any dependencies.

Is this possible, or should I just host the basic user environment in my
RCS repository?

Has anyone used puppet to install eggs earlier? Do you have any tips?

kind regards,
Tarjei
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIY1ACYVRKCnSvzfIRAgQiAJ0UYfq4EOMUMqP6Y0jfZU8GFHVxdwCeMlQp
2eQeFUZfXKg1nsn0QRF576U=
=7l02
-----END PGP SIGNATURE-----

James Turnbull

unread,
Jun 26, 2008, 5:42:54 AM6/26/08
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

tarjei wrote:

> Has anyone used puppet to install eggs earlier? Do you have any tips?
>

I started writing a provider for easy_install a while back but quickly
discovered easy_install can't query installed eggs (there is some work
out there with yolk/egg but nothing solid) which makes it hard to manage
them. Nor is there a good uninstall mechanism.

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/1590594444/)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)


Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIY2Se9hTGvAxC30ARAlP4AJ9uarIvdk6ehXiYJ85Ho4CO6BPf/wCgiVwB
vzVG+YdIL7I0m3gcU4UM79k=
=DeB/
-----END PGP SIGNATURE-----

Garth Roxburgh-Kidd

unread,
Jul 30, 2008, 9:45:33 AM7/30/08
to Puppet Users, James Turnbull
James;

If you assume that Puppet is solely responsible for installing
modules, you can use easy_install --report to both keep track of which
modules are installed *and* the files it created.

My working hack to date: http://pastebin.com/f4be5c57a

Next, I'd like to get pymod to take a simple:

pymod { "mysql-python": ensure => installed }

Puppet insists on name => "mysql-python", for some reason...

Yours,
Garth.

PS: I'm hooked. I'm spending hours to ensure I don't ever waste five
minutes manually re-doing something I spent five minutes manually
doing the first time. I hate you, Milkman Dan.

PPS: The second edition better have an index.
Reply all
Reply to author
Forward
0 new messages