For ZenPacks that will include any items other than just database objects we recommend using a symbolic link within $ZENHOME/Products that points to your ZenPack directory rather than having your ZenPack live directly within the Products directory. There are a couple reasons for this:
-
Performing a “zenpack –remove” deletes the ZenPack directory from $ZENHOME/Products. If your ZenPack is symlinked then just the link is deleted, otherwise all your files are deleted.
-
If your Zenoss installation is checked out from the subversion repository and you want to keep your ZenPack code in a version control system then having the one within the other can sometimes cause complications.
To relocate a ZenPack you can simply move the ZenPack’s directory out of $ZENHOME/Products and replace it with a symbolic link to the ZenPack’s new location. If you are installing an existing ZenPack you can use the –link option to the zenpack command to create the symlink automatically:
zenpack –link –install MyZenPack
When using the –link option you must specify a directory rather than a .zip file for the ZenPack. Note that if you specify a directory to zenpack but omit the –link option then zenpack will copy the directory to $ZENHOME/Products rather than creating a symlink for it.