-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiris.script
41 lines (31 loc) · 1.66 KB
/
iris.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// unexpire passwords for dev mode
new $namespace
set $namespace = "%SYS"
do ##class(Security.Users).UnExpireUserPasswords("*")
// create namespace & database
do ##class(%SQL.Statement).%ExecDirect(, "CREATE DATABASE INTEROP ON DIRECTORY '/usr/irissys/mgr/interop/'")
do ##class(%EnsembleMgr).EnableNamespace("INTEROP")
set $namespace = "INTEROP"
// install ipm
set version="latest" s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/"_version_"/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
zpm "enable -community"
// install webterminal
zpm "install webterminal"
zpm "install objectscript-json-trace-viewer"
// create credentials
do ##class(Ens.Config.Credentials).SetCredential("MySQL_User","testuser","testpassword")
do ##class(Ens.Config.Credentials).SetCredential("StockWS_User","superuser","SYS")
// load Loan example code
do $SYSTEM.OBJ.LoadDir("/opt/irisapp/install/Loan", "ck", ,1)
do $system.OBJ.Load("/opt/irisapp/install/Loan/latest/csp/app/DemoLoanForm.csp", "ck")
do $system.OBJ.Load("/opt/irisapp/install/Loan/latest/csp/app/DemoLoanSubmit.csp", "ck")
// load source code (Order)
do $SYSTEM.OBJ.LoadDir("/opt/irisapp/src", "ck", .errorlog, 1)
// import web applications
set $namespace = "%SYS"
do ##class(Security.Applications).Import("/opt/irisapp/install/order-api-webapp.xml")
// config %db_default resource
set dbdefault = ##class(Security.Resources).%OpenId("%db_%default")
set dbdefault.PublicPermission="R"
do dbdefault.%Save()
halt