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.
- Install the Zip ZenPack
- From the command line as the 'zenoss' user, use the command
eggifyzenpack --newid ZenPacks.community.VMwareEsx VMwareEsx
- Unzip the new ZenPacks.community.VMwareEsx-1.0-py2.4.egg into your ZenPacks source tree.
- 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
- 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'
- 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.
- 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
- 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
- Had to add missing __init__.py files to help modeler plugin get properly found. changeset:122
Once everything is in place,
and behold the magic of your new .Egg ZenPack. It can be used to upgrade old Zip-file ZenPacks to the new Egg.