ZenPacks and JSON API

Expand all | Collapse all

Zenpack Development Testing

  • 1.  Zenpack Development Testing

    Posted 22 days ago
    Good Morning,

    is there a best practice for testing new Zenpacks? It's a little bit annoying to wait until Zenoss has restarted every time I changed the code of a new Zenpack and committed the container.

    Any hints are appreciated.

    Thanks, Martin

    ------------------------------
    Martin
    CompanyName
    ------------------------------


  • 2.  RE: Zenpack Development Testing

    Posted 22 days ago
    Hello Martin,

    Have you been following the directions here? Welcome to the ZenPack SDK! - ZenPack SDK 2.1.1 documentation 

    Between that and Jane Curry's pdfZenPack Developers' Guide, you can get a pretty good workflow that does not involve a full restart with each code change. It all depends on which part of the code you modify, but some code changed don't even require restarts, others just a restart of a few containers.

    On the other hand, for some code changes you actually need to uninstall a zenpack before you even make a code change (like any sort of relationship modification). I found this out the hard way.

    Morgan

    ------------------------------
    Morgan Timney
    The Southern Company
    Birmingham AL
    ------------------------------



  • 3.  RE: Zenpack Development Testing

    Posted 19 days ago
    Martin,
    For the ZenPacks I developed in my Professional Services role at Zenoss, I developed a way to do unit testing of ZenPacks without a running Zenoss. It's not a best practice, just a repeatable way to help develop a ZenPack quickly and catch silly errors early. You will still need to do final testing within a running Zenoss but it should cut down on how many times you have to do that. Please find the documentation attached along with a python script that is referenced. You will need to rename build_zenpack.txt to build_zenpack.py. I'm sure there's mistakes so feedback welcome.

    Thanks
    -Patrick

    ------------------------------
    Patrick McMahon
    Sr. Security and Compliance Specialist
    Zenoss
    ------------------------------



  • 4.  RE: Zenpack Development Testing

    Posted 11 days ago
    Thanks  Patrick, I will certainly try this out.

    ------------------------------
    Martin
    CompanyName
    ------------------------------



  • 5.  RE: Zenpack Development Testing

    Posted 11 days ago
    I tend to develop ZenPacks on a Zenoss 4 platform, even if the ultimate target is Zenoss 5/6 - much faster to restart stuff and more chance of just restarting the affected daemons.


    Cheers,
    Jane

    ------------------------------
    Jane Curry
    Skills 1st United Kingdom
    jane.curry@skills-1st.co.uk
    ------------------------------