Question
· Aug 20

Enabling IPM across namespaces

I've been trying to set up a script I can run after installing an instance to enable IPM across all namespaces. I have been able to install IPM successfully using

set r = ##class(%Net.HttpRequest).%New(),
    r.Server="pm.community.intersystems.com",
    r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" 
d r.Get("/packages/zpm/latest/installer"),
    $system.OBJ.LoadStream(r.HttpResponse.Data,"c")

and then running the zpm commands

repo -r -n registry -url https://pm.community.intersystems.com/ -user "" -pass ""
enable -map -globally

This seems to enable me to run further zpm commands in the namespace where I initially installed IPM. In other namespaces, I can see that IPM is installed, but I do not seem to have a registry configured and cannot install packages from it unless I first run a similar 'repo -r -n registry...' command in each namespace. Is this expected? I thought 'enable -map -globally' was supposed to avoid the need to do that, but I may be missing something.

Product version: IRIS 2025.1
Discussion (3)4
Log in or sign up to continue

Your experience aligns with changes in the behavior of the InterSystems Package Manager (IPM) from version 0.9. As of this version, IPM configurations are no longer automatically mapped across all namespaces. Instead, they are namespace-specific, allowing different versions and configurations in various namespaces. Thus, even if IPM is installed in a namespace, its repository configuration is not automatically shared with other namespaces unless additional setup steps are taken [1].

To replicate the behavior of earlier versions where configurations were globally mapped, you need to execute zpm "enable -map -globally" in each namespace where you want consistent registry settings. Simply running this command in the namespace where IPM was initially installed does not propagate settings globally across all namespaces [1].

Another option is using zpm "enable -map -repos -globally". This ensures repository settings are mapped globally only if the %IPM classes and routines are mapped to the same namespace [1].

If you want the community registry configured globally, running zpm "enable -community" is the recommended shortcut. This command ensures IPM routines, classes, and repository settings are globally mapped across namespaces as in legacy behavior [1].

Finally, if the mapping isn't behaving as expected, verifying the configuration in each namespace with specific commands like zpm "repo -r -n registry ..." might still be necessary unless globally enabling settings resolves it.

Sources:

Came here to say this. From the top-level readme @ https://github.com/intersystems/ipm:

IPM 0.9.0+ can be installed with different versions and registry settings per namespace, and does not have the community package registry enabled by default. If you want the legacy (<=0.7.x) behavior of a system-wide installation and access to community packages in all namespaces, run zpm "enable -community" after installing IPM. See zpm "help enable" for details.