Guest User

Untitled

a guest
Jul 10th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. #Requires -Version 3
  2. param(
  3. [string]$SitePrefix = "Sitecore",
  4. [string]$ScInstallDirectory = "C:inetpubwwwroot",
  5. [string]$SiteHostHeaderName = "SitecoreCm.staging.com",
  6. [string]$SqlServer = "mssql1.staging.comStaging21",
  7. [string]$SqlDbPrefix = "Sitecore",
  8. [string]$CommerceEngineCertificatePath = "..xcommerce.cer",
  9. [string]$CommerceSearchProvider = "SOLR",
  10. [string]$SolrUrl = "https://01sitecore1.staging.com:8983/solr",
  11. [string]$SolrRoot = "c:solrsolr-6.6.2",
  12. [string]$SolrService = "solr-6.6.2"
  13. )
  14.  
  15. $global:DEPLOYMENT_DIRECTORY=Split-Path $MyInvocation.MyCommand.Path
  16. $modulesPath=( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "Modules" )
  17. if ($env:PSModulePath -notlike "*$modulesPath*")
  18. {
  19. $p = $env:PSModulePath + ";" + $modulesPath
  20. [Environment]::SetEnvironmentVariable("PSModulePath",$p)
  21. }
  22.  
  23.  
  24. $params = @{
  25. Path = Resolve-Path '.ConfigurationCommerceMaster_SingleServer.json'
  26. SiteName = $SiteHostHeaderName
  27. SiteHostHeaderName = $SiteHostHeaderName
  28. InstallDir = "$($ScInstallDirectory)$($SiteHostHeaderName)"
  29. XConnectInstallDir = "$($ScInstallDirectory)$($SitePrefix).xconnect.local"
  30. CertificateName = "8C41C6BE5471128081E32BE5B0440D8EBEC42B1"
  31. CommerceServicesDbServer = $SqlServer #OR "SQLServerNameSQLInstanceName"
  32. CommerceServicesDbName = "SitecoreCommerce9_SharedEnvironments"
  33. CommerceServicesGlobalDbName = "SitecoreCommerce9_Global"
  34. SitecoreDbServer = $SqlServer #OR "SQLServerNameSQLInstanceName"
  35. SitecoreCoreDbName = "$($SqlDbPrefix)_Core"
  36. SitecoreUsername = "sitecoreadmin"
  37. SitecoreUserPassword = "whose-alley-dingo-born-lip"
  38. CommerceSearchProvider = $CommerceSearchProvider
  39. SolrUrl = "$($SolrUrl)"
  40. SolrRoot = "$($SolrRoot)"
  41. SolrService = "$($SolrService)"
  42. SolrSchemas = ( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "SolrSchemas" )
  43. SearchIndexPrefix = ""
  44. AzureSearchServiceName = ""
  45. AzureSearchAdminKey = ""
  46. AzureSearchQueryKey = ""
  47. CommerceEngineDacPac = Resolve-Path -Path "..Sitecore.Commerce.Engine.SDK.*Sitecore.Commerce.Engine.DB.dacpac"
  48. CommerceOpsServicesPort = "5015"
  49. CommerceShopsServicesPort = "5005"
  50. CommerceAuthoringServicesPort = "5000"
  51. CommerceMinionsServicesPort = "5010"
  52. SitecoreCommerceEngineZipPath = Resolve-Path -Path "..Sitecore.Commerce.Engine.2*.zip"
  53. SitecoreBizFxServicesContentPath = Resolve-Path -Path "..Sitecore.BizFX.1.1.9"
  54. SitecoreIdentityServerZipPath = Resolve-Path -Path "..Sitecore.IdentityServer.1.*.zip"
  55. CommerceEngineCertificatePath = Resolve-Path -Path "$($CommerceEngineCertificatePath)"
  56. SiteUtilitiesSrc = ( Join-Path -Path $DEPLOYMENT_DIRECTORY -ChildPath "SiteUtilityPages" )
  57. HabitatImagesModuleFullPath = Resolve-Path -Path "..Sitecore.Commerce.Habitat.Images-*.zip"
  58. AdvImagesModuleFullPath = Resolve-Path -Path "..Adventure Works Images.zip"
  59. CommerceConnectModuleFullPath = Resolve-Path -Path "..Sitecore Commerce Connect*.zip"
  60. CEConnectPackageFullPath = Resolve-Path -Path "..Sitecore.Commerce.Engine.Connect*.update"
  61. PowerShellExtensionsModuleFullPath = Resolve-Path -Path "..Sitecore PowerShell Extensions*.zip"
  62. SXAModuleFullPath = Resolve-Path -Path "..Sitecore Experience Accelerator*.zip"
  63. SXACommerceModuleFullPath = Resolve-Path -Path "..Sitecore Commerce Experience Accelerator 1.*.zip"
  64. SXAStorefrontModuleFullPath = Resolve-Path -Path "..Sitecore Commerce Experience Accelerator Storefront 1.*.zip"
  65. SXAStorefrontThemeModuleFullPath = Resolve-Path -Path "..Sitecore Commerce Experience Accelerator Storefront Themes*.zip"
  66. SXAStorefrontCatalogModuleFullPath = Resolve-Path -Path "..Sitecore Commerce Experience Accelerator Habitat Catalog*.zip"
  67. MergeToolFullPath = Resolve-Path -Path "..Microsoft.Web.XmlTransform.dll"
  68. UserAccount = @{
  69. Domain = "mydomain"
  70. UserName = '21-sitecore'
  71. Password = 'thepassword'
  72. }
  73. BraintreeAccount = @{
  74. MerchantId = ''
  75. PublicKey = ''
  76. PrivateKey = ''
  77. }
  78. SitecoreIdentityServerName = "SitecoreIdentityServer"
  79. }
  80.  
  81. if ($CommerceSearchProvider -eq "SOLR") {
  82. Install-SitecoreConfiguration @params
  83. }
  84. elseif ($CommerceSearchProvider -eq "AZURE"){
  85. Install-SitecoreConfiguration @params -Skip InstallSolrCores
  86. }
  87.  
  88. "UtilitiesBaseUrl": "[concat('https://', concat(parameter('SiteHostHeaderName'), '/SiteUtilityPages'))]",
  89.  
  90. <rule name="Forbidden" enabled="true" stopProcessing="true">
  91. <match url="(.*)" />
  92. <conditions>
  93. <add input="{HTTPS}" pattern="^OFF$" />
  94. <add input="{HTTP_METHOD}" pattern="GET" />
  95. </conditions>
  96. <action type="CustomResponse" statusCode="403" subStatusCode="0" />
  97. </rule>
  98.  
  99. <event name="packageinstall:items:ended">
  100. <handler type="Sitecore.ContentSearch.Events.PackagingEventHandler, Sitecore.ContentSearch" method="OnPackageInstallItemsEndHandler" />
  101. </event>
Add Comment
Please, Sign In to add comment