-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.ps1
150 lines (110 loc) · 3.44 KB
/
install.ps1
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<#
.SYNOPSIS
Install i2b2 on a windows server
.DESCRIPTION
This scripts is used to install i2b2 or portions of an i2b2 system such as the web client, databases, demo data etc.
.PARAMETER InstallDatabases
Run the ant scripts from the Data Installation Section of the Installation Guide
.PARAMETER InstallDemoData
Loads the i2b2 demo data into after creating the i2b2 database(s)
.PARAMETER InstallCells
Compiles and deploys all of the i2b2 core cells
.PARAMETER InstallWebClient
Extracts the i2b2 web client to the IIS default web site
.PARAMETER InstallAdminTool
Extracts the i2b2 admin tool to the IIS default web site
.PARAMETER InstallShrine
Runs automated install for the SHRINE extension of i2b2
.PARAMETER InstallPrereqs
Install prerequisite software for i2b2 install
.PARAMETER EnableLogging
Keep a written log in addition to console
.EXAMPLE
.\install
Runs the installation of the i2b2 Server Requirements, i2b2 cells, the Data Installation process and loads the demo data
.EXAMPLE
.\install -d $false
Runs the installation of the i2b2 Server Requirements and skips the Data Installation process
.EXAMPLE
.\install -demo $false
Runs the installation of the i2b2 Server Requirements and the Data Installation process but does not load the demo data
.EXAMPLE
.\install -s $true
Runs the installation of the i2b2 Server Requirements, i2b2 cells, the Data Installation process, loads the demo data and installs shrine
.EXAMPLE
.\install -p $false
Runs the installation of the i2b2 Server Requirements, i2b2 cells, the Data Installation process, loads the demo data but does not install prerequisites
.EXAMPLE
.\install -r $true
Runs the installation of the i2b2 Server Requirements, i2b2 cells, the Data Installation process, loads the demo data and writes to a log file concurrently
#>
[CmdletBinding()]
Param(
[parameter(Mandatory=$false)]
[alias("d")]
[bool]$InstallDatabases=$true,
[parameter(Mandatory=$false)]
[alias("demo")]
[bool]$InstallDemoData=$true,
[parameter(Mandatory=$false)]
[alias("c")]
[bool]$InstallCells=$true,
[parameter(Mandatory=$false)]
[alias("w")]
[bool]$InstallWebClient=$true,
[parameter(Mandatory=$false)]
[alias("a")]
[bool]$InstallAdminTool=$true,
[parameter(Mandatory=$false)]
[alias("s")]
[bool]$InstallShrine=$false,
[parameter(Mandatory=$false)]
[alias("p")]
[bool]$InstallPrereqs=$true,
[parameter(Mandatory=$false)]
[alias("r")]
[bool]$EnableLogging=$false
)
<#
.AUTHOR
Ian Lackey
Pediatrics Development Team
Washington University in St. Louis
.DATE
April 14, 2015
#>
$__timer = [Diagnostics.Stopwatch]::StartNew()
. .\functions.ps1
. .\config-system.ps1
. .\config-i2b2.ps1
if($InstallShrine -eq $true){
. .\config-shrine.ps1
}
#Create a directory to work out of
createTempFolder
if($EnableLogging -eq $true){
$Logging = $true
}
if($InstallPrereqs -eq $true){
. .\install-prereqs.ps1
}
if($InstallDatabases -eq $true){
. .\install-data.ps1
}
if($InstallCells -eq $true){
$jboss = Get-Service -Name JBOSS -ErrorAction SilentlyContinue
if(($jboss.Length -gt 0) -and ($jboss.Status -ne "Stopped")) {
Stop-Service $jboss
}
. .\install-i2b2.ps1
}
if($InstallShrine -eq $true){
. .\install-shrine.ps1
}
#clean up after ourself
removeTempFolder
$jboss = Get-Service -Name JBOSS -ErrorAction SilentlyContinue
if(($jboss.Length -gt 0) -and ($jboss.Status -eq "Stopped")) {
Start-Service $jboss
}
formatElapsedTime $__timer.Elapsed