Skip navigation
Currently Being Moderated

Migrating ZIP ZenPacks to EGGs

VERSION 2  Click to view document history
Created on: Sep 14, 2009 11:16 AM by Matt Ray - Last Modified:  Nov 11, 2009 5:11 PM by Matt Ray
Zip-file ZenPacks have been deprecated in Zenoss in favor of Eggs, but nothing has been done to enforce this yet. (http://dev.zenoss.com/trac/ticket/4350)  That said, converting existing ZenPacks to Eggs is slightly non-trivial.  Zenoss has a command eggifyzenpack that does the preliminary work, but there are a few gotchas that need documenting.  I converted the The specified document was not found., here are the steps taken.  
  1. Install the Zip ZenPack
  2. From the command line as the 'zenoss' user, use the command

eggifyzenpack --newid ZenPacks.community.VMwareEsx VMwareEsx

  1. Unzip the new ZenPacks.community.VMwareEsx-1.0-py2.4.egg into your ZenPacks source tree.
  2. The new .Egg that was created was missing the modeler/plugins directory, so I unzipped the original VMwareEsx.zip and copied it over into ZenPacks/community/VMwareEsx

 

  1. Copy over the setup.py from one of the other ZenPacks and edit it to match your new ZenPack (I revved the VMwareEsx to 2.0 to reflect the new packaging).  Another important thing to note is the upgrade section.  Put this in to upgrade older .Zip versions of the ZenPack to your new .Egg ZenPack.

PREV_ZENPACK_NAME = 'VMwareEsx'

  1. The ZenPacks.community.VMwareEsx/ZenPacks/community/VMwareEsx/skins directory will have to be added manually (with a placeholder.txt to get it included), for some reason it is expected when you go to install the new Egg ZenPack.  Also you will need to add a MANIFEST.in file to get the skins/ directory included.
  2. The original VMwareEsx.zip ZenPack had a hard-coded location of $ZENHOME/VMware/libexec/vmware-esx.sh which had to be fixed with a zProperty to make the path dynamic.  Here's the changeset:98
  1. The ZenPacks.community.VMwareEsx/ZenPacks/community/VMwareEsx/modeler/plugins/VmwareEsxDf.py had a name-space assumption that was no longer correct, so it was moved. changeset:102
  1. Had to add missing __init__.py files to help modeler plugin get properly found. changeset:122

Once everything is in place,

make ZenPacks.community.VMwareEsx

and behold the magic of your new .Egg ZenPack.  It can be used to upgrade old Zip-file ZenPacks to the new Egg.

Comments (0)