Article
· Nov 29, 2021 2m read

Deploying solutions without source code from ZPM


I recently published the "appmsw-docbook" module for deploying the solution not by individual programs, but by the entire database. This solution allows you to deploy a project without source codes.

Having received feedback, I decided to improve it significantly. Replaced zip archive with tgz, which will allow not using external system-dependent archivers.

Implemented a method for preparing an archive of a database and its dependent web applications. And the deployment archive itself is assembled as a zpm module into which the utility for deploying the database is replicated.
Several such archives can be prepared for different versions of iris, since it is known that the object code differs in different versions.

To create database, you need to run:

USER>do ##class(appmsw.sys.dbdeploy).CreateDBNS("LOCKDOWN")

USER>zn "LOCKDOWN"

LOCKDOWN>zpm "install isc-apptools-lockdown"

You can protect your solution by deleting the source code:

 USER>do ##class(appmsw.sys.dbdeploy).MakeClassDeployed("appmsw.security","LOCKDOWN")
 appmsw.security.lockdown deployed

Create an archive for database deployment and move it outside the container:

 USER>do ##class(appmsw.sys.dbdeploy).CreateTGZ("lockdown","/irisdev/app/db-tgz/")
 ..
 Create TarGZ /irisdev/app/db-tgz/lockdown.tgz

 USER> do ##class(appmsw.sys.dbdeploy).CreateTGZ("lockdown","/irisdev/app/db-tgz/",1) //;  ,1= including the version in the archive name
 ..
 Create TarGZ /irisdev/app/db-tgz/lockdown=2021-1-(Build-215-3U).tgz

Create your project based on appmsv-dbdeploy by adding your new archives files to it and deploying new databases. The archives will contain resources that can be implemented as independent modules ZPM:

 USER>do ##class(appmsw.sys.dbdeploy).CreateDbFromTgz("lockdown","newlock")

I will be glad if my project will be useful in improving your systems in the security section.
I invite you to vote for my project

Discussion (0)1
Log in or sign up to continue