Pipelines/Steps/Install/OnPrem/Sitecore/XP/Scaled/9.0/Install-Collection.ps1
$ErrorActionPreference = "Stop" $prefix = $SAFConfiguration.prefix $siteName = $SAFConfiguration.xConnect.collectionHostName $hostNames = @($siteName) $license = $SAFConfiguration.license $sqlServer = $SAFConfiguration.sql.serverName $sqlUser = $SAFConfiguration.sql.adminUsername $sqlAdminPassword = $SAFConfiguration.sql.adminPassword $sqlSitecorePassword = $SAFConfiguration.sql.sitecorePassword $installDir = $SAFConfiguration.xConnect.installDir $environment = $SAFConfiguration.xConnect.environment $logLevel = $SAFConfiguration.xConnect.logLevel $package = Get-ChildItem -Path "$SAFInstallPackageDir\*" -Include *collection.scwdp.zip* $sifConfiguration = GetSIFConfiguration -Name "xconnect-xp1-collection.json" -ContextPath "$PSScriptRoot" $clientCert = BuildSitecoreClientCertName -Prefix $prefix $serverCert = BuildSitecoreServerCertName -Prefix $prefix Write-Output "Install xConnect Collection started..." $dbs = @("$($prefix)_MarketingAutomation", "$($prefix)_Messaging", "$($prefix)_Processing.Pools", "$($prefix)_Xdb.Collection.Shard0", "$($prefix)_Xdb.Collection.Shard1", "$($prefix)_Xdb.Collection.ShardMapManager") DeleteDatabases -SqlServer $sqlServer -Databases $dbs -Username $sqlUser -Password $sqlAdminPassword DeleteLogin -SqlServer $sqlServer -SqlLogin "$($prefix)_collectionuser" -Username $sqlUser -Password $sqlAdminPassword $sitecoreParams = @{ Path = $sifConfiguration Package = $package.FullName LicenseFile = $license Sitename = $siteName XConnectCert = $clientCert SqlDbPrefix = $prefix SqlAdminUser = $sqlUser SqlAdminPassword = $sqlAdminPassword SqlCollectionUser = "$($prefix)_collectionuser" SqlCollectionPassword = $sqlSitecorePassword SqlProcessingPoolsUser = "$($prefix)_processingpoolsuser" SqlProcessingPoolsPassword = $sqlSitecorePassword SqlMarketingAutomationUser = "$($prefix)_marketingautomationuser" SqlMarketingAutomationPassword = $sqlSitecorePassword SqlMessagingUser = "$($prefix)_messaginguser" SqlMessagingPassword = $sqlSitecorePassword SqlServer = $sqlServer XConnectEnvironment = $environment XConnectLogLevel = $logLevel SSLCert = $serverCert InstallDirectory = $installDir } Install-SitecoreConfiguration @sitecoreParams AddWebBindings -SiteName $siteName -HostNames $hostNames AddWebBindings -SiteName $siteName -HostNames $hostNames -SSLCert $serverCert Write-Output "Install xConnect Collection done." |