
* Resolve issues with SQLCluster Ic2f5f1763472f13aeab63ef8919a437837d76b2f * Resolve issue with SQLCluster clusterIp property I2103edf9702b51472c32a3e5e789421fa1167c13 * Resolve issue with SQLServer Fixed bug #1245835 Id1adb038926f244ffbed6339a3aa1eb8387f29a5 * Linux+Apache support added, small fixes done I15db406d75e6e47ac2a7ffeb1e84da4a814d49f3 * Fixed linux workflow,templates and shell scripts Ie5ab1bc824dba07771d94686af63f939ab05d5ca * Remove send-command from Demo.xml I48a2ab0995c96c255c9dc95d84937427ae0b6194 * Changed config path and xinet dist based exec Ic03a540526e5807a43d07b70f901ce04dc5615f9 * Fixed FW saving rules on reboot for CentOS Iba4dbd4f5924f16dc6f5b547663157da189793c3 Change-Id: Iba4dbd4f5924f16dc6f5b547663157da189793c3
85 lines
1.9 KiB
PowerShell
85 lines
1.9 KiB
PowerShell
|
|
trap {
|
|
&$TrapHandler
|
|
}
|
|
|
|
|
|
|
|
Function ConvertTo-Boolean {
|
|
param (
|
|
$InputObject,
|
|
[Boolean] $Default = $false
|
|
)
|
|
try {
|
|
[System.Convert]::ToBoolean($InputObject)
|
|
}
|
|
catch {
|
|
$Default
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Function Show-Environment {
|
|
foreach ($item in (Get-ChildItem Env:)) {
|
|
Write-Log ("'{0}' --> '{1}'" -f $item.Name, $item.Value)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Function Install-SqlServer {
|
|
param (
|
|
[String] $SetupRoot = '',
|
|
[String] $SAPassword = '',
|
|
[String] $MuranoFileShare = '',
|
|
[Switch] $MixedModeAuth = $false,
|
|
[Switch] $UpdateEnabled = $false
|
|
)
|
|
begin {
|
|
Show-InvocationInfo $MyInvocation
|
|
}
|
|
end {
|
|
Show-InvocationInfo $MyInvocation -End
|
|
}
|
|
process {
|
|
trap {
|
|
&$TrapHandler
|
|
}
|
|
|
|
if ($SetupRoot -eq '') {
|
|
if ($MuranoFileShare -eq '') {
|
|
$MuranoFileShare = [Environment]::GetEnvironmentVariable('MuranoFileShare')
|
|
if ($MuranoFileShare -eq '') {
|
|
throw("Unable to find MuranoFileShare path.")
|
|
}
|
|
}
|
|
|
|
$SetupRoot = [IO.Path]::Combine($MuranoFileShare, 'Prerequisites\SQL Server\2012')
|
|
}
|
|
|
|
#$MixedModeAuthSwitch = ConvertTo-Boolean $MixedModeAuth
|
|
|
|
$ExtraOptions = @{}
|
|
|
|
if ($MixedModeAuth -eq $true) {
|
|
$ExtraOptions += @{'SECURITYMODE' = 'SQL'}
|
|
if ($SAPassword -eq '') {
|
|
throw("SAPassword must be set when MixedModeAuth is requisted!")
|
|
}
|
|
}
|
|
|
|
if ($SAPassword -ne '') {
|
|
$ExtraOptions += @{'SAPWD' = $SAPassword}
|
|
}
|
|
|
|
if (-not $UpdateEnabled) {
|
|
$ExtraOptions += @{'UpdateEnabled' = $false}
|
|
}
|
|
|
|
Show-Environment
|
|
|
|
New-SqlServer -SetupRoot $SetupRoot -ExtraOptions $ExtraOptions
|
|
}
|
|
}
|