A new release of ZPM has been published 0.4.0 New in this release * Added support for Deployed packages, publishing, and installation * Support for multiple registry servers, e.g. public community registry, private corporate, and so on, including Python embedded code * Ability to show all versions and package origin in search * Fixed issue for packages with preload code * The expanded limit for the length of arguments in Invoke ## Multiple registries It is now possible to define more than one registry in your instance, so, you may use public community, testing, or private corporate registry at the same time. Just use another name for the registry For instance, we can add the testing registry
zpm:USER>repo -n test -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42 

test
        Source:                 https://test.pm.community.intersystems.com/registry/
        Enabled?                Yes
        Available?              Yes
        Use for Snapshots?      Yes
        Use for Prereleases?    Yes
        Is Read-Only?           No
        Deployment Enabled?     No
        Username:               test
        Password:               <set>

zpm:USER>repo -list

test
        Source:                 https://test.pm.community.intersystems.com/registry/
        Enabled?                Yes
        Available?              Yes
        Use for Snapshots?      Yes
        Use for Prereleases?    Yes
        Is Read-Only?           No
        Deployment Enabled?     No
        Username:               test
        Password:               <set> 


registry
        Source:                 https://pm.community.intersystems.com
        Enabled?                Yes
        Available?              Yes
        Use for Snapshots?      Yes
        Use for Prereleases?    Yes
        Is Read-Only?           No
        Deployment Enabled?     No
And in addition to this change, it's now possible to redefine properties for registry by only passing the name of the existing registry. For instance to update only the password
zpm:USER>repo -n test -pass PassWord42 

test
        Source:                 https://test.pm.community.intersystems.com/registry/
        Enabled?                Yes
        Available?              Yes
        Use for Snapshots?      Yes
        Use for Prereleases?    Yes
        Is Read-Only?           No
        Deployment Enabled?     No
        Username:               test
        Password:               <set>
## Deployed packages Since version 0.4.0, ZPM now supports deployed packages. The minimal module.xml may look like below, important here is `Deploy="true"` flag
<span class="php"><span class="hljs-meta">xml version=<span class="hljs-string">"1.0"</span> encoding=<span class="hljs-string">"UTF-8"</span><span class="hljs-meta">?></span></span>
<span class="hljs-tag"><<span class="hljs-name">Export</span> <span class="hljs-attr">generator</span>=<span class="hljs-string">"Cache"</span> <span class="hljs-attr">version</span>=<span class="hljs-string">"25"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">Document</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"demo.ZPM"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">Module</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">Name</span>></span>demo<span class="hljs-tag"></<span class="hljs-name">Name</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">Version</span>></span>1.0.0<span class="hljs-tag"></<span class="hljs-name">Version</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">Description</span>></span>DEMO.<span class="hljs-tag"></<span class="hljs-name">Description</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">Keywords</span>></span>demo<span class="hljs-tag"></<span class="hljs-name">Keywords</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">SourcesRoot</span>></span>src<span class="hljs-tag"></<span class="hljs-name">SourcesRoot</span>></span>
  <span class="hljs-tag"><<span class="hljs-name">Resource</span> <span class="hljs-attr">Name</span>=<span class="hljs-string">"Sample.Demo.PKG"</span> <span class="hljs-attr">Deploy</span>=<span class="hljs-string">"true"</span>/></span>
<span class="hljs-tag"></<span class="hljs-name">Module</span>></span>
<span class="hljs-tag"></<span class="hljs-name">Document</span>></span>
<span class="hljs-tag"></<span class="hljs-name">Export</span>></span>
The process of development is the same as previously, you should use the load command  to load the module in development mode (by default)
zpm <span class="hljs-string">"load /home/irisowner/myproject"</span>
In this case, zpm will load source code, and ignore Deploy flag due to DeveloperMode, so, you can modify the code. ### Publishing To publish deployed module, you have to use your own registry, or you may use the testing community registry for tests.
zpm:USER>publish demo -DPublishTo=test

[USER|demo]     PrepareDeploy START
[USER-PACKAGE-429287|demo]      PrepareDeploy SUCCESS
[USER-PACKAGE-429287|demo]      Reload START (/home/irisowner/zpm/packages/demo/)
[USER-PACKAGE-429287|demo]      Reload SUCCESS
[demo]  Module object refreshed.
[USER-PACKAGE-429287|demo]      Validate START
[USER-PACKAGE-429287|demo]      Validate SUCCESS
[USER-PACKAGE-429287|demo]      Compile START
[USER-PACKAGE-429287|demo]      Compile SUCCESS
[USER-PACKAGE-429287|demo]      Activate START
[USER-PACKAGE-429287|demo]      Configure START
[USER-PACKAGE-429287|demo]      Configure SUCCESS
[USER-PACKAGE-429287|demo]      Activate SUCCESS
[USER-PACKAGE-429287|demo]      Package START
[USER-PACKAGE-429287|demo]      MakeDeployed START
[USER-PACKAGE-429287|demo]      MakeDeployed SUCCESS
[USER|demo]     Package SUCCESS
[USER|demo]     Register START
[USER|demo]     Register SUCCESS
[USER|demo]     Publish START
[USER|demo]     Publish SUCCESS
When ZPM see that package uses Deploy=true for some resources, for the purpose of packaging and publishing it creates a new temporary namespace, and loads the package there, deploys the code, and packages what's left without the original source code, where it is not supposed to be. And log shows each step and the namespace where that step was performed. An additional parameter `-DPublishTo=test`, defines the name of the registry where to publish the package. And if you wish you may change the release number with parameter as well `-DNewVersion=1.0.0` ### Installation deployed packages Installation is as usual, but you will not be able to install deployed package, or any package in production mode if you already have the package installed in development mode. 
zpm:USER>install demo

ERROR! Cannot install 'demo' over previously installed in developer mode
You would need to uninstall the package installed in development mode, or use a clean namespace or instance for it. It's important to remember, that deployed package does not have source code, so, the packaging should be completed on a specific version of IRIS that which developer support. The registry supports multiple platform versions for one specific version of the package, so, during installation zpm will request a version for the platform. To compare versions it uses only major and minor parts of the IRIS version, e.g. 2022.2, 2021.1. When you will try to install the package on an unsupported version of IRIS, will get the error
zpm:USER>install test/demo

ERROR! Deployed package 'demo' 1.0.0 not supported on this platform 2022.1.
Successful install
zpm:USER>install test/demo

[USER|demo]     Reload START (/usr/irissys/mgr/.modules/USER/demo/1.0.0/)
[USER|demo]     Reload SUCCESS
[demo]  Module object refreshed.
[USER|demo]     Validate START
[USER|demo]     Validate SUCCESS
[USER|demo]     Compile START
[USER|demo]     Compile SUCCESS
[USER|demo]     Activate START
[USER|demo]     Configure START
[USER|demo]     Configure SUCCESS
[USER|demo]     Activate SUCCESS
## Docker images with ZPM The latest ZPM already available with IRIS Community and pre-installed ZPM Image names * intersystemsdc/iris-community * intersystemsdc/irishealth-community * intersystemsdc/iris-ml-community * intersystemsdc/irishealth-ml-community And tags available * latest, and full version tag 2022.1.0.209.0-zpm * preview, and full version tag 2022.2.0.345.0-zpm * 2021.2.0.651.0-zpm All images are available for x86-64 and ARM64 by the same name.