Single machine setup
A single machine setup of a ShareAspace installation consists of installing all components on a single computer (physical or virtual).
This kind of setup is very quick and easy to put in place but is only suitable (recommended) for a development or functional test environment.
Caution
This setup does not support load balancing or failover and therefore is not recommended for an environment where performance and high-availability are required.
Setup scripts
This section contains a set of sample setup scripts that can be used to automate the installation of a single server setup.
Important
These setup scripts are provided under MIT license. They are intended to give an example on how the deployment and upgrade process can be automated and could serve as a starting point for building automation scripts for a unique deployment environment.
- msi-install-min.ps1 - Used to install a minimum set of ShareAspace MSI's on a single server setup.
- msi-uninstall-min.ps1 - Used to uninstall a minimum set of ShareAspace components.
- write-parameters.ps1 - Used to setup required server parameters for a minimal deployment on a single server setup.
- settings-fetch.ps1 - Used to backup all configuration files for a minimal deployment of ShareAspace.
- settings-deploy.ps1 - Used to deploy backed up configuration files for a minimal deployment of ShareAspace.
msi-install-min.ps1
function Install
{
param(
[Parameter(Position=0, Mandatory=1)][string]$msiName,
[Parameter(Position=1, Mandatory=0)][string]$log = ("install.log")
)
$msiFile = Get-ChildItem -Path "$pwd\$msiName-*.msi"
$parameters = "/qn /i ""$msiFile"" /Log ""$pwd\$log"""
$installStatement = [System.Diagnostics.Process]::Start( "msiexec", $parameters )
$installStatement.WaitForExit()
if ($installStatement.ExitCode -ne 0) {
throw ("Failed: " + $msiFile)
}
}
try{
install "DataExchange"
install "Host"
install "NovaWeb"
install "ReverseProxy"
install "DeveloperLogin"
Import-Module WebAdministration
Set-ItemProperty "IIS:\AppPools\DefaultAppPool" -Name "processModel.loadUserProfile" -Value "True"
}
catch {
}
msi-uninstall-min.ps1
Download msi-uninstall-min.ps1
function Uninstall
{
param(
[Parameter(Position=0, Mandatory=1)][string]$name
)
$apps = Get-WmiObject -Class Win32_Product -Filter ("IdentifyingNumber like '"+ $name+"'")
if($apps) {
foreach($app in $apps) {
$status = $app.Uninstall();
if($status.ReturnValue -ne 0) {
throw ("Error uninstalling: " + $name)
}
}
}
}
try{
#stop services
Stop-Service -displayname "ShareAspace Nova Host"
#copy settings
$installPath = "C:\Program Files\Eurostep\ShareAspace"
#uninstall MSI´s
uninstall "{DFF06291-C3DE-4A8F-A668-0A72C16A6C5D}" #DataExchange
uninstall "{EE1E700A-EE24-4336-8B1D-46CC6D2C0C24}" #Host
uninstall "{E9A3882D-4003-45A2-B5CA-61A54D79A155}" #ShareAspaceWeb
uninstall "{D87D8920-33C2-426B-9BB3-4F1608E0D97F}" #ReverseProxy
uninstall "{40C90679-A7C5-4A33-95BB-1A78FBD74315}" #DeveloperLogin
#cleanup deplpoyment folder
if(Test-Path $installPath) {
Remove-Item $installPath -Recurse -Force
}
}
catch {
exit
}
write-parameters.ps1
#---------------------------
# Parameters
#---------------------------
$dnsName = ""
#_HOST_ENDPOINT_ / _HOSTURI_
$hostEndPoint = "__HOST_ENDPOINT__"
#_CERTIFICATE_SUBJECT_
$certSubject = "__CERTIFICATE_SUBJECT__"
#_CERTIFICATE_STORE_
$certStore = "__CERTIFICATE_STORE__"
#_CERTIFICATE_LOCATION_
$certLocation = "__CERTIFICATE_LOCATION__"
#_ENABLERESTOREMODE_
$enableRestoreMode = "__ENABLERESTOREMODE__"
#_CHECKPOINTID_
$checkpointId = "__CHECKPOINTID__"
#_ENABLEAUTOMATICCHECKPOINTS_
$enableAutomaticCheckpoints = "__ENABLEAUTOMATICCHECKPOINTS__"
#_CREATECHECKPOINTONCOLLECTIONBOOTSTRAP_
$checkpointLogSizeThreshold = "__CREATECHECKPOINTONCOLLECTIONBOOTSTRAP__"
#_APIPATH_
$apiPath = "/api"
#_WEBCLIENTNAME_
$clientId = "NovaWeb"
#_WEBAPPLICATIONID_
$applicationId = "sasweb"
#_DEVELOPERLOGINAPISYMKEY_
$developerLoginAPISymKey = "__DEVELOPERLOGINAPISYMKEY__"
#_TASKAPISYMKEY_
$tasksAPISymKey = "__TASKAPISYMKEY__"
#_ADMINAPISYMKEY_
$adminAPISymKey = "__ADMINAPISYMKEY__"
#_SNAPSHOTAPISYMKEY_
$snapshotAPISymKey = "__SNAPSHOTAPISYMKEY__"
#_LICENSEAPISYMKEY_
$licenseAPISymKey = "__LICENSEAPISYMKEY__"
#_INVITEFROMADDRESS_
$inviteFromAddress = "__INVITEFROMADDRESS__"
#_IDENTITYSERVERURI_
$identityServerUri = ""
#---------------------------
#Derived paramerters
#---------------------------
#_WEBCLIENTAUTHURL_
$authorizationUrl = "$dnsName/DeveloperLogin/oauth/authorize"
#_TOKENENDPOINT_
$tokenUrl = "$dnsName/DeveloperLogin/oauth/token"
#_WEBCLIENTREDIRECTURI_
$redirectUri = "$dnsName/sasweb/Callback.html"
#_WEBCLIENTSIGNOUTURI_
$signOutUri = "$dnsName/DeveloperLogin/SignOut"
#_DEVELOPERLOGINBASEADDRESS_
$developerLoginBaseAddress = "$dnsName/DeveloperLogin"
#_WEBAPPLICATIONROOT_
$webApplicationRoot = "$dnsName/sasweb"
#_NOVAENDPOINTURI_
$novaEndpointUri = "$dnsName/api"
#---------------------------
# Target files
#---------------------------
$installPath = "C:\Program Files\Eurostep\ShareAspace"
$installConfigHost = $installPath + "\Host\";
$installConfigProxy = $installPath + "\ReverseProxy\";
$installConfigWeb = $installPath + "\Web\";
$installCofigDeveloperLogin = $installPath + "\DeveloperLogin\";
if(test-path "$installConfigHost\"){ $configFiles += @(Get-Item "$installConfigHost\bootstrap_host.json") }
if(test-path "$installConfigHost\"){ $configFiles += @(Get-Item "$installConfigHost\Eurostep.SAS.CollectionBootstrap.dll.config") }
if(test-path "$installConfigHost\"){ $configFiles += @(Get-Item "$installConfigHost\bootstrap_join.json") }
if(test-path "$installConfigHost\"){ $configFiles += @(Get-Item "$installConfigHost\bootstrap_collection.json") }
if(test-path "$installConfigHost\"){ $configFiles += @(Get-Item "$installConfigHost\appsettings.json") }
if(test-path "$installConfigHost\tasks\"){ $configFiles += @(Get-Item "$installConfigHost\tasks\tasks.json") }
if(test-path "$installConfigProxy\") { $configFiles += @(Get-Item "$installConfigProxy\appsettings.json") }
if(test-path "$installConfigWeb\") { $configFiles += @(Get-Item "$installConfigWeb\config.json") }
if(test-path "$installCofigDeveloperLogin\"){ $configFiles += @(Get-Item "$installCofigDeveloperLogin\appsettings.json") }
Foreach ($configFile in $configFiles)
{
Write-Log "Updating $configFile"
(Get-Content $configFile) | Foreach-Object {
$_ -replace '_HOST_ENDPOINT_', $hostEndPoint `
-replace '_HOSTURI_', $hostEndPoint `
-replace '_CERTIFICATE_SUBJECT_', $certSubject `
-replace '_CERTIFICATE_STORE_', $certStore `
-replace '_CERTIFICATE_LOCATION_', $certLocation `
-replace '_ENABLERESTOREMODE_', $enableRestoreMode `
-replace '_CHECKPOINTID_', $checkpointId `
-replace '_ENABLEAUTOMATICCHECKPOINTS_', $enableAutomaticCheckpoints `
-replace '_CHECKPOINTLOGSIZETHRESHOLD_', $checkpointLogSizeThreshold `
-replace '_CREATECHECKPOINTONCOLLECTIONBOOTSTRAP_', $createCheckpointOnCollectionBootstrap `
-replace '_APIPATH_', $apiPath `
-replace '_WEBCLIENTNAME_', $clientId `
-replace '_WEBCLIENTAUTHURL_', $authorizationUrl `
-replace '_TOKENENDPOINT_', $tokenUrl `
-replace '_WEBCLIENTREDIRECTURI_', $redirectUri `
-replace '_WEBCLIENTSIGNOUTURI_', $signOutUri `
-replace '_WEBAPPLICATIONID_', $applicationId `
-replace '_DEVELOPERLOGINAPISYMKEY_', $developerLoginAPISymKey `
-replace '_DEVELOPERLOGINBASEADDRESS_', $developerLoginBaseAddress `
-replace '_TASKAPISYMKEY_', $tasksAPISymKey `
-replace '_WEBAPPLICATIONROOT_', $webApplicationRoot `
-replace '_NOVAENDPOINTURI_', $novaEndpointUri `
-replace '_ADMINAPISYMKEY_', $adminAPISymKey `
-replace '_SNAPSHOTAPISYMKEY_', $snapshotAPISymKey `
-replace '_LICENSEAPISYMKEY_', $licenseAPISymKey `
-replace '_INVITEFROMADDRESS_', $inviteFromAddress `
-replace '_IDENTITYSERVERURI_', $identityServerUri
} | Set-Content -Encoding UTF8 $configFile
}
settings-fetch.ps1
try{
#copy settings
$installPath = "C:\Program Files\Eurostep\ShareAspace"
$installConfigHost = $installPath + "\Host\";
$installConfigHostTask = $installPath + "\Host\Tasks\";
$installConfigReverseProxy = $installPath + "\ReverseProxy\";
$installConfigWeb = $installPath + "\Web\";
$installConfigDeveloperLogin = $installPath + "\DeveloperLogin\";
$configFolder = "configurations\";
$configHost = $configFolder + "\Host\";
$configHostTasks = $configFolder +"\Tasks\";
$configReverseProxy = $configFolder +"\ReverseProxy\";
$configWeb = $configFolder +"\Web\";
$configDeveloperLogin = $configFolder +"\DeveloperLogin\";
if(Test-Path $configFolder) {
Remove-Item $configFolder -Recurse -Force
}
New-Item $configFolder -ItemType directory -Force
New-Item $configHost -ItemType directory -Force
New-Item $configHostTasks -ItemType directory -Force
New-Item $configReverseProxy -ItemType directory -Force
New-Item $configWeb -ItemType directory -Force
New-Item $configDeveloperLogin -ItemType directory -Force
copy-item ("$installConfigHost\bootstrap_collection.json") ($configHost) -force
copy-item ("$installConfigHost\bootstrap_host.json") ($configHost) -force
copy-item ("$installConfigHost\Eurostep.SAS.ServiceHost.dll.config") ($configHost) -force
copy-item ("$installConfigHost\appsettings.json") ($configHost) -force
copy-item ("$installConfigHost\Eurostep.SAS.CollectionBootstrap.dll.config") ($configHost) -force
copy-item ("$installConfigHostTask\tasks.json") ($configHostTasks) -force
copy-item ("$installConfigReverseProxy\appsettings.json") ($configReverseProxy) -force
copy-item ("$installConfigWeb\config.json") ($configWeb) -force
copy-item ("$installConfigDeveloperLogin\appsettings.json") ($configDeveloperLogin) -force
}
catch {
exit
}
settings-deploy.ps1
try {
$installPath = "C:\Program Files\Eurostep\ShareAspace"
$installConfigHost = $installPath + "\Host\";
$installConfigHostTask = $installPath + "\Host\Tasks\";
$installConfigReverseProxy = $installPath + "\ReverseProxy\";
$installConfigWeb = $installPath + "\Web\";
$installConfigDeveloperLogin = $installPath + "\DeveloperLogin\"
$configFolder = "configurations\";
$configHost = $configFolder + "\Host\";
$configHostTasks = $configFolder +"\Tasks\";
$configReverseProxy = $configFolder +"\ReverseProxy\";
$configWeb = $configFolder +"\Web\";
$configDeveloperLogin = $configFolder +"\DeveloperLogin\";
#redeploy configurations
copy-item ("$configHost\bootstrap_collection.json") ($installConfigHost) -force
copy-item ("$configHost\bootstrap_host.json") ($installConfigHost) -force
copy-item ("$configHost\Eurostep.SAS.ServiceHost.dll.config") ($installConfigHost) -force
copy-item ("$configHost\appsettings.json") ($installConfigHost) -force
copy-item ("$configHost\Eurostep.SAS.CollectionBootstrap.dll.config") ($installConfigHost) -force
copy-item ("$configHostTasks\tasks.json") ($installConfigHostTask) -force
copy-item ("$configReverseProxy\appsettings.json") ($installConfigReverseProxy) -force
copy-item ("$configWeb\config.json") ($installConfigWeb) -force
copy-item ("$configWeb\Web.config") ($installConfigWeb) -force
copy-item ("$configDeveloperLogin\appsettings.json") ($installConfigDeveloperLogin) -force
}
catch {
exit
}