InterSystems Package Manager ZPM 0.4.0 Release
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
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>
Since version 0.4.0, ZPM now supports deployed packages. The minimal module.xml may look like below, important here is
"1.0" encoding="UTF-8" xml version=<Export generator="Cache" version="25"> <Document name="demo.ZPM"> <Module> <Name>demo</Name> <Version>1.0.0</Version> <Description>DEMO.</Description> <Keywords>demo</Keywords> <SourcesRoot>src</SourcesRoot> <Resource Name="Sample.Demo.PKG" Deploy="true"/> </Module> </Document> </Export>
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 "load /home/irisowner/myproject"
In this case, zpm will load source code, and ignore Deploy flag due to DeveloperMode, so, you can modify the code.
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
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.
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
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
All images are available for x86-64 and ARM64 by the same name.