From 6c8ef96d31b5dbdbec4b3ad116c87c3a3f49f69c Mon Sep 17 00:00:00 2001 From: isc-tleavitt <73311181+isc-tleavitt@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:59:06 -0500 Subject: [PATCH 1/3] feat: prepare for IPM 0.9.0 --- Dockerfile | 43 +++++++++++++++++++++++++---------------- Dockerfile-phase1 | 40 ++++++++++++++++++++++++-------------- README.md | 2 +- docker-compose-beta.yml | 16 +++++++++++++++ iris_ipm.py | 2 +- 5 files changed, 69 insertions(+), 34 deletions(-) create mode 100644 docker-compose-beta.yml diff --git a/Dockerfile b/Dockerfile index 982cbd1..d0af90a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ -FROM --platform=$BUILDPLATFORM intersystems/iris-community-${BUILDARCH}:2024.1.0.238.0 +FROM --platform=$BUILDPLATFORM intersystems/iris-community:2024.1-linux-${BUILDARCH} + +ARG IPM_INSTALLER=https://pm.community.intersystems.com/packages/zpm/latest/installer RUN \ - wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O /tmp/zpm.xml && \ + wget -q $IPM_INSTALLER -O /tmp/zpm.xml && \ mkdir /usr/irissys/mgr/zpm && \ iris start $ISC_PACKAGE_INSTANCENAME quietly && \ /bin/echo -e \ @@ -10,36 +12,43 @@ RUN \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set pDB(\"Directory\")=\"/usr/irissys/mgr/zpm/\"\n" \ "set sc=##class(SYS.Database).CreateDatabase(pDB(\"Directory\"), 30)\n" \ - "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))" \ + "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))\n" \ + "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "set sc=##class(Config.Databases).Create(\"IPM\",.pDB)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##class(Config.Databases).Create(\"ZPM\",.pDB)\n" \ + "set pNamespace(\"Globals\")=\"IPM\"\n" \ + "set pNamespace(\"Routines\")=\"IPM\"\n" \ + "set sc=##Class(Config.Namespaces).Create(\"IPM\",.pNamespace)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pMap(\"Database\")=\"ZPM\"\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%ZPM\",.pMap)\n" \ + "set pMap(\"Database\")=\"IPM\"\n" \ + "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%IPM\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"IPM\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"IPM.*\",.pMap)\n" \ + "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGF00\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGC00\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "zn \"IPM\"\n" \ "set sc = ##class(%SYSTEM.OBJ).Load(\"/tmp/zpm.xml\", \"c\")\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))" \ - "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)" \ - "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))" \ - "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))" \ - "halt" \ + "zn \"%SYS\"\n" \ + "do ##class(Config.Namespaces).Delete(\"IPM\")\n" \ + "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))\n" \ + "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)\n" \ + "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))\n" \ + "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))\n" \ + "halt\n" \ | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS && \ iris stop $ISC_PACKAGE_INSTANCENAME quietly -FROM --platform=$TARGETPLATFORM intersystems/iris-community-${TARGETARCH}:2024.1.0.238.0 - -COPY iris.key /usr/irissys/mgr/iris.key +FROM --platform=$TARGETPLATFORM intersystems/iris-community:2024.1-linux-${BUILDARCH} USER root diff --git a/Dockerfile-phase1 b/Dockerfile-phase1 index f88038e..a2595c2 100644 --- a/Dockerfile-phase1 +++ b/Dockerfile-phase1 @@ -1,10 +1,11 @@ -ARG IMAGE=containers.intersystems.com/intersystems/iris-community:2022.2.0.368.0 -ARG IMAGEARM=containers.intersystems.com/intersystems/iris-community-arm64:2022.2.0.368.0 +ARG IMAGE=intersystems/iris-community:latest-cd ARG DEV=0 FROM $IMAGE +ARG IPM_INSTALLER=https://pm.community.intersystems.com/packages/zpm/latest/installer + RUN \ - wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O /tmp/zpm.xml && \ + wget -q $IPM_INSTALLER -O /tmp/zpm.xml && \ mkdir /usr/irissys/mgr/zpm && \ iris start $ISC_PACKAGE_INSTANCENAME quietly && \ /bin/echo -e \ @@ -13,29 +14,38 @@ RUN \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set pDB(\"Directory\")=\"/usr/irissys/mgr/zpm/\"\n" \ "set sc=##class(SYS.Database).CreateDatabase(pDB(\"Directory\"), 30)\n" \ - "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))" \ + "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))\n" \ + "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "set sc=##class(Config.Databases).Create(\"IPM\",.pDB)\n" \ + "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "set pNamespace(\"Globals\")=\"IPM\"\n" \ + "set pNamespace(\"Routines\")=\"IPM\"\n" \ + "set sc=##Class(Config.Namespaces).Create(\"IPM\",.pNamespace)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##class(Config.Databases).Create(\"ZPM\",.pDB)\n" \ + "set pMap(\"Database\")=\"IPM\"\n" \ + "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%IPM\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pMap(\"Database\")=\"ZPM\"\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%ZPM\",.pMap)\n" \ + "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"IPM\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"IPM.*\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZPM.*\",.pMap)\n" \ + "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGF00\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGC00\",.pMap)\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ + "zn \"IPM\"\n" \ "set sc = ##class(%SYSTEM.OBJ).Load(\"/tmp/zpm.xml\", \"c\")\n" \ "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))" \ - "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)" \ - "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))" \ - "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))" \ - "halt" \ + "zn \"%SYS\"\n" \ + "do ##class(Config.Namespaces).Delete(\"IPM\")\n" \ + "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))\n" \ + "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)\n" \ + "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))\n" \ + "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))\n" \ + "halt\n" \ | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS && \ iris stop $ISC_PACKAGE_INSTANCENAME quietly diff --git a/README.md b/README.md index ffca710..fc5a4e8 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,4 @@ The published images could be found at following Docker Repositories: [InterSystems IRIS Community Edition](https://hub.docker.com/r/intersystemsdc/iris-community) [InterSystems IRIS Community Edition for Health:](https://hub.docker.com/r/intersystemsdc/irishealth-community) -Current version of [ZPM installed](https://openexchange.intersystems.com/package/ObjectScript-Package-Manager-2): 0.7.0 +Current version of [IPM installed](https://openexchange.intersystems.com/package/InterSystems-Package-Manager-1): 0.9.0 diff --git a/docker-compose-beta.yml b/docker-compose-beta.yml new file mode 100644 index 0000000..dc42f80 --- /dev/null +++ b/docker-compose-beta.yml @@ -0,0 +1,16 @@ +version: '3.6' +services: + iris: + build: + context: . + dockerfile: Dockerfile-amd64 + args: + IPM_INSTALLER: https://github.com/intersystems/ipm/releases/download/v0.9.0-beta.31/zpm-0.9.0-beta.31.xml + restart: always + ports: + - 1972 + - 57774:52773 + - 53773 + volumes: + - ~/iris.key:/usr/irissys/mgr/iris.key + - ./:/irisdev/app diff --git a/iris_ipm.py b/iris_ipm.py index 430d9f5..35ee4d4 100644 --- a/iris_ipm.py +++ b/iris_ipm.py @@ -21,7 +21,7 @@ def shell(cmd, status): status.put(True) - res = iris.cls("%ZPM.PackageManager").Shell(cmd) + res = iris.cls("%IPM.Main").Shell(cmd) print('') if res != 1: status.get() From 16e0c88bc8ec6d9358c6ab879e0214d135498587 Mon Sep 17 00:00:00 2001 From: isc-tleavitt <73311181+isc-tleavitt@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:26:36 -0500 Subject: [PATCH 2/3] chore: move IRIS script to separate file --- .dockerignore | 3 ++- Dockerfile | 43 +++---------------------------------------- Dockerfile-phase1 | 43 +++---------------------------------------- iris.script | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 81 deletions(-) create mode 100644 iris.script diff --git a/.dockerignore b/.dockerignore index 9a1c280..cc970a8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ ** !docker-entrypoint.sh !iriscli -!iris_ipm.py \ No newline at end of file +!iris_ipm.py +!iris.script \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d0af90a..cf8948d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,50 +2,13 @@ FROM --platform=$BUILDPLATFORM intersystems/iris-community:2024.1-linux-${BUILDA ARG IPM_INSTALLER=https://pm.community.intersystems.com/packages/zpm/latest/installer +COPY ./iris.script /tmp/iris.script + RUN \ wget -q $IPM_INSTALLER -O /tmp/zpm.xml && \ mkdir /usr/irissys/mgr/zpm && \ iris start $ISC_PACKAGE_INSTANCENAME quietly && \ - /bin/echo -e \ - "set pNS(\"Globals\")=\"%DEFAULTDB\"\n" \ - "set sc=##class(Config.Namespaces).Create(\"%ALL\",.pNS)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pDB(\"Directory\")=\"/usr/irissys/mgr/zpm/\"\n" \ - "set sc=##class(SYS.Database).CreateDatabase(pDB(\"Directory\"), 30)\n" \ - "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##class(Config.Databases).Create(\"IPM\",.pDB)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pNamespace(\"Globals\")=\"IPM\"\n" \ - "set pNamespace(\"Routines\")=\"IPM\"\n" \ - "set sc=##Class(Config.Namespaces).Create(\"IPM\",.pNamespace)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pMap(\"Database\")=\"IPM\"\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%IPM\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"IPM\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGF00\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGC00\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "zn \"IPM\"\n" \ - "set sc = ##class(%SYSTEM.OBJ).Load(\"/tmp/zpm.xml\", \"c\")\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "zn \"%SYS\"\n" \ - "do ##class(Config.Namespaces).Delete(\"IPM\")\n" \ - "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))\n" \ - "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)\n" \ - "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))\n" \ - "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))\n" \ - "halt\n" \ - | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS && \ + iris session $ISC_PACKAGE_INSTANCENAME -U %SYS < /tmp/iris.script && \ iris stop $ISC_PACKAGE_INSTANCENAME quietly FROM --platform=$TARGETPLATFORM intersystems/iris-community:2024.1-linux-${BUILDARCH} diff --git a/Dockerfile-phase1 b/Dockerfile-phase1 index a2595c2..44944ce 100644 --- a/Dockerfile-phase1 +++ b/Dockerfile-phase1 @@ -4,48 +4,11 @@ FROM $IMAGE ARG IPM_INSTALLER=https://pm.community.intersystems.com/packages/zpm/latest/installer +COPY ./iris.script /tmp/iris.script + RUN \ wget -q $IPM_INSTALLER -O /tmp/zpm.xml && \ mkdir /usr/irissys/mgr/zpm && \ iris start $ISC_PACKAGE_INSTANCENAME quietly && \ - /bin/echo -e \ - "set pNS(\"Globals\")=\"%DEFAULTDB\"\n" \ - "set sc=##class(Config.Namespaces).Create(\"%ALL\",.pNS)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pDB(\"Directory\")=\"/usr/irissys/mgr/zpm/\"\n" \ - "set sc=##class(SYS.Database).CreateDatabase(pDB(\"Directory\"), 30)\n" \ - "do ##class(SYS.Database).MountDatabase(pDB(\"Directory\"))\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##class(Config.Databases).Create(\"IPM\",.pDB)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pNamespace(\"Globals\")=\"IPM\"\n" \ - "set pNamespace(\"Routines\")=\"IPM\"\n" \ - "set sc=##Class(Config.Namespaces).Create(\"IPM\",.pNamespace)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set pMap(\"Database\")=\"IPM\"\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"%IPM\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapPackages).Create(\"%ALL\",\"IPM\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapGlobals).Create(\"%SYS\",\"IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%IPM.*\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGF00\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "set sc=##Class(Config.MapRoutines).Create(\"%ALL\",\"%ZLANGC00\",.pMap)\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "zn \"IPM\"\n" \ - "set sc = ##class(%SYSTEM.OBJ).Load(\"/tmp/zpm.xml\", \"c\")\n" \ - "if '\$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1)\n" \ - "zn \"%SYS\"\n" \ - "do ##class(Config.Namespaces).Delete(\"IPM\")\n" \ - "do ##class(SYS.Database).Defragment(pDB(\"Directory\"))\n" \ - "do ##class(SYS.Database).CompactDatabase(pDB(\"Directory\"),100)\n" \ - "do ##class(SYS.Database).ReturnUnusedSpace(pDB(\"Directory\"))\n" \ - "do ##class(SYS.Database).DismountDatabase(pDB(\"Directory\"))\n" \ - "halt\n" \ - | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS && \ + iris session $ISC_PACKAGE_INSTANCENAME -U %SYS < /tmp/iris.script && \ iris stop $ISC_PACKAGE_INSTANCENAME quietly diff --git a/iris.script b/iris.script new file mode 100644 index 0000000..3637320 --- /dev/null +++ b/iris.script @@ -0,0 +1,38 @@ +set pNS("Globals")="%DEFAULTDB" +set sc=##class(Config.Namespaces).Create("%ALL",.pNS) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set pDB("Directory")="/usr/irissys/mgr/zpm/" +set sc=##class(SYS.Database).CreateDatabase(pDB("Directory"), 30) +do ##class(SYS.Database).MountDatabase(pDB("Directory")) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##class(Config.Databases).Create("IPM",.pDB) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set pNamespace("Globals")="IPM" +set pNamespace("Routines")="IPM" +set sc=##Class(Config.Namespaces).Create("IPM",.pNamespace) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set pMap("Database")="IPM" +set sc=##Class(Config.MapPackages).Create("%ALL","%IPM",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapPackages).Create("%ALL","IPM",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapGlobals).Create("%ALL","%IPM.*",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapGlobals).Create("%SYS","IPM.*",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapRoutines).Create("%ALL","%IPM.*",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapRoutines).Create("%ALL","%ZLANGF00",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapRoutines).Create("%ALL","%ZLANGC00",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +zn "IPM" +set sc = ##class(%SYSTEM.OBJ).Load("/tmp/zpm.xml", "c") +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +zn "%SYS" +do ##class(Config.Namespaces).Delete("IPM") +do ##class(SYS.Database).Defragment(pDB("Directory")) +do ##class(SYS.Database).CompactDatabase(pDB("Directory"),100) +do ##class(SYS.Database).ReturnUnusedSpace(pDB("Directory")) +do ##class(SYS.Database).DismountDatabase(pDB("Directory")) +halt \ No newline at end of file From 24ac6f5eefabbc35fd50413e7262d97af493a9c4 Mon Sep 17 00:00:00 2001 From: isc-tleavitt <73311181+isc-tleavitt@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:41:44 -0500 Subject: [PATCH 3/3] fix (compatibility): globally-applicable repos --- iris.script | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iris.script b/iris.script index 3637320..631b021 100644 --- a/iris.script +++ b/iris.script @@ -18,6 +18,8 @@ set sc=##Class(Config.MapPackages).Create("%ALL","IPM",.pMap) if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) set sc=##Class(Config.MapGlobals).Create("%ALL","%IPM.*",.pMap) if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +set sc=##Class(Config.MapGlobals).Create("%ALL","IPM.Repo.*",.pMap) +if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) set sc=##Class(Config.MapGlobals).Create("%SYS","IPM.*",.pMap) if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) set sc=##Class(Config.MapRoutines).Create("%ALL","%IPM.*",.pMap) @@ -29,6 +31,7 @@ if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) zn "IPM" set sc = ##class(%SYSTEM.OBJ).Load("/tmp/zpm.xml", "c") if '$Get(sc,1) do ##class(%SYSTEM.Process).Terminate(, 1) +zpm "repo -reset-defaults" zn "%SYS" do ##class(Config.Namespaces).Delete("IPM") do ##class(SYS.Database).Defragment(pDB("Directory"))