Published on InterSystems Developer Community (https://community.intersystems.com)

主页 > IRIS小工具--如何以最简单的方式部署生产系统

文章
Michael Lei · 二月 5, 2023 阅读大约需 1 分钟
Open Exchange

IRIS小工具--如何以最简单的方式部署生产系统

通常,如果你想部署一个解决方案,你需要手动添加项目、配置你的查找表和默认配置。
如果您拥有执行这些操作的所有权限,那也没关系。如果您想部署到客户的生产服务器,但您没有权限,则需要在文档中指明系统部署必须执行的所有步骤。因此,同样必须在文档里手动输入生产项、查找表、默认配置等……
您可以创建一个自动指示所有步骤的安装类,并避免部署中的错误。 `

 Class MySolution.Installations Extends St.Tools.Deploy 
{ 
    Parameter PRODUCTION = "MySolution.Production"; 
    /// Add items 
    Do ..AddItem(, "Item1","myPath.MyClass","Internal") 
    Do ..AddItem(, "Item2","myPath.MyClass2","Internal") 

    /// Add default setting 
    Do ..AddDefaultSetting(,"myPath.MyClass",,"Port","21",1) 

    /// Add value into a lookup table 
    set itemCount = 0 
    set pList($Increment(itemCount))=$Listbuild("MyTable","Campo1","Valor1") 
    set pList($Increment(itemCount))=$Listbuild("MyTable","Campo2","Valor2") 
    set pList = itemCount 
    do ..AddLookupTable(.pList) 
} 

使用此工具,下次需要部署生产环境时,您将节省大量文档,并且可以完全控制部署。

祝编程愉快!

#部署 #Ensemble #InterSystems IRIS #Open Exchange
在 InterSystems Open Exchange 上检查相关应用程序

源 URL:https://cn.community.intersystems.com/post/iris%E5%B0%8F%E5%B7%A5%E5%85%B7-%E5%A6%82%E4%BD%95%E4%BB%A5%E6%9C%80%E7%AE%80%E5%8D%95%E7%9A%84%E6%96%B9%E5%BC%8F%E9%83%A8%E7%BD%B2%E7%94%9F%E4%BA%A7%E7%B3%BB%E7%BB%9F