Skip to content

Commit b298018

Browse files
committed
upgrade scripts
1 parent 438c6e8 commit b298018

4 files changed

Lines changed: 81 additions & 23 deletions

File tree

Dockerfile

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ FROM $IMAGE
66
USER root
77
WORKDIR /opt/dcanalytics
88
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/dcanalytics
9-
COPY irissession.sh /
10-
RUN chmod +x /irissession.sh
119

1210
RUN mkdir -p /tmp/deps \
1311
&& cd /tmp/deps \
@@ -24,26 +22,12 @@ USER ${ISC_PACKAGE_MGRUSER}
2422

2523
COPY Installer.cls .
2624
COPY src src
27-
SHELL ["/irissession.sh"]
28-
29-
RUN \
30-
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \
31-
set sc = ##class(App.Installer).setup() \
32-
zn "DCANALYTICS" \
33-
zpm "install dsw" \
34-
zpm "install isc-dev" \
35-
zpm "install webterminal" \
36-
do ##class(dev.code).workdir("/irisdev/app/src") \
37-
do EnableDeepSee^%SYS.cspServer("/csp/dcanalytics/") \
38-
do ##class(Community.Utils).setup("/opt/dcanalytics/globals.xml",10000000) \
39-
zn "%SYS" \
40-
write "Modify MDX2JSON application security...",! \
41-
set webName = "/mdx2json" \
42-
set webProperties("AutheEnabled") = 64 \
43-
set webProperties("MatchRoles")=":%DB_DCANALYTICS" \
44-
set sc = ##class(Security.Applications).Modify(webName, .webProperties)
45-
46-
SHELL ["/bin/bash", "-c"]
25+
COPY iris.script iris.script
26+
27+
RUN iris start IRIS \
28+
&& iris session IRIS < iris.script \
29+
&& iris stop IRIS quietly
30+
4731

4832
COPY --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /dsw/dcanalytics.json /usr/irissys/csp/dsw/configs/
4933
COPY --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /dsw/config.json /usr/irissys/csp/dsw/

Dockerfile old

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
2+
ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
3+
ARG IMAGE=intersystemsdc/iris-community:2020.2.0.204.0-zpm
4+
FROM $IMAGE
5+
6+
USER root
7+
WORKDIR /opt/dcanalytics
8+
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/dcanalytics
9+
COPY irissession.sh /
10+
RUN chmod +x /irissession.sh
11+
12+
RUN mkdir -p /tmp/deps \
13+
&& cd /tmp/deps \
14+
# Download globals data
15+
&& wget -q -O - https://api.github.com/repos/intersystems-community/dc-analytics/releases/latest \
16+
| egrep 'http.*DCAnalytics_globals.*gz' \
17+
| cut -d : -f 2,3 \
18+
| tr -d '"' \
19+
| wget -O - -i - \
20+
| gunzip > /opt/dcanalytics/globals.xml
21+
22+
23+
USER ${ISC_PACKAGE_MGRUSER}
24+
25+
COPY Installer.cls .
26+
COPY src src
27+
SHELL ["/irissession.sh"]
28+
29+
RUN \
30+
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \
31+
set sc = ##class(App.Installer).setup() \
32+
zn "DCANALYTICS" \
33+
zpm "install dsw" \
34+
zpm "install isc-dev" \
35+
zpm "install webterminal" \
36+
do ##class(dev.code).workdir("/irisdev/app/src") \
37+
do EnableDeepSee^%SYS.cspServer("/csp/dcanalytics/") \
38+
do ##class(Community.Utils).setup("/opt/dcanalytics/globals.xml",10000000) \
39+
zn "%SYS" \
40+
write "Modify MDX2JSON application security...",! \
41+
set webName = "/mdx2json" \
42+
set webProperties("AutheEnabled") = 64 \
43+
set webProperties("MatchRoles")=":%DB_DCANALYTICS" \
44+
set sc = ##class(Security.Applications).Modify(webName, .webProperties)
45+
46+
SHELL ["/bin/bash", "-c"]
47+
48+
COPY --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /dsw/dcanalytics.json /usr/irissys/csp/dsw/configs/
49+
COPY --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /dsw/config.json /usr/irissys/csp/dsw/
50+
51+

Installer.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Class App.Installer
44
XData setup
55
{
66
<Manifest>
7-
<Default Name="SourceDir" Value="#{$system.Process.CurrentDirectory()}src"/>
7+
<Default Name="SourceDir" Value="/opt/dcanalytics/src"/>
88
<Default Name="Namespace" Value="DCANALYTICS"/>
99
<Default Name="app" Value="dcanalytics" />
1010

iris.script

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
;do $System.OBJ.LoadDir("/opt/irisbuild/src","ck",,1)
2+
do $SYSTEM.OBJ.Load("/opt/dcanalytics/Installer.cls", "ck")
3+
set sc = ##class(App.Installer).setup()
4+
5+
zn "%SYS"
6+
Do ##class(Security.Users).UnExpireUserPasswords("*")
7+
8+
zn "DCANALYTICS"
9+
zpm "install dsw"
10+
zpm "install isc-dev"
11+
zpm "install webterminal"
12+
do ##class(dev.code).workdir("/irisdev/app/src")
13+
do EnableDeepSee^%SYS.cspServer("/csp/dcanalytics/")
14+
do ##class(Community.Utils).setup("/opt/dcanalytics/globals.xml",10000000)
15+
zn "%SYS"
16+
write "Modify MDX2JSON application security...",!
17+
set webName = "/mdx2json"
18+
set webProperties("AutheEnabled") = 64
19+
set webProperties("MatchRoles")=":%DB_DCANALYTICS"
20+
set sc = ##class(Security.Applications).Modify(webName, .webProperties)
21+
22+
;zpm "load /opt/irisbuild/ -v":1:1
23+
halt

0 commit comments

Comments
 (0)