-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathinit-docker.ps1
102 lines (87 loc) · 4.84 KB
/
init-docker.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
# wipe screen
Clear-Host
$PROJECT_HOME = $PSScriptRoot
$DEMO="JBoss BRMS Red Hat Cool Store Demo"
$AUTHORS1="Jason Milliron, Andrew Block,"
$AUTHORS2="AMahdy AbdElAziz, Eric D. Schabell"
$AUTHORS3="Duncan Doyle, Jaen Swart"
$PROJECT="[email protected]:jbossdemocentral/brms-coolstore-demo.git"
$PRODUCT="JBoss BRMS"
$DOCKERFILE="support\docker\Dockerfile"
$SRC_DIR="$PROJECT_HOME\installs"
$SUPPORT_DIR="$PROJECT_HOME\support"
$BRMS="jboss-brms-6.4.0.GA-deployable-eap7.x.zip"
$EAP="jboss-eap-7.0.0-installer.jar"
$VERSION="6.4"
set NOPAUSE=true
Write-Host "##############################################################"
Write-Host "## ##"
Write-Host "## Setting up the $DEMO ##"
Write-Host "## ##"
Write-Host "## ##"
Write-Host "## #### #### # # ### ##"
Write-Host "## # # # # # # # # # ##"
Write-Host "## #### #### # # # ## ##"
Write-Host "## # # # # # # # ##"
Write-Host "## #### # # # # ### ##"
Write-Host "## ##"
Write-Host "## ##"
Write-Host "## brought to you by, ##"
Write-Host "## $AUTHORS1 ##"
Write-Host "## $AUTHORS2 ##"
Write-Host "## $AUTHORS3 ##"
Write-Host "## ##"
Write-Host "## $PROJECT ##"
Write-Host "## ##"
Write-Host "##############################################################`n"
If (Test-Path "$SRC_DIR\$EAP") {
Write-Host "Product sources are present...`n"
} Else {
Write-Host "Need to download $EAP package from the Customer Support Portal"
Write-Host "and place it in the $SRC_DIR directory to proceed...`n"
exit
}
#If (Test-Path "$SRC_DIR\$EAP_PATCH") {
# Write-Host "Product patches are present...`n"
#} Else {
# Write-Host "Need to download $EAP_PATCH package from the Customer Support Portal"
# Write-Host "and place it in the $SRC_DIR directory to proceed...`n"
# exit
#}
If (Test-Path "$SRC_DIR\$BRMS") {
Write-Host "Product sources are present...`n"
} Else {
Write-Host "Need to download $BRMS package from the Customer Support Portal"
Write-Host "and place it in the $SRC_DIR directory to proceed...`n"
exit
}
Copy-Item "$SUPPORT_DIR\docker\Dockerfile" "$PROJECT_HOME" -force
Write-Host "Starting Docker build.`n"
$argList = "build -t jbossdemocentral/brms-coolstore-demo $PROJECT_HOME"
$process = (Start-Process -FilePath docker.exe -ArgumentList $argList -Wait -PassThru -NoNewWindow)
Write-Host "`n"
If ($process.ExitCode -ne 0) {
Write-Error "Error occurred during Docker build!"
exit
}
Write-Host "Docker build finished.`n"
Remove-Item "$PROJECT_HOME\Dockerfile" -Force
Write-Host "=================================================================================="
Write-Host "= ="
Write-Host "= You can now start the $PRODUCT in a Docker container with: ="
Write-Host "= ="
Write-Host "= docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-coolstore-demo ="
Write-Host "= ="
Write-Host "= Login into business central at: ="
Write-Host "= ="
Write-Host "= http://localhost:8080/business-central (u:brmsAdmin / p:jbossbrms1!) ="
Write-Host "= ="
Write-Host "= Login into the Coolstore application at: ="
Write-Host "= ="
Write-Host "= http://localhost:8080/brms-coolstore-demo ="
Write-Host "= ="
Write-Host "= See README.md for general details to run the various demo cases. ="
Write-Host "= ="
Write-Host "= $PRODUCT $VERSION $DEMO Setup Complete. ="
Write-Host "= ="
Write-Host "================================================================================"