The DolphinExpressPxInstall.ps1 script can be used to install binaries needed on a machine belonging to the interconnect topology or on a machine used to manage the topology.
The script can be downloaded from http://ww.dolphinics.no/download/DolphinExpressPxInstall.ps1 .
PS C:\> Get-Content .\DolphinExpressPxInstall.ps1
param([switch]$Compute, [switch]$Management, [switch]$ComputeAndManagement)
$start = Get-Date;
$s = $Compute.GetHashCode()+$Management.GetHashCode()+$ComputeAndManagement.GetHashCode();
if($s -gt 1) {
Write-Host "You can specify only one switch to this script: -Compute, -ComputeAndManag
ement, -Management";
exit 1;
}
if($s -eq 0) {
Write-Host "This script installs the PCI Express software stack.
Use one of the following switches:";
Write-Host "-Compute " -ForegroundColor Yellow -NoNewline;
Write-Host "to install the binaries that compose a Cluster Node";
Write-Host "-Management " -ForegroundColor Yellow -NoNewline;
Write-Host "to install the Cluster Management Node binaries";
Write-Host "-ComputeAndManagement " -ForegroundColor Yellow -NoNewline;
Write-Host "to install the binaries on a machine that is both a Cluster Node and a Cluster Management Nodes";
exit 1;
}
$os = (Get-WmiObject Win32_OperatingSystem).Version.Substring(0,3) -replace "\.","";
& reg query HKU\S-1-5-19 2>&1 | Out-Null
if($LASTEXITCODE) {
Write-Host "The script requires administrative privileges.";
if($os -ge 60) {
Write-Host "On Window Vista/Server 2008 and above, type
cmd
on the Start menu, right click on the result and select
Run as administrator.
Relaunch the script.";
}
exit 1;
}
if($Compute) {
Write-Host "
With -Compute, the SW stack is installed from the command line. The stack is made by: Driv
ers, Demos, ExpressWay and NMPI components.
The GUI alternative is to launch the MSI without any parameters and specify Cluster Node on the
Setup Type page.
";
} elseif($ComputeAndManagement) {
Write-Host "
With -ComputeAndManagement, the SW stack is installed from the command line and the interc
onnect topology is specified and propagated. The stack is made by: Drivers, Demos, Express
Way, NMPI, Administration, Graphical and Manager components.
After the installation, the configuration stage asks for the topology characteristics and
calls dis_mkconf. The tool is called while the dis_networkmgr service is st
opped. The new topology characteristics are propagated to each interconnected Cluster Node after s
tarting dis_networkmgr service.
The GUI alternative is to launch the MSI without any parameters and specify Custom on the
Setup Type page, then select each of the aforementioned components.
"
} elseif($Management) {
Write-Host "
With -Management, the SW stack is installed from the command line and the interconnect top
ology is specified and propagated. The stack is made by: Administration, Graphical and Man
ager components.
After the installation, the configuration stage asks for the topology characteristics and
calls dis_mkconf. This tool is called while the dis_networkmgr service is s
topped. The new topology characteristics are propagated to each interconnected Cluster Node after
starting dis_networkmgr service.
The GUI alternative is to launch the MSI without any parameters and specify Management on
the Setup Type page.
";
}
Write-Host "Please specify the path to MSI package: " -NoNewline;
$msi = Read-Host;
$gi = gi $msi;
$msi = $gi.Name;
$full = $gi.FullName;
if($Compute -or $ComputeAndManagement) {
$msiargs = "ADDLOCAL=Drivers,Demos,ExpressWay,NMPI";
if($ComputeAndManagement) {
$msiargs = "${msiargs},Administration,Graphical,Manager";
}
Write-Host "
msiexec /i $msi $msiargs /qb" -ForegroundColor Yellow;
if($os -ge 60) {
Write-Host "
During the process you will be asked for permission to install each driver.
Acknowledge the Security Warning by clicking on " -NoNewLine;
Write-Host "Install" -ForegroundColor Yellow -NoNewLine;
Write-Host ". A failure to install drivers may appear in the TrayIcon area.
";
} else {
Write-Host "
A New Hardware Wizard can pop up during the drivers installation.
You can either " -NoNewLine;
Write-Host "Cancel" -ForegroundColor Yellow -NoNewLine;
Write-Host " it or leave it as it is. It disappears by itself in a few seconds.
";
}
$a = Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList "/i", $full, $msiargs,
"/qb" -PassThru;
if($a.ExitCode -ne 0 -and $a.ExitCode -ne 3010) {
Write-Host "The installation procedure failed.";
exit 1;
}
} else {
$msiargs = "ADDLOCAL=Administration,Graphical,Manager";
Write-Host "
msiexec /i $msi $msiargs /qb
" -ForegroundColor Yellow;
$a = Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList "/i", $full, $msiargs,
"/qb" -PassThru;
if($a.ExitCode -ne 0) {
Write-Host "The installation procedure failed.";
exit 1;
}
}
if($Management -or $ComputeAndManagement) {
Write-Host "Please specify the Cluster Nodes that belong to the interconnect topology.
Separate the names with spaces: " -NoNewLine;
$nodes = Read-Host;
$nodes = $nodes.Trim() -split " +";
do {
Write-Host "Please specify the topology type: [" -NoNewline;
Write-Host "D" -ForegroundColor Yellow -NoNewline;
Write-Host "]irect, [" -NoNewline;
Write-Host "S" -ForegroundColor Yellow -NoNewline;
Write-Host "]witch: " -NoNewline;
$t = Read-Host;
$t = $t.ToLower();
} until ($t -eq "d" -or $t -eq "s");
if($t -eq "d") {
$t = 2;
} else {
$t = 9;
}
do {
Write-Host "Please specify the link width [" -NoNewline;
Write-Host "4" -ForegroundColor Yellow -NoNewline;
Write-Host "][" -NoNewline;
Write-Host "8" -ForegroundColor Yellow -NoNewline;
Write-Host "]: " -NoNewline;
$link = Read-Host;
} until ($link -eq 4 -or $link -eq 8);
Write-Host "
Stop-Service dis_networkmgr" -ForegroundColor Yellow;
Stop-Service dis_networkmgr -ErrorAction SilentlyContinue;
Write-Host "& '${env:ProgramFiles}\Dolphin Express PX\Util\dis_mkconf.e
xe' -fabrics 1 -sctt $t -sclw $link -nodes $nodes" -ForegroundColor Yellow;
& "${env:ProgramFiles}\Dolphin Express PX\Util\dis_mkconf.exe" -fabrics
1 -sctt $t -sclw $link -nodes $nodes | Out-Null;
Write-Host "Start-Service dis_networkmgr
" -ForegroundColor Yellow;
Start-Service dis_networkmgr;
Write-Host "Launching dis_admin. Press Ctrl+O to connect to localhost and view the inter
connect status. Launch applications from " -NoNewLine;
Write-Host "Cluster/Run Application" -ForegroundColor Yellow -NoNewLine;
Write-Host " menu.
";
Start-Process "${env:ProgramFiles}\Dolphin Express PX\Util\dis_admin.exe";
}
$stop = Get-Date;
$diff = $stop.Subtract($start);
Write-Host "Installation time is",$diff.Minutes,"min,",$diff.Seconds,"sec.
";
if($a.ExitCode -eq 3010) {
Write-Host "The software stack installation demands a reboot.
";
}