├── XC
└── install
│ ├── logs
│ └── readme.txt
│ ├── assets
│ ├── Commerce
│ │ └── readme.txt
│ ├── Downloads
│ │ └── readme.txt
│ ├── Resources
│ │ ├── Configuration
│ │ │ ├── Commerce
│ │ │ │ ├── .gitignore
│ │ │ │ ├── CommerceEngine
│ │ │ │ │ └── CommerceEngine.Post.json
│ │ │ │ ├── Common
│ │ │ │ │ ├── Common.RebuildDescendants.json
│ │ │ │ │ ├── Common.RemoveSiteUtilityFolder.json
│ │ │ │ │ ├── Common.PublishToWeb.json
│ │ │ │ │ ├── Common.EnsurePath.json
│ │ │ │ │ ├── Common.RebuildIndexes.json
│ │ │ │ │ └── Common.InstallWdpModule.json
│ │ │ │ ├── CEConnect
│ │ │ │ │ ├── CEConnect.EnableDataProvider.json
│ │ │ │ │ ├── CEConnect.EnableIndexing.json
│ │ │ │ │ ├── CEConnect.Post.json
│ │ │ │ │ ├── CEConnect.GenerateCatalogTemplates.json
│ │ │ │ │ └── CEConnect.InitializeCommerce.json
│ │ │ │ ├── SXAStorefront
│ │ │ │ │ ├── _SXAStorefront.Post.Installation.json
│ │ │ │ │ ├── SXAStorefront.EnableSearch.json
│ │ │ │ │ ├── SXAStorefront.CreateDefaultTenantAndSite.json
│ │ │ │ │ ├── SXAStorefront.Storefront.json
│ │ │ │ │ └── SXAStorefront.Preconfigure.json
│ │ │ │ ├── Connect
│ │ │ │ │ ├── Connect.MarketingAutomationPost.json
│ │ │ │ │ └── Connect.CopyModels.json
│ │ │ │ └── IdentityServer
│ │ │ │ │ └── IdentityServer.Config.json
│ │ │ ├── SitecoreUtilities
│ │ │ │ ├── RebuildIndexes.json
│ │ │ │ ├── InstallPackage.json
│ │ │ │ ├── PopulateIndexSchema.json
│ │ │ │ └── InstallModule.json
│ │ │ ├── merge-webconfig.json
│ │ │ ├── images.json
│ │ │ └── HabitatHome
│ │ │ │ └── set-engine-hostname.json
│ │ ├── start-site.json
│ │ ├── stop-site.json
│ │ └── Sitecore.Cloud.Integration.Bootload.InstallJob.exe.config
│ ├── JsonMerge.dll
│ └── Newtonsoft.Json.dll
│ ├── Add-BindingsToCommerceSites.ps1
│ ├── set-installation-overrides.ps1.example
│ ├── install-settings.json
│ ├── set-installation-defaults.ps1
│ └── Set-CommerceEngineHostName.ps1
├── XP
└── install
│ ├── assets
│ ├── readme.txt
│ └── configuration
│ │ ├── module-installation
│ │ └── .gitkeep
│ │ ├── xConnect
│ │ └── xconnect-models.json
│ │ ├── XP0
│ │ ├── createcert.json
│ │ └── xconnect-solr.json
│ │ └── XP0-ExistingSSL
│ │ ├── xconnect-solr.json
│ │ └── createcert.json
│ ├── logs
│ └── readme.txt
│ ├── GenerateSolrCertificate.ps1
│ ├── Certificates
│ ├── ClientCertificate.psm1
│ ├── sitecore-ssl.json
│ └── solr-ssl.ps1
│ ├── install-solr.ps1
│ ├── Add-SSLSiteBindingWithCertificate.ps1
│ ├── Uninstall
│ └── Uninstall.psm1
│ ├── install-settings.json
│ └── set-installation-overrides.ps1.example
├── SecurityHardening
├── assets
│ ├── .gitignore
│ ├── configs
│ │ └── Sitecore.Demo.Shared.Security.DisableSqlServerAccessFromXslt.config
│ ├── transforms
│ │ └── web.config.xdt
│ └── ioactions.xml
├── configuration
│ ├── disable-anonymous-access.json
│ ├── apply-ioactions.json
│ ├── deploy-upload-filter.json
│ └── harden-security.json
└── harden-security.ps1
├── .githooks
├── pre-commit
└── pre-commit.ps1
├── docs
├── media
│ └── sxa-zip-items-screenshot.png
├── xc
│ └── readme.md
├── warmup
│ └── readme.md
├── xp
│ ├── solr.md
│ ├── installing-sitecore-xp.md
│ ├── readme.md
│ └── preparing-installation.md
├── prerequisites
│ └── readme.md
└── readme.md
├── Prerequisites
├── Install-SIF.ps1
├── Install-Chocolatey.ps1
├── Install-SitecorePrerequisites.ps1
├── choco-packages.config
├── Install-All.ps1
├── Install-SitecoreGallery.ps1
├── Install-Module.ps1
├── Install-IIS.ps1
└── Install-ChocoPackages.ps1
├── Shared
├── assets
│ ├── modules
│ │ ├── SecurityHardening
│ │ │ ├── SecurityHardening.psd1
│ │ │ └── SecurityHardening.psm1
│ │ ├── Set-ProgressPreference.ps1
│ │ └── SharedInstallationUtilities
│ │ │ └── SharedInstallationUtilities.psd1
│ ├── configuration
│ │ ├── sxa
│ │ │ ├── sxa-solr-config.json
│ │ │ ├── configure-search-indexes.json
│ │ │ └── sxa-installation-poststeps.json
│ │ ├── manage-service.json
│ │ ├── warmup-instance.json
│ │ ├── templates
│ │ │ └── module-install-template.json
│ │ ├── download-assets.json
│ │ ├── install-sitecoreazuretoolkit.json
│ │ ├── enable-contained-databases.json
│ │ ├── bootloader.json
│ │ ├── deploy-xconnect-models.json
│ │ ├── remove-databaseuser.json
│ │ ├── kill-database-connections.json
│ │ ├── add-database-user.json
│ │ ├── add-new-binding-and-certificate.json
│ │ ├── install-module.json
│ │ └── download-and-install-module.json
│ └── Sitecore.Cloud.Integration.Bootload.InstallJob.exe.config
└── Database
│ ├── killdatabaseconnections.sql
│ ├── adddatabaseuser.sql
│ └── addcoredatabaseuser.sql
├── Azure
├── virtual-machine-operator-role.json
├── config.json
├── CreateNewSnapshot.ps1
└── CreateVHDFromSnapshot.ps1
├── README.md
├── .gitignore
└── Warmup
└── warmup-config.json
/XC/install/logs/readme.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XP/install/assets/readme.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XP/install/logs/readme.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XC/install/assets/Commerce/readme.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XC/install/assets/Downloads/readme.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SecurityHardening/assets/.gitignore:
--------------------------------------------------------------------------------
1 | work
--------------------------------------------------------------------------------
/XP/install/assets/configuration/module-installation/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/.gitignore:
--------------------------------------------------------------------------------
1 | *.json
2 | !Master_SingleServer.json
--------------------------------------------------------------------------------
/XC/install/assets/JsonMerge.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/Sitecore.HabitatHome.Utilities/HEAD/XC/install/assets/JsonMerge.dll
--------------------------------------------------------------------------------
/.githooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!C:/Program\ Files/Git/usr/bin/sh.exe
2 | exec powershell.exe -NoProfile -ExecutionPolicy ByPass -File ".\.githooks\pre-commit.ps1"
--------------------------------------------------------------------------------
/XC/install/assets/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/Sitecore.HabitatHome.Utilities/HEAD/XC/install/assets/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/docs/media/sxa-zip-items-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/Sitecore.HabitatHome.Utilities/HEAD/docs/media/sxa-zip-items-screenshot.png
--------------------------------------------------------------------------------
/Prerequisites/Install-SIF.ps1:
--------------------------------------------------------------------------------
1 | #Sitecore Install Framework dependencies
2 | Import-Module WebAdministration
3 |
4 | .\Install-Module.ps1 -moduleName "SitecoreInstallFramework" -version 2.2.0
5 |
--------------------------------------------------------------------------------
/Shared/assets/modules/SecurityHardening/SecurityHardening.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/Sitecore.HabitatHome.Utilities/HEAD/Shared/assets/modules/SecurityHardening/SecurityHardening.psd1
--------------------------------------------------------------------------------
/Prerequisites/Install-Chocolatey.ps1:
--------------------------------------------------------------------------------
1 | Set-ExecutionPolicy Bypass -Scope Process -Force;
2 | iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
3 | choco upgrade chocolatey
4 |
--------------------------------------------------------------------------------
/Prerequisites/Install-SitecorePrerequisites.ps1:
--------------------------------------------------------------------------------
1 | $Global:ProgressPreference = 'SilentlyContinue'
2 | Install-SitecoreConfiguration -Path (Resolve-Path .\prerequisites.json)
3 | $Global:ProgressPreference = 'Continue'
--------------------------------------------------------------------------------
/Shared/assets/modules/Set-ProgressPreference.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $ProgressPreference
3 | )
4 | Write-Verbose ("Setting Progress Preference to {0}" -f $ProgressPreference)
5 | $Global:ProgressPreference = $ProgressPreference
--------------------------------------------------------------------------------
/Shared/assets/modules/SharedInstallationUtilities/SharedInstallationUtilities.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/Sitecore.HabitatHome.Utilities/HEAD/Shared/assets/modules/SharedInstallationUtilities/SharedInstallationUtilities.psd1
--------------------------------------------------------------------------------
/Shared/Database/killdatabaseconnections.sql:
--------------------------------------------------------------------------------
1 | USE [master];
2 |
3 | DECLARE @kill varchar(8000) = '';
4 | SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), session_id) + ';'
5 | FROM sys.dm_exec_sessions
6 | WHERE database_id = db_id('$(DatabasePrefix)_$(DatabaseSuffix)')
7 |
8 | EXEC(@kill);
--------------------------------------------------------------------------------
/XP/install/GenerateSolrCertificate.ps1:
--------------------------------------------------------------------------------
1 | . $PSScriptRoot\..\settings.ps1
2 |
3 | $SolrKeyFile = "$SolrRoot\server\etc\solr-ssl.keystore.jks"
4 | if ((Test-Path($SolrKeyFile))) {
5 | $SolrUri = [System.Uri]$SolrUrl
6 |
7 | . $PSScriptRoot\Certificates\solr-ssl.ps1 -KeystoreFile "$SolrKeyFile" -SolrDomain $SolrUri.Host -Clobber
8 | }
9 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/SitecoreUtilities/RebuildIndexes.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "BaseUrl": { "Type": "string" }
4 | },
5 | "Modules": [ "SitecoreUtilityTasks" ],
6 | "Tasks": {
7 | "RebuildIndexes": {
8 | "Type": "RebuildIndexes",
9 | "Params": {
10 | "BaseUrl": "[parameter('BaseUrl')]"
11 | }
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CommerceEngine/CommerceEngine.Post.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | },
4 | "Settings": {
5 | "AutoRegisterExtensions": true
6 | },
7 | "Modules": [
8 | "DeployCommerceContent"
9 | ],
10 | "Variables": {
11 | },
12 | "Tasks": {
13 | "CreatePerformanceCounters": {
14 | "Type": "CreatePerformanceCounters"
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Shared/Database/adddatabaseuser.sql:
--------------------------------------------------------------------------------
1 |
2 | USE [master]
3 | GO
4 | ALTER DATABASE [$(DatabasePrefix)_$(DatabaseSuffix)] SET CONTAINMENT = PARTIAL
5 | GO
6 |
7 | USE [$(DatabasePrefix)_$(DatabaseSuffix)]
8 | create user [$(UserName)] WITH PASSWORD = '$(Password)', DEFAULT_SCHEMA=[dbo]
9 |
10 | GO
11 | EXEC sp_addrolemember 'db_datareader', [$(UserName)]
12 | EXEC sp_addrolemember 'db_datawriter', [$(UserName)]
13 | GO
14 | GRANT EXECUTE to [$(UserName)]
--------------------------------------------------------------------------------
/docs/xc/readme.md:
--------------------------------------------------------------------------------
1 | # Installing Sitecore Experience Commerce (XC)
2 |
3 | Sitecore Ecperience Commerce 9.2 is not yet available. The latest HabitatHome demo with commerce support is version 9.1.1.
4 |
5 | Instructions for installing the latest version of Commerce can be found in the [release/9.1.1 branch](https://github.com/Sitecore/Sitecore.HabitatHome.Utilities/tree/release/9.1.1/XC/install).
6 |
7 | ## Next Steps
8 |
9 | [Return to main docs index](../readme.md)
10 |
--------------------------------------------------------------------------------
/Prerequisites/choco-packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/SecurityHardening/assets/configs/Sitecore.Demo.Shared.Security.DisableSqlServerAccessFromXslt.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.RebuildDescendants.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "BaseUrl": {
4 | "Type": "string",
5 | "Description": "The utility pages base url.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Variables": {
10 | "Base.Url": "[parameter('BaseUrl')]",
11 | "RebuildDescendants.Uri": "[concat(variable('Base.Url'), '/RebuildDescendants.aspx')]"
12 | },
13 | "Tasks": {
14 | "RebuildDescendants": {
15 | "Type": "WebRequest",
16 | "Params": {
17 | "Uri": "[variable('RebuildDescendants.Uri')]",
18 | "RequestTimeout": "60000"
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Azure/virtual-machine-operator-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Virtual Machine Operator",
3 | "IsCustom": true,
4 | "Description": "Can deallocate, start and restart virtual machines.",
5 | "Actions": [
6 | "Microsoft.Compute/*/read",
7 | "Microsoft.Compute/virtualMachines/start/action",
8 | "Microsoft.Compute/virtualMachines/restart/action",
9 | "Microsoft.Compute/virtualMachines/deallocate/action",
10 | "Microsoft.Network/networkInterfaces/*/read"
11 | ],
12 | "NotActions": [
13 |
14 |
15 | ],
16 | "AssignableScopes": [
17 | "/subscriptions/00000000-0000-0000-0000-0000000000000"
18 | ]
19 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CEConnect/CEConnect.EnableDataProvider.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ConfigDir": {
4 | "Type": "string",
5 | "Description": "Configuration directory",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Modules": [
10 | "SitecoreUtilityTasks"
11 | ],
12 | "Variables": {
13 | "Config.Dir": "[parameter('ConfigDir')]"
14 | },
15 | "Tasks": {
16 | "EnableConfigFiles": {
17 | "Type": "EnableConfigFiles",
18 | "Params": {
19 | "ConfigDir": "[variable('Config.Dir')]",
20 | "ConfigFileList": [
21 | "Sitecore.Commerce.Engine.DataProvider.config"
22 | ]
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.RemoveSiteUtilityFolder.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "InstallDir": {
4 | "Type": "string",
5 | "Description": "Sitecore website path.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Register": {
10 | "Tasks": {
11 | "RemoveItem": "Remove-Item"
12 | }
13 | },
14 | "Tasks": {
15 | "RemoveSiteUtilityFolder": {
16 | "Description": "Removes Site Utilities content.",
17 | "Type": "RemoveItem",
18 | "Params": {
19 | "Path": "[joinpath(parameter('InstallDir'), '\\SiteUtilityPages')]",
20 | "Recurse": true,
21 | "ErrorAction": "SilentlyContinue"
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/sxa/sxa-solr-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "add-searchComponent": {
3 | "name": "suggest",
4 | "class": "solr.SuggestComponent",
5 | "defaults": {
6 | "field": "name",
7 | "name": "default",
8 | "suggestAnalyzerFieldType": "string"
9 | },
10 | "suggester": {
11 | "field": "sxacontent_txm",
12 | "name": "sxaSuggester",
13 | "suggestAnalyzerFieldType": "text_en"
14 | }
15 | },
16 | "add-requesthandler": {
17 | "name": "/suggest",
18 | "class": "solr.SearchHandler",
19 | "defaults": {
20 | "components": "suggest",
21 | "suggest.count": "10",
22 | "suggest.dictionary": "sxaSuggester",
23 | "suggest": "true"
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/SecurityHardening/configuration/disable-anonymous-access.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "Name of IIS Site"
7 | },
8 | "Folders": {
9 | "Type": "string[]",
10 | "DefaultValue": "",
11 | "Description": "List of folders to deny anonymous access to"
12 | }
13 | },
14 | "Tasks": {
15 | "DisableAnonymousAccessToFolders": {
16 | "Type": "DisableAnonymousAccess",
17 | "Params": {
18 | "SiteName": "[parameter('SiteName')]",
19 | "Folders": "[parameter('Folders')]"
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Prerequisites/Install-All.ps1:
--------------------------------------------------------------------------------
1 | function Install-Prerequisites {
2 | $tasks=$(
3 | '.\Install-Chocolatey.ps1',
4 | '.\Install-IIS.ps1',
5 | '.\Install-ChocoPackages.ps1',
6 | '.\Install-SitecoreGallery.ps1',
7 | '.\Install-SIF.ps1',
8 | '.\Install-SitecorePrerequisites.ps1'
9 | )
10 | foreach($task in $tasks){
11 | Write-Host "=========================[START]$task=============================" -foreground Green
12 | Invoke-Expression $task
13 | Write-Host "=========================[DONE]$task==============================" -foreground Green
14 | }
15 | }
16 |
17 | $Global:ProgressPreference = 'SilentlyContinue'
18 | Install-Prerequisites
19 | $Global:ProgressPreference = 'Continue'
--------------------------------------------------------------------------------
/Prerequisites/Install-SitecoreGallery.ps1:
--------------------------------------------------------------------------------
1 | param (
2 | [string]$nugetServer="https://sitecore.myget.org/F/sc-powershell/api/v2/"
3 | )
4 |
5 | $repositoryName = "SitecoreGallery"
6 | $gallery = Get-PSRepository | Where-Object { $_.Name -eq $repositoryName }
7 |
8 | if (!$gallery) {
9 | Register-PSRepository -Name $repositoryName -SourceLocation $nugetServer -PublishLocation $nugetServer -InstallationPolicy Trusted
10 | }
11 | elseif (($gallery.SourceLocation -ne $nugetServer) -or ($gallery.PublishLocation -ne $nugetServer) -or !$gallery.Trusted) {
12 | Set-PSRepository -Name $repositoryName -SourceLocation $nugetServer -PublishLocation $nugetServer -InstallationPolicy Trusted
13 | }
14 |
15 | Get-PSRepository -Name $repositoryName | Format-List * -Force
16 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/start-site.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "DefaultValue": "Sitecore",
6 | "Description": "The name of the site to be deployed."
7 | }
8 | },
9 | "Tasks": {
10 | "StartAppPool": {
11 | "Type": "ManageAppPool",
12 | "Params": {
13 | "Name": "[parameter('SiteName')]",
14 | "Action": "Start"
15 | }
16 | },
17 | "StartWebsite": {
18 | "Type": "ManageWebsite",
19 | "Params": {
20 | "Name": "[parameter('SiteName')]",
21 | "Action": "Start"
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/stop-site.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "DefaultValue": "Sitecore",
6 | "Description": "The name of the site to be deployed."
7 | }
8 | },
9 | "Tasks": {
10 | "StopWebsite": {
11 | "Type": "ManageWebsite",
12 | "Params": {
13 | "Name": "[parameter('SiteName')]",
14 | "Action": "Stop"
15 | }
16 | },
17 | "StopAppPool": {
18 | "Type": "ManageAppPool",
19 | "Params": {
20 | "Name": "[parameter('SiteName')]",
21 | "Action": "Stop"
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/manage-service.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ServiceName": {
4 | "Type": "string",
5 | "DefaultValue":"",
6 | "Description": "Name of SQL Server"
7 | },
8 | "Status":{
9 | "Type":"string",
10 | "DefaultValue":""
11 | }
12 | },
13 | "Variables":{
14 | "Service.Name":"[parameter('ServiceName')]",
15 | "Service.Status":"[parameter('Service.Status')]"
16 | },
17 | "Tasks": {
18 | "ManageService": {
19 | "Type": "ManageService",
20 | "Params": {
21 | "Name": "[variable('Service.Name')]",
22 | "Status": "[variable('Service.Status')]"
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CEConnect/CEConnect.EnableIndexing.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ConfigDir": {
4 | "Type": "string",
5 | "Description": "Configuration directory",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Modules": [
10 | "SitecoreUtilityTasks"
11 | ],
12 | "Variables": {
13 | "Config.Dir": "[parameter('ConfigDir')]"
14 | },
15 | "Tasks": {
16 | "EnableConfigFiles": {
17 | "Type": "EnableConfigFiles",
18 | "Params": {
19 | "ConfigDir": "[variable('Config.Dir')]",
20 | "ConfigFileList": [
21 | "Sitecore.Commerce.Engine.Connectors.Index.Common.config",
22 | "Sitecore.Commerce.Engine.Connectors.Index.Solr.config"
23 | ]
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/.githooks/pre-commit.ps1:
--------------------------------------------------------------------------------
1 |
2 | $local_branch = git rev-parse --abbrev-ref HEAD
3 |
4 | $valid_branch_regex = "^((feature|bug)\/(\d|[1-9]\d*)\.(\d|[1-9]\d*)\.(\d|[1-9]\d*)\/[a-z0-9.-]+)|((release|integration)\/(\d|[1-9]\d*)\.(\d|[1-9]\d*)\.(\d|[1-9]\d*)+)$"
5 | $message = "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again."
6 | if (! $local_branch -match $valid_branch_regex) {
7 | Write-Host $message
8 | Exit 1
9 | }
10 |
11 | $files = git ls-files --cached | grep -x '.*sc-internal.*'
12 | if ($files.Length -gt 0)
13 | {
14 | Write-Host "Attempting to commit sc-internal files. Your commit is rejected."
15 | exit 1
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/SecurityHardening/configuration/apply-ioactions.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteRoot": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "Phyiscal Root of Sitecore Site"
7 | },
8 | "IoActionPath": {
9 | "Type": "string",
10 | "DefaultValue": "",
11 | "Description": "Path to IOAction.xml file"
12 | }
13 | },
14 | "Variables":{
15 | "Site.Root":"[parameter('SiteRoot')]"
16 | },
17 | "Tasks": {
18 | "ApplyIOActions": {
19 | "Type": "BlockFilesUsingIOActions",
20 | "Params": {
21 | "RootDirectoryPath": "[variable('Site.Root')]",
22 | "IoXmlPath": "[parameter('IOActionPath')]"
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/SitecoreUtilities/InstallPackage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "PackageFullPath": { "Type": "string" },
4 | "PackagesDirDst": { "Type": "string" },
5 | "BaseUrl": { "Type": "string" }
6 | },
7 | "Modules": [ "SitecoreUtilityTasks" ],
8 | "Tasks": {
9 | "CheckPaths": {
10 | "Type": "EnsurePath",
11 | "Params": {
12 | "Exists": [
13 | "[parameter('PackageFullPath')]",
14 | "[parameter('PackagesDirDst')]"
15 | ]
16 | }
17 | },
18 | "InstallPackage": {
19 | "Type": "InstallPackage",
20 | "Params": {
21 | "PackageFullPath": "[parameter('PackageFullPath')]",
22 | "PackagesDirDst": "[parameter('PackagesDirDst')]",
23 | "BaseUrl": "[parameter('BaseUrl')]"
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.PublishToWeb.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "BaseUrl": {
4 | "Type": "string",
5 | "Description": "The utility pages base url.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Variables": {
10 | "Base.Url": "[parameter('BaseUrl')]",
11 | "Publish.Uri": "[concat(variable('Base.Url'), '/Publish.aspx')]"
12 | },
13 | "Register": {
14 | "Tasks" : {
15 | "Sleep": "Start-Sleep"
16 | }
17 | },
18 | "Tasks": {
19 | "Sleep": {
20 | "Type": "Sleep",
21 | "Params": {
22 | "Milliseconds": "60000"
23 | }
24 | },
25 | "PublishToWeb": {
26 | "Type": "WebRequest",
27 | "Params": {
28 | "Uri": "[variable('Publish.Uri')]",
29 | "RequestTimeout": "720000"
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/SitecoreUtilities/PopulateIndexSchema.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteRootUrl": {
4 | "Type": "string"
5 | },
6 | "SitecoreAdminPassword" : {
7 | "Type": "string" ,
8 | "DefaultValue" : "b"
9 | },
10 | "Indexes": {
11 | "Type": "string",
12 | "Description": "pipe separated list of the indexes names"
13 | }
14 | },
15 | "Modules": [ "SitecoreUtilityTasks" ],
16 | "Tasks": {
17 | "PopulateSXAIndexesSchema": {
18 | "Type": "SitecoreUrl",
19 | "Params": {
20 | "SitecoreInstanceRoot": "[parameter('SiteRootUrl')]",
21 | "SitecoreActionPath": "[concat('sitecore/admin/PopulateManagedSchema.aspx?indexes=',parameter('Indexes'))]",
22 | "UserName": "admin",
23 | "Password": "[parameter('SitecoreAdminPassword')]"
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/merge-webconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "MergeTool": {
4 | "Type": "string",
5 | "Description": "The path to the Merge Tool."
6 | },
7 | "InputFile": {
8 | "Type": "string",
9 | "Description": "The path to input file to merge."
10 | },
11 | "WebConfig": {
12 | "Type": "string",
13 | "Description": "The path to the web config file."
14 | }
15 | },
16 | "Modules": [
17 | "MergeWebConfig"
18 | ],
19 | "Tasks": {
20 | "MergeWebConfig": {
21 | "Type": "MergeWebConfig",
22 | "Params": {
23 | "MergeTool": "[parameter('MergeTool')]",
24 | "InputFile": "[parameter('InputFile')]",
25 | "WebConfig": "[parameter('WebConfig')]"
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.EnsurePath.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "FullPath": {
4 | "Type": "string",
5 | "Description": "The path to check.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | // "Register":{
10 | // "Tasks": {
11 | // //"RemoveItem": "Remove-Item",
12 | // "WriteInformation": "Write-Information"
13 | // }
14 | // },
15 | "Variables": {
16 | "Full.Path": "[parameter('FullPath')]"
17 | },
18 | "Tasks": {
19 | // "ECHO": {
20 | // "Type": "WriteInformation",
21 | // "Params": {
22 | // "MessageData": "[concat('Path: ', variable('Full.Path'))]",
23 | // "InformationAction": "Continue"
24 | // }
25 | // },
26 | "EnsurePath": {
27 | "Type": "EnsurePath",
28 | "Params": {
29 | "Exists": [
30 | "[variable('Full.Path')]"
31 | ]
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/warmup-instance.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "DefaultValue": ""
6 | }
7 | },
8 | "Settings": {
9 | "AutoRegisterExtensions": true
10 | },
11 | "Tasks": {
12 | "Warmup": {
13 | "Type": "StartSitecoreSite",
14 | "Params": {
15 | "Uri": "[concat('https://', parameter('SiteName'))]",
16 | "TimeoutSec": 120,
17 | "Verbose": true
18 | }
19 | },
20 | "Sleeping": {
21 | "Type": "WriteInformation",
22 | "Params": {
23 | "Messagedata": "Awaiting site startup",
24 | "InformationAction": "Continue"
25 | }
26 | },
27 | "Wait": {
28 | "Type": "StartSleep",
29 | "Params": {
30 | "Seconds": 60
31 | }
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/docs/warmup/readme.md:
--------------------------------------------------------------------------------
1 | # Warming up a Sitecore Instance
2 |
3 | The `warmup.ps1` script in the Warmup folder makes web requests to an array of urls from the `warmup-config.json` which help pre-compile and cache pages from the Sitecore Base, XP and XC demos. The script will take some time to run but the result should be that all pages listed in the config file will get pre-compiled and cached where applicable.
4 |
5 | The `warmup-config.json` file can be customized to suit your needs (add additional backend pages to warmup, etc).
6 |
7 | To use, simply call the script and specify whether you want to warm up the base Sitecore backend or the Habitat Home XP or XC demos.
8 |
9 | ```powershell
10 | .\warmup.ps1 -instance -demoType <*sitecore* or *xp* or *xc*> -adminUser -adminPassword
11 | ```
12 |
13 | The script is provided as an example and can be modified to suit your needs.
14 |
15 | ## Next Steps
16 |
17 | [Return to main docs index](../readme.md)
18 |
--------------------------------------------------------------------------------
/docs/xp/solr.md:
--------------------------------------------------------------------------------
1 | # Solr Installation
2 |
3 | Solr can be installed with a script if you do not already have it.
4 |
5 | ## Install Solr
6 |
7 | Still in an elevated PowerShell session:
8 |
9 | - Browse to the solr folder.
10 |
11 | ```powershell
12 | Set-Location Sitecore.Habitathome.Utilities\XP\install\Solr
13 | ```
14 |
15 | - Review the `install-solr.ps1` script to ensure the Java and Solr versions are correct.
16 | - Install Solr.
17 |
18 | ```powershell
19 | .\install-solr.ps1
20 | ```
21 |
22 | - Once setup is complete, the installer should load the solr 'home' page
23 |
24 | ## To Uninstall Solr
25 |
26 | - Review the `remove-solr.ps1` script to ensure the Solr versions and its data folder are correct.
27 | - Uninstall Solr.
28 |
29 | ```powershell
30 | .\remove-solr.ps1
31 | ```
32 |
33 | ## Next Steps
34 |
35 | [Continue to Next Step (Preparing for Installation)](preparing-installation.md)
36 |
37 | [Return to Index](readme.md)
38 |
39 | [Return to main docs index](../readme.md)
40 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sitecore.HabitatHome.Utilities
2 |
3 | ## About this Repository
4 |
5 | This repository contains a collection of utilities and script examples to help with:
6 |
7 | - Installing `Sitecore Experience Platform`
8 | - Installing `Sitecore Experience Commerce`
9 | - Installing Sitecore Modules
10 | - Warming up a Sitecore Instance
11 | - Security Hardening a Sitecore Instance
12 |
13 | These scripts are written in the context of the Habitat Home Demos. They can be modified to work with other solutions.
14 |
15 | This repository only supports XP0 (XPSingle) installation. This means _everything_ is on the same machine (SQL Server (or SQLExpress), Solr, etc).
16 |
17 | > ### The code, samples and/or solutions provided in this repository are unsupported by Sitecore Support Services. Support is provided on a best-effort basis via GitHub issues or Slack #habitathome
18 |
19 | **Contributions are appreciated and always welcome!**
20 |
21 | ## Installation Instructions
22 |
23 | [Installation Instructions](docs/readme.md)
24 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/images.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ModuleFullPath": {
4 | "Type": "string",
5 | "Description": "The path to the Adventure Works images zip."
6 | },
7 | "ModulesDirDst": {
8 | "Type": "string",
9 | "Description": "The path to modules directory."
10 | },
11 | "BaseUrl": {
12 | "Type": "string",
13 | "Description": "The utility pages base url."
14 | }
15 | },
16 | "Modules": [ "SitecoreUtilityTasks" ],
17 | "Tasks": {
18 | "CheckPaths": {
19 | "Type": "EnsurePath",
20 | "Params": {
21 | "Exists": [
22 | "[parameter('ModuleFullPath')]",
23 | "[parameter('ModulesDirDst')]"
24 | ]
25 | }
26 | },
27 | "InstallModule": {
28 | "Type": "InstallModule",
29 | "Params": {
30 | "ModuleFullPath": "[parameter('ModuleFullPath')]",
31 | "ModulesDirDst": "[parameter('ModulesDirDst')]",
32 | "BaseUrl": "[parameter('BaseUrl')]"
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/XC/install/Add-BindingsToCommerceSites.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $hostName = "my.hostname",
3 | [string]$CertificateName = "my.hostname",
4 | [string[]]$sites = @("CommerceAuthoring_habitathome:5000", "CommerceMinions_habitathome:5010", "CommerceOps_habitathome:5015", "CommerceShops_habitathome:5005", "SitecoreBizFx_habitathome:4200", "SitecoreIdentityServer_habitathome:5050")
5 | )
6 |
7 | Set-Location (Resolve-Path "..\..\XP\Install")
8 |
9 | foreach ($site in $sites) {
10 | $siteName = $site.split(":")[0]
11 | $port = $site.split(":")[1]
12 |
13 | # Remove -SkipCreateCert if you would like to create a new certificate
14 |
15 | if ($siteName -ne "habitathome.dev.local") {
16 |
17 | .\Add-SSLSiteBindingWithCertificate.ps1 -SiteName $siteName -Port $port -HostName $hostName -CertificateName $CertificateName -SkipCreateCert -SslOnly
18 | }
19 | else {
20 | .\Add-SSLSiteBindingWithCertificate.ps1 -SiteName $siteName -Port $port -HostName $hostName -CertificateName $CertificateName -SkipCreateCert
21 |
22 | }
23 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CEConnect/CEConnect.Post.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "MergeTool": {
4 | "Type": "string",
5 | "Description": "The path to the Merge Tool.",
6 | "DefaultValue": ""
7 | },
8 | "InputFile": {
9 | "Type": "string",
10 | "Description": "The path to input file to merge.",
11 | "DefaultValue": ""
12 | },
13 | "WebConfig": {
14 | "Type": "string",
15 | "Description": "The path to the web config file.",
16 | "DefaultValue": ""
17 | }
18 | },
19 | "Modules": ["MergeWebConfig" ],
20 | "Variables": {
21 | "Merge.Tool": "[parameter('MergeTool')]",
22 | "Input.File": "[parameter('InputFile')]",
23 | "Web.Config": "[parameter('WebConfig')]"
24 | },
25 | "Tasks": {
26 | "MergeWebConfig": {
27 | "Type": "MergeWebConfig",
28 | "Params": {
29 | "MergeTool": "[variable('Merge.Tool')]",
30 | "InputFile": "[variable('Input.File')]",
31 | "WebConfig": "[variable('Web.Config')]"
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/SXAStorefront/_SXAStorefront.Post.Installation.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "MergeToolFullPath": {
4 | "Type": "string",
5 | "Description": "The path to the Merge Tool.",
6 | "DefaultValue":""
7 | },
8 | "InstallDir": {
9 | "Type": "string",
10 | "Description": "The sitecore site content path.",
11 | "DefaultValue": ""
12 | }
13 | },
14 | "Variables": {
15 | "InputFile": "[concat(parameter('InstallDir'), '\\MergeFiles\\Merge.SXA.Storefront.config')]",
16 | "WebConfig": "[concat(parameter('InstallDir'), '\\Web.Config')]"
17 | },
18 | "Modules": [
19 | "MergeWebConfig"
20 | ],
21 | "Tasks": {
22 | "MergeWebConfig": {
23 | "Type": "MergeWebConfig",
24 | "Params": {
25 | "MergeTool": "[parameter('MergeToolFullPath')]",
26 | "InputFile": "[variable('InputFile')]",
27 | "WebConfig": "[variable('WebConfig')]"
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Shared/Database/addcoredatabaseuser.sql:
--------------------------------------------------------------------------------
1 |
2 | USE [master]
3 | GO
4 | ALTER DATABASE [$(DatabasePrefix)_$(DatabaseSuffix)] SET CONTAINMENT = PARTIAL
5 | GO
6 |
7 | USE [$(DatabasePrefix)_$(DatabaseSuffix)]
8 | create user [$(UserName)] WITH PASSWORD = '$(Password)', DEFAULT_SCHEMA=[dbo]
9 |
10 | GO
11 | ALTER ROLE [aspnet_Membership_BasicAccess] ADD MEMBER [$(userName)]
12 | GO
13 | ALTER ROLE [aspnet_Membership_FullAccess] ADD MEMBER [$(userName)]
14 | GO
15 | ALTER ROLE [aspnet_Membership_ReportingAccess] ADD MEMBER [$(userName)]
16 | GO
17 | ALTER ROLE [aspnet_Profile_BasicAccess] ADD MEMBER [$(userName)]
18 | GO
19 | ALTER ROLE [aspnet_Profile_FullAccess] ADD MEMBER [$(userName)]
20 | GO
21 | ALTER ROLE [aspnet_Profile_ReportingAccess] ADD MEMBER [$(userName)]
22 | GO
23 | ALTER ROLE [aspnet_Roles_BasicAccess] ADD MEMBER [$(userName)]
24 | GO
25 | ALTER ROLE [aspnet_Roles_FullAccess] ADD MEMBER [$(userName)]
26 | GO
27 | ALTER ROLE [aspnet_Roles_ReportingAccess] ADD MEMBER [$(userName)]
28 | GO
29 | ALTER ROLE [db_datareader] ADD MEMBER [$(userName)]
30 | GO
31 | ALTER ROLE [db_datawriter] ADD MEMBER [$(userName)]
32 |
33 | GRANT EXECUTE TO [$(userName)];
34 |
--------------------------------------------------------------------------------
/Shared/assets/configuration/templates/module-install-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "The name of the site to be deployed."
7 | },
8 | "DatabasePrefix": {
9 | "Type": "string",
10 | "DefaultValue": "",
11 | "Description": "SQL DB Prefix"
12 | },
13 | "SqlAdminUser": {
14 | "Type": "string",
15 | "DefaultValue": "sa",
16 | "Description": "The Sql admin user account to use when installing databases."
17 | },
18 | "SqlAdminPassword": {
19 | "Type": "string",
20 | "DefaultValue": "",
21 | "Description": "The Sql admin password to use when installing databases."
22 | },
23 | "SqlServer": {
24 | "Type": "string",
25 | "DefaultValue": "",
26 | "Description": "The Sql Server where databases will be installed."
27 | },
28 | "LoginSession": {
29 | "Type": "Microsoft.PowerShell.Commands.WebRequestSession",
30 | "DefaultValue": "",
31 | "Description": "dev.sitecore.com login session"
32 | }
33 | },
34 | "Variables":{},
35 | "Includes": {}
36 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/download-assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "LoginSession":{
4 | "Type":"Microsoft.PowerShell.Commands.WebRequestSession",
5 | "Description":"Web Session to be used for downloading"
6 | },
7 | "Source":{
8 | "Type":"String",
9 | "Description":"Source Uri for file to be downloaded"
10 | },
11 | "Destination":{
12 | "Type":"String",
13 | "Description":"Destination Full Path (including file name) where the file will be stored"
14 | },
15 | "ProgressBar":{
16 | "Type":"Boolean",
17 | "DefaultValue":false,
18 | "Description":"Specifies whether the download progress bar should be displayed. Slower."
19 | }
20 | },
21 | "Tasks":{
22 | "DownloadModule":{
23 | "Type":"DownloadFile",
24 | "Params":{
25 | "SourceUri":"[parameter('Source')]",
26 | "DestinationPath":"[parameter('Destination')]",
27 | "LoginSession": "[parameter('LoginSession')]"
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/install-sitecoreazuretoolkit.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SitecoreAzureToolkitUri": {
4 | "Type": "string"
5 | },
6 | "SitecoreAzureToolkitFilename": {
7 | "Type": "string"
8 | },
9 | "Destination": {
10 | "Type": "string"
11 | },
12 | "LoginSession":{
13 | "Type":"Microsoft.PowerShell.Commands.WebRequestSession"
14 | },
15 | "InstallationPath":{
16 | "Type":"string"
17 | }
18 | },
19 | "Tasks": {
20 | "DownloadSitecoreAzureToolkit": {
21 | "Type": "DownloadFile",
22 | "Params": {
23 | "SourceUri": "[parameter('SitecoreAzureToolkitUri')]",
24 | "DestinationPath": "[parameter('Destination')]",
25 | "LoginSession": "[parameter('LoginSession')]"
26 | }
27 | },
28 | "ExtractSitecoreAzureToolkit": {
29 | "Type":"Unpack",
30 | "Params":{
31 | "Source":"[parameter('Destination')]",
32 | "Destination":"[parameter('InstallationPath')]"
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.RebuildIndexes.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "BaseUrl": {
4 | "Type": "string",
5 | "Description": "The utility pages base url.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Variables": {
10 | "Base.Url": "[parameter('BaseUrl')]",
11 | "Core.Uri": "[concat(variable('Base.Url'), '/RebuildIndex.aspx?index=sitecore_core_index')]",
12 | "Master.Uri": "[concat(variable('Base.Url'), '/RebuildIndex.aspx?index=sitecore_master_index')]",
13 | "Web.Uri": "[concat(variable('Base.Url'), '/RebuildIndex.aspx?index=sitecore_web_index')]"
14 | },
15 | "Tasks": {
16 | "RebuildIndex-Core": {
17 | "Type": "WebRequest",
18 | "Params": {
19 | "Uri": "[variable('Core.Uri')]",
20 | "RequestTimeout": "600000"
21 | }
22 | },
23 | "RebuildIndex-Master": {
24 | "Type": "WebRequest",
25 | "Params": {
26 | "Uri": "[variable('Master.Uri')]",
27 | "RequestTimeout": "720000"
28 | }
29 | },
30 | "RebuildIndex-Web": {
31 | "Type": "WebRequest",
32 | "Params": {
33 | "Uri": "[variable('Web.Uri')]",
34 | "RequestTimeout": "720000"
35 | }
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/enable-contained-databases.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SqlServer": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "Name of SQL Server"
7 | },
8 | "SqlAdminUser": {
9 | "Type": "string",
10 | "DefaultValue": "sa",
11 | "Description": "SQL Admin user name"
12 | },
13 | "SqlAdminPassword": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "SQL Admin user password"
17 | },
18 | "Script": {
19 | "Type": "string",
20 | "DefaultValue": "sp_configure 'contained database authentication', 1; RECONFIGURE;",
21 | "Description": "SQL Script to execute"
22 | }
23 | },
24 | "Tasks": {
25 | "EnableContainedDatabases": {
26 | "Type": "InvokeSqlcmd",
27 | "Params": {
28 | "ServerInstance": "[parameter('SqlServer')]",
29 | "UserName": "[parameter('SqlAdminUser')]",
30 | "Password": "[parameter('SqlAdminPassword')]",
31 | "Query": "[parameter('Script')]"
32 | }
33 | }
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/XC/install/set-installation-overrides.ps1.example:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $configurationFile = "configuration-xc0.json"
3 | )
4 |
5 | Write-Host "Setting Local Overrides in $configurationFile"
6 |
7 | $json = Get-Content -Raw $configurationFile | ConvertFrom-Json
8 |
9 | # Assets and prerequisites
10 |
11 | $assets = $json.assets
12 | $assets.root = "$PSScriptRoot\assets"
13 | $assets.packageRepository = "C:\repository"
14 | $assets.downloadFolder = $assets.packageRepository
15 |
16 | # Settings
17 |
18 | # Site Settings
19 | $site = $json.settings.site
20 |
21 | #Commerce
22 | $commerce = $json.settings.commerce
23 | $commerce.storefrontPrefix = $site.prefix
24 | $commerce.storefrontHostName = $commerce.storefrontPrefix + "." + $site.suffix
25 |
26 | $commerce.engineConnectClientId = "CommerceEngineConnect"
27 | $commerce.engineConnectClientSecret = "J6qfqaKX1hAFIUjiNCAV6jVolLqwhF4OgM6dHT7c9dk="
28 |
29 | $commerce.serviceAccountDomain = "$($Env:COMPUTERNAME)"
30 | $commerce.serviceAccountUserName = "CSFndRuntimeUser"
31 | $commerce.serviceAccountPassword = "Pu8azaCr"
32 |
33 | $commerce.brainTreeAccountMerchandId = ""
34 | $commerce.brainTreeAccountPublicKey = ""
35 | $commerce.brainTreeAccountPrivateKey = ""
36 | $commerce.brainTreeEnvironment = ""
37 |
38 | Set-Content $ConfigurationFile (ConvertTo-Json -InputObject $json -Depth 4 )
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | [Oo]bj/
2 | src/**/[Bb]in/
3 | build/**/[Bb]in/
4 | specs/**/[Bb]in/
5 | .nuget/
6 | _ReSharper.*
7 | packages/
8 | artifacts/
9 | build/assets/**/*
10 | *.user
11 | *.cache
12 | *.suo
13 | *.userprefs
14 | *DS_Store
15 | *.sln.ide
16 | license.xml
17 | lib/Sitecore/*
18 | !lib/Sitecore/readme.MD
19 | !lib/Modules/*
20 | lib/System/*
21 | !lib/System/readme.MD
22 | lib/LocalRepository/*
23 | .sonar
24 | vars.user.cmd
25 | .vs
26 | /target
27 | /node_modules
28 | temp/
29 | *.ncrunchproject
30 | *.ncrunchsolution
31 | .vscode
32 | nCrunchTemp*.*
33 | settings.user.ps1
34 | *.log
35 | *.zip
36 | *.user.config
37 | *.user.js
38 | *.user.targets
39 | *.scproj.user
40 | IconCache/
41 | T4RenderCache/
42 | BuiltFiles_*.txt
43 | /src/**/tds/*/Report/*
44 | *.p12
45 | *.jks
46 | deploy/
47 | *.pubxml
48 | install-xp0.json
49 | configuration-xp0.json
50 | set-installation-overrides.ps1
51 | *.crt
52 | *.msi
53 | *.config.user
54 | Deploy-*
55 | */**/Downloads
56 | configuration-x*0.json
57 | /install/deploy/*
58 | */**/set-installation-overrides.ps1
59 | XC/install/assets/Commerce
60 | XP/install/assets/Commerce
61 | */**/Resources/Modules
62 | *.tgz
63 | *.update
64 | InstallUtil.InstallLog
65 | /FrontEnd/**/node_modules
66 | logs
67 | *.dll
68 | publishTemp
69 | Publish
70 | dev.creds.xml
71 | *.pfx
72 | shared/sat
73 | install-modules.json
74 | module-master-install.json
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/SXAStorefront/SXAStorefront.EnableSearch.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "InstallDir": {
4 | "Type": "string",
5 | "Description": "The sitecore site content path.",
6 | "DefaultValue": ""
7 | }
8 | },
9 | "Variables": {
10 | "ContentSearchConfig": "[concat(parameter('InstallDir'), '\\App_Config\\Sitecore\\ContentSearch\\Sitecore.ContentSearch.config')]",
11 | "ContentSearchEnabledXpath": "//configuration/sitecore/settings/setting[@name='ContentSearch.Enabled']",
12 | "MarketingConfigDir": "[concat(parameter('InstallDir'), '\\App_Config\\Sitecore\\Marketing.Operations.xMgmt')]"
13 | },
14 | "Modules": [
15 | "SitecoreUtilityTasks"
16 | ],
17 | "Tasks": {
18 | "EnableIndexUpdate": {
19 | "Type": "SetXml",
20 | "Params": [
21 | {
22 | "FilePath": "[variable('ContentSearchConfig'))]",
23 | "Xpath": "[variable('ContentSearchEnabledXpath')]",
24 | "Attributes": {
25 | "value": "true"
26 | }
27 | }
28 | ]
29 | },
30 | "EnableConfigFiles": {
31 | "Type": "EnableConfigFiles",
32 | "Params": {
33 | "ConfigDir": "[variable('MarketingConfigDir')]",
34 | "ConfigFileList": [
35 | "Sitecore.Marketing.Search.config"
36 | ]
37 | }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Azure/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "regions" :[
3 | {
4 | "name":"na",
5 | "location":"eastus",
6 | "resourceGroupName":"habitathome-demo-snapshot",
7 | "storageAccountName":"habitathomedemosnapshots",
8 | "storageContainerName":"snapshots"
9 | },
10 | {
11 | "name":"emea",
12 | "location":"ukwest",
13 | "resourceGroupName":"habitathome-demo-snapshot-emea",
14 | "storageAccountName":"hhdemosnapshotsemea",
15 | "storageContainerName":"snapshots"
16 | },
17 | {
18 | "name":"ga",
19 | "location":"australiaeast",
20 | "resourceGroupName":"habitathome-demo-snapshot-ga",
21 | "storageAccountName":"hhdemosnapshotsga",
22 | "storageContainerName":"snapshots"
23 | },
24 | {
25 | "name":"ea",
26 | "location":"eastasia",
27 | "resourceGroupName":"habitathome-demo-snapshot-eastasia",
28 | "storageAccountName":"hhdemosnapshoteastasia",
29 | "storageContainerName":"snapshots"
30 | },
31 | {
32 | "name":"ne",
33 | "location":"northeurope",
34 | "resourceGroupName":"docker-demo-snapshot",
35 | "storageAccountName":"dockersnapshots",
36 | "storageContainerName":"snapshots"
37 | }
38 | ]
39 | }
--------------------------------------------------------------------------------
/XC/install/install-settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets": {
3 | "root": "@@assets.root@@",
4 | "downloadFolder": "@@assets.downloadFolder@@",
5 | "commerce": {
6 | "packageName": "@@assets.commerce.packageName@@",
7 | "packageUrl": "@@assets.commerce.packageUrl@@",
8 | "installationFolder": "@@assets.commerce.installationFolder@@",
9 | "sifCommerceRoot": "@@assets.commerce.sifCommerceRoot@@",
10 | "filesToExtract": [
11 | {
12 | "name": "SIF.Sitecore.Commerce",
13 | "version": "@@SIF.Sitecore.Commerce.version@@"
14 | }
15 | ]
16 | }
17 | },
18 | "settings": {
19 | "commerce": {
20 | "engineConnectClientId": "@@@@",
21 | "engineConnectClientSecret": "@@@@",
22 | "engineConfigurationPath": "@@settings.commerce.engineConfigurationPath@@",
23 | "storefrontHostName": "@@settings.commerce.storefrontHostName@@",
24 | "storefrontPrefix": "@@settings.commerce.storefrontPrefix@@",
25 | "serviceAccountDomain": "@@settings.commerce.serviceAccountDomain@@",
26 | "serviceAccountUserName": "@@settings.commerce.serviceAccountUserName@@",
27 | "serviceAccountPassword": "@@settings.commerce.serviceAccountPassword@@",
28 | "brainTreeAccountMerchandId": "@@@@",
29 | "brainTreeAccountPublicKey": "@@@@",
30 | "brainTreeAccountPrivateKey": "@@@@",
31 | "brainTreeEnvironment": "@@@@"
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/XP/install/Certificates/ClientCertificate.psm1:
--------------------------------------------------------------------------------
1 | function New-RootCertificate {
2 | $rootCert = New-SelfSignedCertificate -certstorelocation $XConnectCertStore -dnsname "Self-signed Certificate Authority" -FriendlyName "Self-signed Certificate Authority" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2") -NotAfter (Get-Date).AddYears(10) -KeyUsage CertSign -KeyProtection None -Provider 'Microsoft Enhanced RSA and AES Cryptographic Provider'
3 | try {
4 | $tempFile = New-TemporaryFile
5 | try {
6 | $pwd = ConvertTo-SecureString -String "secret" -Force -AsPlainText
7 | Export-PfxCertificate -cert $rootCert -FilePath $tempFile.FullName -Password $pwd
8 | return Import-PfxCertificate -FilePath $tempFile.FullName -Password $pwd -CertStoreLocation $XConnectCertStore
9 | } finally {
10 | Remove-Item $tempFile.FullName
11 | }
12 | } finally {
13 | Remove-Item $rootCert.PSPath
14 | }
15 | }
16 |
17 | function New-ClientCertificate {
18 | $rootCert = New-RootCertificate
19 | return New-SelfSignedCertificate -Subject "CN=$XConnectSiteName" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2","2.5.29.17={text}upn=$XConnectSiteName") -KeyUsage DigitalSignature -CertStoreLocation "Cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(10) -FriendlyName $XConnectSiteName -Signer $rootCert -KeyExportPolicy Exportable -KeyProtection None -Provider 'Microsoft Enhanced RSA and AES Cryptographic Provider'
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Azure/CreateNewSnapshot.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [Parameter(Mandatory = $true)]
3 | [string] $subscriptionId,
4 | [Parameter(Mandatory = $true)]
5 | [ValidateSet('xp', 'xc')]
6 | [string] $demoType,
7 | [Parameter(Mandatory = $true)]
8 | [string] $version,
9 | [string] $suffix = "master",
10 | [string] $sourceResourceGroupNamePrefix = "habitathome",
11 | [string] $snapshotPrefix = "habitathome",
12 | [string] $location = "eastus",
13 | [string] $snapshotDestinationResourceGroup = "habitathome-demo-snapshot"
14 |
15 | )
16 | Import-Module AzureRM
17 | $account = Get-AzureRMContext | Select-Object Account
18 |
19 | if ($null -eq $account.Account) {
20 | Connect-AzureRmAccount
21 | }
22 | $demoType = $demoType.ToLower()
23 | $location = $location.ToLower()
24 | $sourceResourceGroupName = ("{0}-{1}-{2}" -f $sourceResourceGroupNamePrefix, $demoType, $suffix)
25 | $vmName = ("{0}-vm" -f $sourceResourceGroupName)
26 |
27 | $osSnapshotName = ("{0}{1}-{2}-os-snapshot" -f $snapshotPrefix, $demoType, $version)
28 |
29 | Select-AzureRmSubscription -SubscriptionId $subscriptionId
30 |
31 | $vm = Get-AzureRmVM -ResourceGroupName $sourceResourceGroupName -Name $vmName
32 |
33 | $osDiskId = $vm.StorageProfile.OsDisk.ManagedDisk.Id
34 |
35 | $osSnapshotConfig = New-AzureRmSnapshotConfig `
36 | -SourceUri $osDiskId `
37 | -Location $location `
38 | -CreateOption copy
39 |
40 | New-AzureRmSnapshot -Snapshot $osSnapshotConfig -SnapshotName $osSnapshotName -ResourceGroupName $snapshotDestinationResourceGroup
--------------------------------------------------------------------------------
/docs/xp/installing-sitecore-xp.md:
--------------------------------------------------------------------------------
1 | # Installing Sitecore XP
2 |
3 | This repository only supports XP0 (XPSingle) installation. This means _everything_ is on the same machine (SQL Server (or SQLExpress), Solr, etc).
4 |
5 | We're finally here, prerequisites are installed, configuration is set and now it's the moment of truth!
6 |
7 | ```powershell
8 | .\install-singledeveloper.ps1
9 | ```
10 |
11 | You will be prompted for your dev.sitecore.com credentials - the required assets will be downloaded automatically.
12 |
13 | We're all done - that's it!
14 |
15 | Now go grab a coffee, really... Installation should take 12 to 15 minutes, depending on your environment.
16 |
17 | ## What's Happening
18 |
19 | `install-singledeveloper.ps1` is a wrapper around the OOB `XP0-Singledevloper.ps1` and corresponding `XP0-SingleDeveloper.json` installation process. Although the Utilities repository does bring some enhancements to the OOB configurations.
20 |
21 | In addition to what the OOB installer will do, `install-singledeveloper.ps1` will:
22 |
23 | - Install Sitecore Installation Framework.
24 | - Automatically download all required Sitecore assets from dev.sitecore.com (_if they don't already exist_).
25 | - Install Sitecore with SSL configured.
26 | - Add AppPool user(s) to_ Performance Log Users_ and _Performance Monitor Users_ groups to avoid errors in the Sitecore log.
27 |
28 | ## Next Steps
29 |
30 | [Continue to Next Step (Installing Modules)](installing-modules.md)
31 |
32 | [Return to Index](readme.md)
33 |
34 | [Return to main docs index](../readme.md)
35 |
--------------------------------------------------------------------------------
/Shared/assets/configuration/bootloader.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "Package": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "The path to the Web Deploy package to deploy."
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "DefaultValue": "Sitecore",
11 | "Description": "The name of the site to be deployed."
12 | },
13 | "ConfigurationOverrideSource": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "Path of the new Bootloader configuration file"
17 | },
18 | "ConfigurationOverrideDestination": {
19 | "Type": "string",
20 | "DefaultValue": "C:\\inetpub\\wwwroot\\habitathome.dev.local\\App_Data\\tools\\InstallJob",
21 | "Description": "The folder where Bootloader InstallJob tool is installed."
22 | }
23 | },
24 | "Tasks": {
25 | "InstallBootloaderWDP": {
26 | "Type": "WebDeploy",
27 | "Params": {
28 | "Verb": "Sync",
29 | "Arguments": {
30 | "Source": {
31 | "Package": "[resolvepath(parameter('Package'))]"
32 | },
33 | "Dest": "Auto",
34 | "EnableRule": "DoNotDeleteRule",
35 | "SetParam": [
36 | {
37 | "Name": "Application Path",
38 | "Value": "[parameter('SiteName')]"
39 | }
40 | ]
41 | }
42 | }
43 | },
44 | "OverwriteBootloaderConfig": {
45 | "Type": "Copy",
46 | "Params": {
47 | "Source": "[parameter('ConfigurationOverrideSource')]",
48 | "Destination": "[parameter('ConfigurationOverrideDestination')]"
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Connect/Connect.MarketingAutomationPost.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "XConnectInstallDir": {
4 | "Type": "string",
5 | "Description": "The path to the XConnect web site.",
6 | "DefaultValue": ""
7 | },
8 | "AutomationEngineModule": {
9 | "Type": "string",
10 | "Description": "The path to the Commerce Automation Engine zip.",
11 | "DefaultValue": ""
12 | }
13 | },
14 | "Variables": {
15 | "Automation.EngineModule": "[parameter('AutomationEngineModule')]",
16 | "Services.MarketingAutomationEngine.Name": "[concat(parameter('SiteName'), '_xconnect-MarketingAutomationService')]"
17 | },
18 | "Modules": [
19 | "SitecoreUtilityTasks"
20 | ],
21 | "Tasks": {
22 | "StopServices": {
23 | "Description": "Stops the services if they running.",
24 | "Type": "ManageService",
25 | "Params": [
26 | {
27 | "Name": "[variable('Services.MarketingAutomationEngine.Name')]",
28 | "Status": "Stopped",
29 | "PostDelay": 3000
30 | }
31 | ]
32 | },
33 | "InstallAutomationEngineModule": {
34 | "Type": "ExpandArchive",
35 | "Params": {
36 | "SourceZip": "[variable('Automation.EngineModule')]",
37 | "DestinationPath": "[parameter('XConnectInstallDir')]"
38 | }
39 | },
40 | "StartServices": {
41 | "Description": "Starts the service.",
42 | "Type": "ManageService",
43 | "Params": [
44 | {
45 | "Name": "[variable('Services.MarketingAutomationEngine.Name')]",
46 | "Status": "Running"
47 | }
48 | ]
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CEConnect/CEConnect.GenerateCatalogTemplates.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "BaseUrl": {
4 | "Type": "string",
5 | "Description": "The utility pages base url.",
6 | "DefaultValue": "string"
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "Description": "The name of the site.",
11 | "DefaultValue": ""
12 | }
13 | },
14 | "variables" :{
15 | "Base.Url": "[parameter('BaseUrl')]"
16 | },
17 | "Register": {
18 | "Tasks" : {
19 | "Sleep": "Start-Sleep"
20 | }
21 | },
22 | "Modules": [ "SitecoreUtilityTasks" ],
23 | "Tasks": {
24 | "GenerateCatalogTemplates": {
25 | "Type": "WebRequest",
26 | "Params": {
27 | "Uri": "[variable('Base.Url')]"
28 | }
29 | },
30 | "StopWebsite": {
31 | "Type": "ManageWebsite",
32 | "Params": {
33 | "Name": "[parameter('SiteName')]",
34 | "Action": "Stop"
35 | }
36 | },
37 | "StopAppPool": {
38 | "Type": "ManageAppPool",
39 | "Params": {
40 | "Name": "[parameter('SiteName')]",
41 | "Action": "Stop"
42 | }
43 | },
44 | "Sleep": {
45 | "Type": "Sleep",
46 | "Params": {
47 | "Milliseconds": "60000"
48 | }
49 | },
50 | "StartAppPool": {
51 | "Type": "ManageAppPool",
52 | "Params": {
53 | "Name": "[parameter('SiteName')]",
54 | "Action": "Start"
55 | }
56 | },
57 | "StartWebsite": {
58 | "Type": "ManageWebsite",
59 | "Params": {
60 | "Name": "[parameter('SiteName')]",
61 | "Action": "Start"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/SitecoreUtilities/InstallModule.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ModuleFullPath": {
4 | "Type": "string",
5 | "Description": "The path to the zip module.",
6 | "DefaultValue": ""
7 | },
8 | "ModulesDirDst": {
9 | "Type": "string",
10 | "Description": "The path to the module destination.",
11 | "DefaultValue": ""
12 | },
13 | "BaseUrl": {
14 | "Type": "string",
15 | "Description": "The utility pages base url.",
16 | "DefaultValue": ""
17 | }
18 | },
19 | "Register":{
20 | "Tasks": {
21 | //"RemoveItem": "Remove-Item",
22 | "WriteInformation": "Write-Information"
23 | }
24 | },
25 | "Modules": [
26 | "SitecoreUtilityTasks"
27 | ],
28 | "Variables": {
29 | "Module.FullPath": "[parameter('ModuleFullPath')]",
30 | "Modules.DirDst": "[parameter('ModulesDirDst')]",
31 | "Base.Url": "[parameter('BaseUrl')]"
32 | },
33 | "Tasks": {
34 | "ECHO": {
35 | "Type": "WriteInformation",
36 | "Params": {
37 | "MessageData": "[concat('VALUE: ', variable('Module.FullPath'))]",
38 | "InformationAction": "Continue"
39 | }
40 | },
41 |
42 | "CheckPaths": {
43 | "Type": "EnsurePath",
44 | "Params": {
45 | "Exists": [
46 | "[variable('Module.FullPath')]",
47 | "[variable('Modules.DirDst')]"
48 | ]
49 | }
50 | },
51 | "InstallModule": {
52 | "Type": "InstallModule",
53 | "Params": {
54 | "ModuleFullPath": "[variable('Module.FullPath')]",
55 | "ModulesDirDst": "[variable('Modules.DirDst')]",
56 | "BaseUrl": "[variable('Base.Url')]"
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/XP/install/assets/configuration/xConnect/xconnect-models.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "WebRoot": {
4 | "Type": "string",
5 | "DefaultValue": "XConnect",
6 | "Description": "The name of the site to be deployed."
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "DefaultValue": "SC9",
11 | "Description": "The name of the site to be deployed."
12 | },
13 | "XConnectSiteName": {
14 | "Type": "string",
15 | "DefaultValue": "XConnect",
16 | "Description": "The name of the site to be deployed."
17 | },
18 | "ModelName": {
19 | "Type": "string",
20 | "Description": "List of deta"
21 | },
22 | "Target": {
23 | "Type": "string",
24 | "DefaultValue": "App_Data\\Models",
25 | "Description": "Destination where model should be deployed"
26 | }
27 | },
28 | "Variables": {
29 | "Site.PhysicalPath": "[joinpath(parameter('WebRoot'), parameter('SiteName'))]",
30 | "Site.ModelsPath": "[joinpath(variable('Site.PhysicalPath'), 'App_Data\\Models')]",
31 | "ModelPath": "[joinpath(variable('Site.ModelsPath'), parameter('ModelName'))]",
32 | "XConnect.PhysicalPath":"[joinpath(parameter('WebRoot'), parameter('XConnectSiteName'))]",
33 | "Destination": "[joinpath(variable('XConnect.PhysicalPath'), parameter('Target'))]"
34 | },
35 | "Tasks": {
36 | "CopyModel": {
37 | "Type": "Copy",
38 | "Params": {
39 | "Source": "[variable('ModelPath')]",
40 | "Destination": "[variable('Destination')]"
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/HabitatHome/set-engine-hostname.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SSLCert": {
4 | "Type": "string",
5 | "Description": "The certificate to use for HTTPS web bindings. Provide the name or the thumbprint. If not provided a certificate will be generated."
6 | },
7 | "SiteName": {
8 | "Type": "string",
9 | "Description": "The name of the site deployed site in iis."
10 | },
11 | "HostHeader": {
12 | "Type": "string",
13 | "Reference": "SiteName",
14 | "Description": "The hostheader to add for the site."
15 | },
16 | "Port": {
17 | "Type": "int",
18 | "DefaultValue": 443,
19 | "Description": "The port to bind to."
20 | }
21 | },
22 | "Variables": {
23 | "Security.CertificateStore": "Cert:\\Localmachine\\My",
24 | "Security.SSL.CertificateThumbprint": "[GetCertificateThumbprint(parameter('SSLCert'), variable('Security.CertificateStore'))]"
25 | },
26 | "Tasks": {
27 | "CreateBindingsWithThumprint": {
28 | "Type": "WebBinding",
29 | "Params": {
30 | "SiteName": "[parameter('SiteName')]",
31 | "Add": [{
32 | "HostHeader": "[parameter('HostHeader')]",
33 | "Protocol": "https",
34 | "SSLFlags": 1,
35 | "Port":"[parameter('Port')]",
36 | "Thumbprint": "[variable('Security.SSL.CertificateThumbprint')]"
37 | }]
38 | }
39 | },
40 | "CreateHostHeader": {
41 | "Type": "HostHeader",
42 | "Params": {
43 | "HostName": "[parameter('HostHeader')]"
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/sxa/configure-search-indexes.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "PhysicalPath": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "The sitecore site content path."
7 | },
8 | "SitePrefix": {
9 | "Type": "string",
10 | "DefaultValue": "",
11 | "Description": "Site Prefix"
12 | }
13 | },
14 | "Variables": {
15 | "SolrSearchMasterIndexCoreNameXpath": "//configuration/sitecore/contentSearch/configuration/indexes/index[@id='sitecore_sxa_master_index']/param[@desc='core']",
16 | "SolrSearchWebIndexCoreNameXpath": "//configuration/sitecore/contentSearch/configuration/indexes/index[@id='sitecore_sxa_web_index']/param[@desc='core']",
17 | "Site.PhysicalPath": "[parameter('PhysicalPath')]",
18 | "SolrSearchConfig": "[concat(variable('Site.PhysicalPath'), '\\App_Config\\Modules\\SXA\\Z.Foundation.Overrides\\Sitecore.XA.Foundation.Search.Solr.config')]"
19 | },
20 | "Tasks": {
21 | "UpdateMasterSXAIndex": {
22 | "Type": "SetXml",
23 | "Params": [
24 | {
25 | "FilePath": "[variable('SolrSearchConfig'))]",
26 | "Xpath": "[variable('SolrSearchMasterIndexCoreNameXpath')]",
27 | "Value": "[concat(parameter('SitePrefix'), '_sxa_master_index')]"
28 | }
29 | ]
30 | },
31 | "UpdateWebSXAIndex": {
32 | "Type": "SetXml",
33 | "Params": [
34 | {
35 | "FilePath": "[variable('SolrSearchConfig'))]",
36 | "Xpath": "[variable('SolrSearchWebIndexCoreNameXpath')]",
37 | "Value": "[concat(parameter('SitePrefix'), '_sxa_web_index')]"
38 | }
39 | ]
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Prerequisites/Install-Module.ps1:
--------------------------------------------------------------------------------
1 | param (
2 | [string]$moduleName,
3 | [string]$version
4 | )
5 |
6 | $module = Get-Module -ListAvailable $moduleName -Verbose
7 |
8 | if (!$module) {
9 | # if not installed yet
10 | if ($version) {
11 | Install-Module $moduleName -RequiredVersion $version -Force -Verbose
12 | }
13 | else {
14 | Install-Module $moduleName -Force -Verbose
15 | }
16 | return
17 | }
18 |
19 | if ($module.Length -gt 1) {
20 | # if multiple versions are installed
21 | if (!$version) {
22 | Update-Module -Name $moduleName -Force -Verbose
23 | return
24 | }
25 |
26 | $isInstalled = $module|Where-Object {$_.Version -eq $version}
27 |
28 | if ($isInstalled) {
29 | Write-Host "the required version $version of module $moduleName is already installed" -foreground Yellow
30 | }
31 | else {
32 | Write-Host "Adding a new version $version to module $moduleName" -foreground Yellow
33 | Update-Module $moduleName -RequiredVersion $version -Force -Verbose
34 | }
35 | return
36 | }
37 |
38 | #process if only 1 version is installed
39 | $installedVersion = $module.Version;
40 | Remove-Module -ModuleInfo $module -Force -Verbose #unload module from current session
41 |
42 | if ($installedVersion -ne $version) {
43 |
44 | if (!$version) {
45 | Update-Module -Name $moduleName -Force -Verbose
46 | }
47 | else {
48 | if ($installedVersion -gt $version) {
49 | Write-Host "the required version of module $moduleName is $version, but a newer version $installedVersion is already installed." -foreground Yellow
50 | }
51 | Update-Module $moduleName -RequiredVersion $version -Force -Verbose
52 | }
53 | }
54 | else {
55 | Write-Host "the required version $version of module $moduleName is already installed" -foreground Yellow
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/XP/install/install-solr.ps1:
--------------------------------------------------------------------------------
1 | # Credit primarily to jermdavis for the original script
2 |
3 | Param(
4 | [string] $ConfigurationFile = "configuration-xp0.json",
5 | [string]$solrVersion = "8.1.1",
6 | [string]$installFolder = "c:\solr",
7 | [string]$solrPort = "8811",
8 | [string]$solrHost = "localhost",
9 | [bool]$solrSSL = $TRUE,
10 | [string]$keystoreSecret = "secret",
11 | [string]$KeystoreFile = 'solr-ssl.keystore.jks',
12 | [string]$SolrDomain = 'localhost',
13 | [string]$maxJvmMem = '512m',
14 | [switch]$Clobber,
15 | [switch]$Uninstall
16 | )
17 |
18 | if (!(Test-Path $ConfigurationFile)) {
19 | Write-Host "Configuration file '$($ConfigurationFile)' not found." -ForegroundColor Red
20 | Write-Host "Please use 'set-installation...ps1' files to generate a configuration file." -ForegroundColor Red
21 | Exit 1
22 | }
23 | $config = Get-Content -Raw $ConfigurationFile | ConvertFrom-Json
24 | if (!$config) {
25 | throw "Error trying to load configuration!"
26 | }
27 |
28 | $assets = $config.assets
29 | $solrInstallConfigurationPath = Resolve-Path "assets\configuration\XP0\Solr-SingleDeveloper.json"
30 |
31 | Import-Module (Join-Path $assets.sharedUtilitiesRoot "assets\modules\SharedInstallationUtilities\SharedInstallationUtilities.psm1") -Force
32 |
33 |
34 | $params = @{
35 | SolrVersion = $solrVersion
36 | SolrDomain = "localhost"
37 | SolrPort = $solrPort
38 | SolrServicePrefix = ""
39 | SolrInstallRoot = $installFolder
40 | }
41 |
42 | Import-SitecoreInstallFramework -version $assets.installerVersion -repositoryName $assets.psRepositoryName -repositoryUrl $assets.psRepository
43 | if ($Uninstall){
44 | Install-SitecoreConfiguration -Path $solrInstallConfigurationPath @params -Uninstall
45 | }
46 | else {
47 | Install-SitecoreConfiguration -Path $solrInstallConfigurationPath @params
48 | }
49 |
50 |
51 | Write-Host ''
52 | Write-Host 'Done!' -ForegroundColor Green
53 |
--------------------------------------------------------------------------------
/Shared/assets/configuration/deploy-xconnect-models.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "String",
5 | "DefaultValue": ""
6 | },
7 | "WebRoot": {
8 | "Type": "String",
9 | "DefaultValue": ""
10 | },
11 | "XConnectSiteName": {
12 | "Type": "String",
13 | "DefaultValue": ""
14 | }
15 | },
16 | "Variables": {
17 | "Site.PhysicalPath": "[joinpath(parameter('WebRoot'),parameter('SiteName'))]",
18 | "XConnect.Root": "[joinpath(parameter('WebRoot'),parameter('XConnectSiteName'))]",
19 | "XConnect.IndexerRoot": "[joinpath(variable('XConnect.Root'),'App_Data\\jobs\\continuous\\IndexWorker')]",
20 | "XConnect.Models.Root": "[joinpath(variable('Site.PhysicalPath'),'App_Data\\xConnectModels')]",
21 | "XConnect.Models.Source": "[joinpath(variable('XConnect.Models.Root'),'*')]",
22 | "XConnect.Models.Destination": "[joinpath(variable('XConnect.Root'),'App_Data\\Models')]",
23 | "Xconnect.Indexer.Models.Destination": "[joinpath(variable('XConnect.IndexerRoot'),'App_Data\\Models')]",
24 | "Models.Exist": "[not(testpath(variable('XConnect.Models.Root')))]"
25 | },
26 | "Tasks": {
27 | "CopyModelsToXConnect": {
28 | "Type": "Copy",
29 | "Params": {
30 | "Source": "[variable('XConnect.Models.Source')]",
31 | "Destination": "[variable('XConnect.Models.Destination')]"
32 | },
33 | "Skip": "[variable('Models.Exist')]"
34 | },
35 | "CopyModelsToXConnectIndexer": {
36 | "Type": "Copy",
37 | "Params": {
38 | "Source": "[variable('XConnect.Models.Source')]",
39 | "Destination": "[variable('XConnect.Indexer.Models.Destination')]"
40 | },
41 | "Skip": "[variable('Models.Exist')]"
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/docs/prerequisites/readme.md:
--------------------------------------------------------------------------------
1 | # Installation of prerequisites
2 |
3 | ## Preparation
4 |
5 | - Open PowerShell session as Administrator
6 | - Ensure correct [ExecutionPolicy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6) is set for unsigned scripts
7 |
8 | - **example:** `Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser`
9 |
10 | ## Installing Prerequisites
11 |
12 | ```powershell
13 | .\Install-All.ps1
14 | ```
15 |
16 | ## Restart Computer
17 |
18 | Once installation has completed, restart your computer to ensure all settings are loaded correctly.
19 |
20 | ## Steps Performed by Install-All
21 |
22 | ### Install Chocolatey
23 |
24 | Chocolatey builds on technologies you know - unattended installation and PowerShell. Chocolatey works with all existing software installation technologies like MSI, NSIS, InnoSetup, etc
25 |
26 | ### Install IIS Features
27 |
28 | Uses Windows' native `Enable-WindowsOptionalFeature` to install relevant Windows _IIS Features_ as well as _Url Rewrite_ and _Web Deploy_
29 |
30 | ### Install Sitecore Gallery
31 |
32 | Registers Sitecore's PowerShell repository (Sitecore Gallery) in order to support installing SIF (next step)
33 |
34 | ### Install Sitecore Install Framework (SIF)
35 |
36 | Installs Sitecore Install Framework from the newly registered Sitecore Gallery
37 |
38 | ### Install Prerequisites
39 |
40 | Uses the `Prerequisites.json` SIF configuration file from the `Prerequisites` folder to install the known Windows prerequisites for the version of Sitecore you are attempting to install.
41 |
42 | The `Prerequisites.json` file is coming from the zip package of the Sitecore version to install. It is updated every time this repo is modified to install a different Sitecore version.
43 |
44 | ## Next Steps
45 |
46 | [Installing Sitecore Experience Platform (XP)](../xp/readme.md)
47 |
48 | [Return to main docs index](../readme.md)
49 |
--------------------------------------------------------------------------------
/SecurityHardening/configuration/deploy-upload-filter.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "WebRoot": {
4 | "Type": "String",
5 | "DefaultValue": ""
6 | },
7 | "SiteName": {
8 | "Type": "String",
9 | "Reference": "SiteName"
10 | },
11 | "UploadFilterPackageUri": {
12 | "Type": "String",
13 | "Reference": "UploadFilterPackageUri"
14 | },
15 | "WorkingFolder": {
16 | "Type": "String",
17 | "Reference": "WorkingFolder"
18 | },
19 | "UploadFilterPackageFileName": {
20 | "Type": "String",
21 | "Reference": "UploadFilterPackageFileName"
22 | }
23 | },
24 | "Variables": {
25 | "Package.Destination": "[JoinPath(parameter('WorkingFolder'),parameter('UploadFilterPackageFileName'))]",
26 | "Site.PhysicalPath": "[JoinPath(parameter('WebRoot'),parameter('SiteName'))]"
27 | },
28 | "Tasks": {
29 | "DownloadPackage": {
30 | "Type": "DownloadFile",
31 | "Params": {
32 | "Source": "[parameter('UploadFilterPackageUri')]",
33 | "Destination": "[variable('Package.Destination')]"
34 | }
35 | },
36 | "ExtractPackage": {
37 | "Type": "Unpack",
38 | "Params": {
39 | "Source": "[variable('Package.Destination')]",
40 | "Destination": "[parameter('WorkingFolder')]"
41 | }
42 | },
43 | "UnzipFiles": {
44 | "Type": "Unpack",
45 | "Params": {
46 | "Source": "[JoinPath(parameter('WorkingFolder'),'package.zip')]",
47 | "Destination": "[parameter('WorkingFolder')]"
48 | }
49 | },
50 | "CopyFilesToWebRoot": {
51 | "Type": "Copy",
52 | "Params": {
53 | "Source": "[JoinPath(parameter('WorkingFolder'),'files\\*')]",
54 | "Destination": "[variable('Site.PhysicalPath')]"
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/remove-databaseuser.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SqlServer": {
4 | "Type": "string",
5 | "DefaultValue":"",
6 | "Description": "Name of SQL Server"
7 | },
8 | "SqlAdminUser": {
9 | "Type": "string",
10 | "DefaultValue": "",
11 | "Description": "SQL Admin user name"
12 | },
13 | "SqlAdminPassword": {
14 | "Type": "string",
15 | "DefaultValue":"",
16 | "Description": "SQL Admin user password"
17 | },
18 | "DatabasePrefix": {
19 | "Type": "string",
20 | "DefaultValue":"",
21 | "Description": "Sitecore database prefix (generally site prefix)"
22 | },
23 | "DatabaseSuffix": {
24 | "Type": "string",
25 | "DefaultValue":"",
26 | "Description": "Sitecore database suffix (ie: Core, Master)"
27 | },
28 | "Script": {
29 | "Type": "string",
30 | "DefaultValue": "DROP USER IF EXISTS [$(UserName)];USE master",
31 | "Description": "SQL Script to execute"
32 | },
33 | "UserName": {
34 | "Type": "string",
35 | "DefaultValue":"",
36 | "Description": "Name of user to remove"
37 | }
38 | },
39 | "Variables": {
40 | "Sql.DatabaseName": "[concat(parameter('DatabasePrefix'), '_', parameter('DatabaseSuffix'))]",
41 | "Sql.Variables": "[concat('Username=', parameter('UserName'))]"
42 | },
43 | "Tasks": {
44 | "RemoveUser": {
45 | "Type": "InvokeSqlcmd",
46 | "Params": {
47 | "ServerInstance": "[parameter('SqlServer')]",
48 | "UserName": "[parameter('SqlAdminUser')]",
49 | "Password": "[parameter('SqlAdminPassword')]",
50 | "Database": "[variable('Sql.DatabaseName')]",
51 | "Query": "[parameter('Script')]",
52 | "Variable": "[variable('Sql.Variables')]"
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/kill-database-connections.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SqlServer": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "Name of SQL Server"
7 | },
8 | "SqlAdminUser": {
9 | "Type": "string",
10 | "DefaultValue": "sa",
11 | "Description": "SQL Admin user name"
12 | },
13 | "SqlAdminPassword": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "SQL Admin user password"
17 | },
18 | "DatabasePrefix": {
19 | "Type": "string",
20 | "DefaultValue": "",
21 | "Description": "SQL Admin user password"
22 | }
23 | },
24 | "Variables": {
25 | "Core.Database.Suffix": "Core",
26 | "Master.Database.Suffix": "Master"
27 | },
28 | "Tasks": {
29 | "Write-Output":{
30 | "Type":"WriteInformation",
31 | "Params":{
32 | "MessageData":"[parameter('SqlServer')]"
33 | }
34 | },
35 | "KillCoreDatabaseConnections": {
36 | "Type": "KillDatabaseConnections",
37 | "Params": {
38 | "SqlServer": "[parameter('SqlServer')]",
39 | "SqlAdminUser": "[parameter('SqlAdminUser')]",
40 | "SqlAdminPassword": "[parameter('SqlAdminPassword')]",
41 | "DatabasePrefix": "[parameter('DatabasePrefix')]",
42 | "DatabaseSuffix": "[variable('Core.Database.Suffix')]"
43 | }
44 | },
45 | "KillMasterDatabaseConnections": {
46 | "Type": "KillDatabaseConnections",
47 | "Params": {
48 | "SqlServer": "[parameter('SqlServer')]",
49 | "SqlAdminUser": "[parameter('SqlAdminUser')]",
50 | "SqlAdminPassword": "[parameter('SqlAdminPassword')]",
51 | "DatabasePrefix": "[parameter('DatabasePrefix')]",
52 | "DatabaseSuffix": "[variable('Master.Database.Suffix')]"
53 | }
54 | }
55 | },
56 | "Settings": {
57 | "AutoRegisterExtensions": true
58 | }
59 | }
--------------------------------------------------------------------------------
/SecurityHardening/harden-security.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string]$siteName = "habitathome.dev.local",
3 | [string]$webRoot = "C:\inetpub\wwwroot"
4 | )
5 | ## Executes security hardening base on doc.sitecore.com recommendations
6 | ## For more details, visit the Security Guide: https://doc.sitecore.com/developers/91/platform-administration-and-architecture/en/security-guide.html
7 |
8 | $configurationPath = Resolve-Path .\configuration
9 | $assetsPath = Resolve-Path .\assets
10 |
11 | $sharedModulesPath = Resolve-Path ..\Shared\assets\modules
12 |
13 | Import-Module SitecoreInstallFramework -RequiredVersion 2.1.0
14 | Import-Module (Join-Path $sharedModulesPath 'SecurityHardening') -Force -Verbose
15 |
16 | # Folders that will have the "Anonymous Authentication" feature disabled in IIS
17 | # ref: https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/deny-anonymous-users-access-to-a-folder.html
18 | $foldersToDenyAnonymousAccess = @('App_Config', 'sitecore/admin', 'sitecore/debug','sitecore/login', 'sitecore/shell/WebService')
19 |
20 |
21 | #contains the list of files to .disable
22 | # ref: https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/disable-administrative-tools.html
23 | $IOActionPath = Join-Path $assetsPath "ioactions.xml"
24 |
25 | $uploadFilterPackageUri = "http://doc.sitecore.com/resources/upload-filter-1.0.0.2.zip"
26 |
27 | $workingFolder = Join-Path $assetsPath "work"
28 |
29 | if (!(Test-Path $workingFolder)) {
30 | New-Item -Path $workingFolder -ItemType Directory -Force
31 | }
32 |
33 | $uploadFilterPackageFileName = "upload-filter-1.0.0.2.zip"
34 |
35 | $params = @{
36 | WebRoot = $webRoot
37 | SiteName = $siteName
38 | FoldersToDisable = $foldersToDenyAnonymousAccess
39 | IOActionPath = $IOActionPath
40 | UploadFilterPackageUri = $uploadFilterPackageUri
41 | UploadFilterPackageFileName = $uploadFilterPackageFileName
42 | WorkingFolder = $workingFolder
43 | ConfigurationPatchPath = Resolve-Path .\assets\configs
44 | TransformSourcePath = Resolve-Path .\assets\transforms
45 | }
46 |
47 |
48 | Push-Location $configurationPath
49 | Install-SitecoreConfiguration -Path .\harden-security.json @params -Verbose
50 | Pop-Location
--------------------------------------------------------------------------------
/Shared/assets/configuration/add-database-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SqlServer": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "Name of SQL Server"
7 | },
8 | "SqlAdminUser": {
9 | "Type": "string",
10 | "DefaultValue": "sa",
11 | "Description": "SQL Admin user name"
12 | },
13 | "SqlAdminPassword": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "SQL Admin user password"
17 | },
18 | "Username": {
19 | "Type": "string",
20 | "DefaultValue": "",
21 | "Description": "SQL Admin user password"
22 | },
23 | "UserPassword": {
24 | "Type": "string",
25 | "DefaultValue": "",
26 | "Description": "SQL Admin user password"
27 | },
28 | "DatabasePrefix": {
29 | "Type": "string",
30 | "DefaultValue": "",
31 | "Description": "SQL Admin user password"
32 | },
33 | "DatabaseSuffix": {
34 | "Type": "string",
35 | "DefaultValue": "",
36 | "Description": "SQL Admin user password"
37 | },
38 | "IsCoreUser": {
39 | "Type": "boolean",
40 | "DefaultValue": false
41 | }
42 | },
43 | "Variables": {
44 | "Check.IsCoreUser": "[parameter('IsCoreUser')]",
45 | "Database.Suffix": "[parameter('DatabaseSuffix')]"
46 | },
47 | "Tasks": {
48 | "AddDatabaseUser": {
49 | "Type": "AddDatabaseUser",
50 | "Params": {
51 | "SqlServer": "[parameter('SqlServer')]",
52 | "SqlAdminUser": "[parameter('SqlAdminUser')]",
53 | "SqlAdminPassword": "[parameter('SqlAdminPassword')]",
54 | "Username": "[parameter('Username')]",
55 | "UserPassword": "[parameter('UserPassword')]",
56 | "DatabasePrefix": "[parameter('DatabasePrefix')]",
57 | "DatabaseSuffix": "[variable('Database.Suffix')]",
58 | "IsCoreUser": "[variable('Check.IsCoreUser')]"
59 | }
60 | }
61 | },
62 | "Settings":{
63 | "AutoRegisterExtensions":true
64 | }
65 | }
--------------------------------------------------------------------------------
/docs/readme.md:
--------------------------------------------------------------------------------
1 | # Sitecore.HabitatHome.Utilities
2 |
3 | ## Typical Installation Procedure
4 |
5 | 1. [Installing Prerequisites](prerequisites/readme.md)
6 | 2. [Installing Sitecore Experience Platform (XP)](xp/readme.md)
7 | 3. [Installing Modules](xp/installing-modules.md)
8 | 4. [Installing Experience Commerce (XC)](xc/readme.md)
9 |
10 | ## Additional Operations
11 |
12 | - [Warming Up a Sitecore Instance](warmup/readme.md)
13 |
14 | ## General Folder Descriptions
15 |
16 | ### Azure
17 |
18 | The Azure folder contains a set of scripts for managing Azure IaaS VMs. In particular:
19 |
20 | - Taking a snapshot of an existing VM
21 | - Creating a "master" VHD from the snapshot for use in replicating the "master"
22 | - Create VM from a stored VHD, complete with firewall configuration and auto-shutdown
23 |
24 | ### Prerequisites
25 |
26 | The Prerequisites folder contains helper scripts to get a Windows environment ready for the installation of Sitecore (XP and/or XC).
27 |
28 | See the [readme.md](prerequisites/readme.md) in the `prerequisites` doc folder for a detailed description and instructions.
29 |
30 | ### SecurityHardening
31 |
32 | The SecurityHardening folder contains _sample_ scripts to harden a Sitecore instance based on information available on doc.sitecore.com. They are used for illustration purposes only and users should validate these scripts against their own needs and environment prior to using them.
33 |
34 | ### Shared
35 |
36 | The Shared folder contains modules and SIF configurations to support functionality that is common across other HabitatHome Utilities folders.
37 |
38 | ### Warmup
39 |
40 | The Warmup folder contains a script to warmup a set of pages.
41 |
42 | See the [readme.md](warmup/readme.md) in the `warmup` doc folder for a detailed description and instructions.
43 |
44 | ### XC (Experience Commerce)
45 |
46 | The XC folder contains a set of scripts for installing Sitecore Experience Commerce 9 with all the required modules.
47 |
48 | See the [readme.md](xc/readme.md) in the `xc` doc folder for a detailed description and instructions.
49 |
50 | ### XP (Experience Platform)
51 |
52 | The XP folder contains a set of scripts for installing Sitecore Experience Platform 9 with all the required modules and certificates.
53 |
54 | See the [readme.md](xp/readme.md) in the `xp` doc folder for a detailed description and instructions.
55 |
--------------------------------------------------------------------------------
/Prerequisites/Install-IIS.ps1:
--------------------------------------------------------------------------------
1 | Set-ExecutionPolicy Bypass -Scope Process
2 |
3 | # To list all Windows Features: dism /online /Get-Features
4 | # Get-WindowsOptionalFeature -Online
5 |
6 | # LIST All IIS FEATURES:
7 | # Get-WindowsOptionalFeature -Online | where FeatureName -like 'IIS-*'
8 | $features=@(
9 | "IIS-WebServerRole",
10 | "IIS-WebServer",
11 | "IIS-CommonHttpFeatures",
12 | "IIS-HttpErrors",
13 | "IIS-HttpRedirect",
14 | "IIS-ApplicationDevelopment",
15 | "NetFx4Extended-ASPNET45",
16 | "IIS-NetFxExtensibility45",
17 | "IIS-HealthAndDiagnostics",
18 | "IIS-HttpLogging",
19 | "IIS-LoggingLibraries",
20 | "IIS-RequestMonitor",
21 | "IIS-HttpTracing",
22 | "IIS-Security",
23 | "IIS-RequestFiltering",
24 | "IIS-Performance",
25 | "IIS-WebServerManagementTools",
26 | "IIS-IIS6ManagementCompatibility",
27 | "IIS-Metabase",
28 | "IIS-ManagementConsole",
29 | "IIS-BasicAuthentication",
30 | "IIS-WindowsAuthentication",
31 | "IIS-StaticContent",
32 | "IIS-DefaultDocument",
33 | "IIS-WebSockets",
34 | "IIS-ApplicationInit",
35 | "IIS-ISAPIExtensions",
36 | "IIS-ISAPIFilter",
37 | "IIS-HttpCompressionStatic",
38 | "IIS-ASPNET45"
39 | )
40 |
41 | foreach ($feature in $features) {
42 | Write-Host "=======Installing $feature========" -foreground Green
43 | Enable-WindowsOptionalFeature -Online -FeatureName $feature -Verbose
44 | Write-Host "=======Installed $feature========" -foreground Green
45 | }
46 |
47 | #REM The following optional components require
48 | #REM Chocolatey OR Web Platform Installer to install
49 |
50 | #REM Install UrlRewrite Module for Extensionless Urls (optional)
51 | #REM & "C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" /install /Products:UrlRewrite2 /AcceptEULA /SuppressPostFinish
52 | Write-Host "=======Installing UrlRewrite========" -foreground Green
53 | choco install urlrewrite -y
54 | Write-Host "=======Installed UrlRewrite========" -foreground Green
55 |
56 | #REM Install WebDeploy for Deploying to IIS (optional)
57 | #REM & "C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" /install /Products:WDeployNoSMO /AcceptEULA /SuppressPostFinish
58 |
59 | Write-Host "=======Installing WebDeploy========" -foreground Green
60 | choco install webdeploy -y
61 | Write-Host "=======Installed WebDeploy========" -foreground Green
62 |
--------------------------------------------------------------------------------
/Shared/assets/configuration/sxa/sxa-installation-poststeps.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SolrUrl": {
4 | "Type": "string",
5 | "DefaultValue": "https://localhost:8721/solr",
6 | "Description": "The Solr instance url."
7 | },
8 | "SolrRoot": {
9 | "Type": "string",
10 | "DefaultValue": "c:\\solr\\solr-7.2.1",
11 | "Description": "The file path to the Solr instance."
12 | },
13 | "SolrService": {
14 | "Type": "string",
15 | "DefaultValue": "Solr-7.2.1",
16 | "Description": "The name of the Solr service."
17 | },
18 | "CorePrefix": {
19 | "Type": "string",
20 | "DefaultValue":"",
21 | "Description": "Solr Core Prefix"
22 | },
23 | "SitecoreAdminPassword": {
24 | "Type": "string",
25 | "DefaultValue":"",
26 | "Description": "Sitecore Admin password"
27 | },
28 | "ConfigureSXAIndexes:SolrUrl": {
29 | "Type": "string",
30 | "Reference": "SolrUrl"
31 | },
32 | "ConfigureSXAIndexes:SolrRoot": {
33 | "Type": "string",
34 | "Reference": "SolrRoot"
35 | },
36 | "ConfigureSXAIndexes:SolrService": {
37 | "Type": "string",
38 | "Reference": "SolrService"
39 | },
40 | "ConfigureSXAIndexes:CorePrefix": {
41 | "Type": "string",
42 | "Reference": "CorePrefix"
43 | },
44 | "ConfigureSXAIndexes:SiteName": {
45 | "Type": "string",
46 | "Reference": "SiteName"
47 | },
48 | "ConfigureSXAIndexes:SitecoreAdminPassword": {
49 | "Type": "string",
50 | "Reference": "SitecoreAdminPassword"
51 | },
52 | "ConfigureSXASearchIndexes:SitePrefix": {
53 | "Type": "string",
54 | "Reference": "CorePrefix"
55 | }
56 | },
57 | "Variables": {
58 | "ConfigureSXASearchIndexes:Site.PhysicalPath": "[joinpath(parameter('WebRoot'),parameter('SiteName'))]"
59 | },
60 | "Includes": {
61 | "ConfigureSXASearchIndexes": {
62 | "Source": ".\\sxa\\configure-search-indexes.json"
63 | },
64 | "ConfigureSXAIndexes": {
65 | "Source": ".\\sxa\\sxa-solr.json"
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/XP/install/Certificates/sitecore-ssl.json:
--------------------------------------------------------------------------------
1 | // -------------------------------------------------------------------------- //
2 | // Sitecore Install Framework - Sitecore SSL binding //
3 | // //
4 | // Run this configuration to install an SSL certificate on a website //
5 | // //
6 | // -------------------------------------------------------------------------- //
7 |
8 | {
9 | "Parameters": {
10 | "SiteName": {
11 | "Type": "string",
12 | "Description": "The name of the site to be deployed."
13 | },
14 | "WebRoot":{
15 | "Type":"string",
16 | "DefaultValue":"c:\\inetpub\\wwwroot",
17 | "Description":"The physical path of the configured Web Root for the environment"
18 | }
19 | },
20 | "Variables": {
21 | // The sites full path on disk
22 | "Site.PhysicalPath": "[concat(parameter('WebRoot'),'\\', parameter('SiteName'))]",
23 | "Site.DataFolder": "[joinpath(variable('Site.PhysicalPath'), 'App_Data')]"
24 | },
25 | "Tasks": {
26 | // Tasks are separate units of work in a configuration.
27 | // Each task is an action that will be completed when Install-SitecoreConfiguration is called.
28 | // By default, tasks are applied in the order they are declared.
29 | // Tasks may reference Parameters, Variables, and config functions.
30 |
31 | "StopWebsite": {
32 | // Stops the website if it is running.
33 | "Type": "ManageWebsite",
34 | "Params": {
35 | "Name": "[parameter('SiteName')]",
36 | "Action": "Stop"
37 | }
38 | },
39 | "CreateBindingsWithDevelopmentThumprint": {
40 | // Creates a new thumprint with a custom CA
41 | "Type": "AddWebFeatureSSL",
42 | "Params": {
43 | "HostName": "[parameter('SiteName')]",
44 | "OutputDirectory": "[variable('Site.DataFolder')]"
45 | }
46 | },
47 | "StartWebsite": {
48 | // Starts the website if it is stopped.
49 | "Type": "ManageWebsite",
50 | "Params": {
51 | "Name": "[parameter('SiteName')]",
52 | "Action": "Start"
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Shared/assets/Sitecore.Cloud.Integration.Bootload.InstallJob.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Sitecore.Cloud.Integration.Bootload.InstallJob.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/XC/install/set-installation-defaults.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $ConfigurationFile = "configuration-xc0.json",
3 | [string] $XPConfigurationFile = (Resolve-Path "..\..\xp\install\configuration-xp0.json")
4 | )
5 |
6 | Write-Host "Setting Defaults and creating $ConfigurationFile" -foregroundColor Green
7 |
8 | $json = Get-Content -Raw .\install-settings.json -Encoding Ascii | ConvertFrom-Json
9 | $assetsPath = Join-Path "$PWD" "assets"
10 | [System.Reflection.Assembly]::LoadFile($(Join-Path $assetsPath "Newtonsoft.Json.dll"))
11 | [System.Reflection.Assembly]::LoadFile($(Join-Path $assetsPath "JsonMerge.dll"))
12 | $installSettingsPath = $(Join-Path $PWD ".\install-settings.json" -Resolve)
13 | $json = [JsonMerge.JsonMerge]::MergeJson($XPConfigurationFile, $installSettingsPath ) | ConvertFrom-Json
14 |
15 | # Assets and prerequisites
16 |
17 | $assets = $json.assets
18 | $assets.root = "$PSScriptRoot\assets"
19 | $assets.downloadFolder = $assets.packageRepository
20 |
21 | #Commerce
22 | $assets.commerce.packageName = "Sitecore.Commerce.WDP.2020.01-5.0.145.zip"
23 | $assets.commerce.packageUrl = "https://dev.sitecore.net/~/media/B915EEE9B5C0429AB557C357E2B23EEA.ashx"
24 | $assets.commerce.installationFolder = Join-Path $assets.packageRepository "Commerce"
25 |
26 |
27 | #Commerce Files to Extract
28 | $sifCommerceVersion = $assets.commerce.filesToExtract | Where-Object { $_.name -eq "SIF.Sitecore.Commerce"}
29 | $sifCommerceVersion.version = "4.0.31"
30 |
31 | $assets.commerce.sifCommerceRoot = Join-Path $assets.commerce.installationFolder $($sifCommerceVersion.name + "." + $sifCommerceVersion.version)
32 |
33 | # Settings
34 | $site = $json.settings.site
35 | # Commerce Settings
36 | $commerce = $json.settings.commerce
37 | $commerce.engineConfigurationPath = ([IO.Path]::Combine($assets.root, "Resources","Configuration","Commerce","HabitatHome","set-engine-hostname.json"))
38 | $commerce.storefrontPrefix = $site.prefix
39 | $commerce.storefrontHostName = $commerce.storefrontPrefix + "." + $site.suffix
40 |
41 | $commerce.engineConnectClientId = "CommerceEngineConnect"
42 | $commerce.engineConnectClientSecret = "J6qfqaKX1hAFIUjiNCAV6jVolLqwhF4OgM6dHT7c9dk="
43 |
44 | $commerce.serviceAccountDomain = "$($Env:COMPUTERNAME)"
45 | $commerce.serviceAccountUserName = "CSFndRuntimeUser"
46 | $commerce.serviceAccountPassword = "Pu8azaCr"
47 | $commerce.brainTreeAccountMerchandId = ""
48 | $commerce.brainTreeAccountPublicKey = ""
49 | $commerce.brainTreeAccountPrivateKey = ""
50 | $commerce.brainTreeEnvironment = ""
51 |
52 | # Site Settings
53 | $site = $json.settings.site
54 |
55 | Write-Host
56 | Write-Host "Saving content to $ConfigurationFile" -ForegroundColor Green
57 | Set-Content $ConfigurationFile (ConvertTo-Json -InputObject $json -Depth 4 )
58 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/SXAStorefront/SXAStorefront.CreateDefaultTenantAndSite.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "Description": "The name of the site.",
6 | "DefaultValue": ""
7 | },
8 | "SiteRootUrl": {
9 | "Type": "string",
10 | "Description": "Site root url.",
11 | "DefaultValue": ""
12 | },
13 | "SitecoreUsername": {
14 | "Type": "string",
15 | "Description": "Sitecore Admin Username",
16 | "DefaultValue": ""
17 | },
18 | "SitecoreUserPassword": {
19 | "Type": "string",
20 | "Description": "Sitecore Admin Password",
21 | "DefaultValue": ""
22 | },
23 | "ProjectConfigIncludeDir": {
24 | "Type": "string",
25 | "Description": "Path of the config directory for project configurations.",
26 | "DefaultValue": ""
27 | },
28 | "SkipInstallDefaultStorefront": {
29 | "Type": "bool",
30 | "Description": "Boolean value to indicate whether default storefront should be installed or not.",
31 | "DefaultValue": false
32 | }
33 | },
34 | "Modules": [
35 | "SitecoreUtilityTasks"
36 | ],
37 | "Variables": {
38 | "Site.RootUrl": "[parameter('SiteRootUrl')]",
39 | "Sitecore.Username": "parameter('SitecoreUsername')" ,
40 | "Project.ConfigIncludeDir": "[parameter('ProjectConfigIncludeDir')]"
41 | },
42 | "Tasks": {
43 | "EnableSPEWebAPI": {
44 | "Skip": "[parameter('SkipInstallDefaultStorefront')]",
45 | "Type": "EnableConfigFiles",
46 | "Params": {
47 | "ConfigDir": "[variable('Project.ConfigIncludeDir')]",
48 | "ConfigFileList": [
49 | "z.Sitecore.Commerce.XA.SPE.WebAPI.Enabler.config"
50 | ]
51 | }
52 | },
53 | "RestartWebAppPoolOps": {
54 | "Skip": "[parameter('SkipInstallDefaultStorefront')]",
55 | "Type": "ManageAppPool",
56 | "Params": {
57 | "Name": "[parameter('SiteName')]",
58 | "Action": "restart"
59 | }
60 | },
61 | "CreateDefaultStorefront": {
62 | "Skip": "[parameter('SkipInstallDefaultStorefront')]",
63 | "Type": "CreateDefaultStorefront",
64 | "Params": {
65 | "BaseUrl": "[variable('Site.RootUrl')]",
66 | "SiteName": "",
67 | "SitecoreUsername": "[variable('Sitecore.Username')]",
68 | "SitecoreUserPassword": "[parameter('SitecoreUserPassword')]"
69 | }
70 | },
71 | "DisableSPEWebAPI": {
72 | "Skip": "[parameter('SkipInstallDefaultStorefront')]",
73 | "Type": "DisableConfigFiles",
74 | "Params": {
75 | "ConfigDir": "[variable('Project.ConfigIncludeDir')]",
76 | "ConfigFileList": [
77 | "z.Sitecore.Commerce.XA.SPE.WebAPI.Enabler.config"
78 | ]
79 | }
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/docs/xp/readme.md:
--------------------------------------------------------------------------------
1 | # Installation helpers for Sitecore Experience Platform (XP)
2 |
3 | ## Prerequisites
4 |
5 | These steps assume you have all of the prerequisites installed as detailed in the [instructions](../prerequisites/readme.md)
6 |
7 | ### Solr
8 |
9 | If you haven't already done so, you need to ensure you have the correct (supported) version of Solr installed.
10 |
11 | See [solr instructions](solr.md) for details.
12 |
13 | ## A bit about the process
14 |
15 | The `install-singledeveloper.ps1` script takes in a JSON configuration file (defaults to `.\configuration-xp0.json`) and runs through the entire platform installation.
16 |
17 | The `install-modules.ps1` script uses the same JSON configuration file as the `install-singledeveloper.ps1` script and installs optional modules.
18 |
19 | The `assets.json` file is used to manage which modules you would like to install. Make sure this file is configured correctly before you run the `set-installation-*.ps1` scripts.
20 |
21 | The `configuration-xp0.json` is generated by running two powershell scripts, `set-installation-defaults.ps1` and `set-installation-overrides.ps1`.
22 |
23 | The `set-installation-defaults.ps1` does what it sounds like - it creates the `configuration-xp0.json` file and populates it with the default values based on the version of the platform it was meant to support.
24 |
25 | The `set-installation-overrides.ps1.example` script needs to be copied and renamed to `set-installation-overrides.ps1` then modified to suit your needs. Executing it once it has been renamed will fill in the rest of the information in the `configuration-xp0.json` file as well as override some of the default values. This script should only be executed once after first running `set-installation-defaults.ps1`.
26 |
27 | ----------
28 |
29 | ## Installation
30 |
31 | ### 1. Preparing for Installation
32 |
33 | Just a couple of steps before we get started. Take a look at [preparing for installation](preparing-installation.md) before going any further.
34 |
35 | ### 2. Installing Sitecore XP
36 |
37 | Now that your configuration is set, [let's install!](installing-sitecore-xp.md)
38 |
39 | ### 3. Installing Modules
40 |
41 | If all went well, you have a successful installation of Sitecore XP. In order to support HabitatHome.Platform (SXA Demo) you need to install additional modules.
42 |
43 | Let's move onto the final step: [Installing Modules](installing-modules.md)
44 |
45 | > **KNOWN ISSUE:** Downloading large files take time and can sometimes encounter connection issues.
46 | > If this issue has occured you may get `Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.` error. In this case the download was **NOT** completed successfully.
47 | >
48 | > You should delete the partially downloaded file and try again or:
49 | >
50 | > **WORKAROUND:** Manually download the larger Sitecore WDP Package required and place it into the repository specified in `set-installation-defaults.ps1`.
51 |
52 | ## Next Steps
53 |
54 | [Warming up an Instance](../warmup/warmup.md)
55 |
56 | [Installing Experience Commerce (XC)](../xc/readme.md)
57 |
58 | [Return to main docs index](../readme.md)
59 |
--------------------------------------------------------------------------------
/XP/install/Add-SSLSiteBindingWithCertificate.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $ConfigurationFile = "configuration-xp0.json",
3 | [string] $SiteName,
4 | [string] $HostName,
5 | [string] $CertificateName,
6 | [int] $Port = 443,
7 | [switch] $SkipCreateCert,
8 | [switch] $SslOnly
9 | )
10 |
11 | #####################################################
12 | #
13 | # Install Sitecore
14 | #
15 | #####################################################
16 | $ErrorActionPreference = 'Stop'
17 | Set-Location $PSScriptRoot
18 |
19 | if (!(Test-Path $ConfigurationFile)) {
20 | Write-Host "Configuration file '$($ConfigurationFile)' not found." -ForegroundColor Red
21 | Write-Host "Please use 'set-installation...ps1' files to generate a configuration file." -ForegroundColor Red
22 | Exit 1
23 | }
24 | $config = Get-Content -Raw $ConfigurationFile | ConvertFrom-Json
25 | if (!$config) {
26 | throw "Error trying to load configuration!"
27 | }
28 |
29 |
30 | $site = $config.settings.site
31 | $assets = $config.assets
32 |
33 | function Install-Assets {
34 | Write-Host "Installing Assets"
35 | #Register Assets PowerShell Repository
36 | if ((Get-PSRepository | Where-Object {$_.Name -eq $assets.psRepositoryName}).count -eq 0) {
37 | Register-PSRepository -Name $assets.psRepositoryName -SourceLocation $assets.psRepository -InstallationPolicy Trusted
38 | }
39 |
40 | #Sitecore Install Framework dependencies
41 | Import-Module WebAdministration
42 |
43 | #Install SIF
44 | $module = Get-Module -FullyQualifiedName @{ModuleName = "SitecoreInstallFramework"; ModuleVersion = $assets.installerVersion}
45 | if (-not $module) {
46 | write-host "Installing the Sitecore Install Framework, version $($assets.installerVersion)" -ForegroundColor Green
47 | Install-Module SitecoreInstallFramework -RequiredVersion $assets.installerVersion -Repository $assets.psRepositoryName -Scope CurrentUser
48 | Import-Module SitecoreInstallFramework -RequiredVersion $assets.installerVersion
49 | }
50 |
51 | #Verify that manual assets are present
52 | if (!(Test-Path $assets.root)) {
53 | throw "$($assets.root) not found"
54 | }
55 | }
56 | function Add-SSLSiteBindingWithCertificate {
57 | try {
58 | $params = @{
59 | Path = $site.addSiteBindingWithSSLPath
60 | SiteName = $siteName
61 | WebRoot = $site.webRoot
62 | HostHeader = $HostName
63 | Port = $Port
64 | CertPath = $assets.certificatesPath
65 | CertificateName = $CertificateName
66 | Skip = @()
67 | }
68 | if ($SkipCreateCert) {
69 | $params.Skip += "CreatePaths", "CreateRootCert", "ImportRootCertificate", "CreateSignedCert"
70 | }
71 | if ($SslOnly) {
72 | $params.Skip += "CreateBindings"
73 | }
74 | Install-SitecoreConfiguration @params -WorkingDirectory $(Join-Path $PWD "logs") -Verbose
75 | }
76 | catch {
77 | write-host "Sitecore Setup Failed" -ForegroundColor Red
78 | throw
79 | }
80 | }
81 |
82 | Install-Assets
83 | Add-SSLSiteBindingWithCertificate
--------------------------------------------------------------------------------
/SecurityHardening/assets/transforms/web.config.xdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SecurityHardening/assets/ioactions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Prerequisites/Install-ChocoPackages.ps1:
--------------------------------------------------------------------------------
1 | function InstallNugetPackageProvider{
2 | Write-Host "===========================Install-PackageProvider===========================" -foreground Green
3 | #PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories.
4 | Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
5 | }
6 |
7 | function InstallOrUpdateChocoPackages {
8 | [xml]$xml = Get-Content .\choco-packages.config
9 |
10 | # $packages = @(
11 | # #Format: (id, version)
12 | # ('googlechrome', ''),
13 | # ('git', ''),
14 | # ('NuGet.CommandLine', ''),
15 | # ('7zip', ''),
16 | # ('nodejs.install', ''),
17 | # ('vscode', ''),
18 | # ('vscode-powershell', ''),
19 | # ('vscode-csharp', ''),
20 | # ('jre8', ''),
21 | # #('urlrewrite', ''), #installed inside '\Install-IIS.ps1'
22 | # ('snaketail', '')
23 | # )
24 |
25 | $installedPackages = choco list -lo
26 | $xml.packages.package | Foreach-Object {
27 | $packageId = $_.id.ToLower()
28 | $packageVersion = $_.version
29 | $installedPackage = $installedPackages | Where-object { $_.ToLower().StartsWith($packageId + ' ') }
30 |
31 | $installedVersion = ''
32 | if (![string]::IsNullOrEmpty($installedPackage)) {
33 | $installedVersion = $installedPackage.Split(' ')[1]
34 | }
35 | Write-Host "InstallOrUpdateChocoPackage -packageId $package[0] -version $package[1] -installedVersion $installedVersion"
36 | InstallOrUpdateChocoPackage -packageId $packageId -version $packageVersion -installedVersion $installedVersion
37 | }
38 | }
39 |
40 | <#
41 | InstallOrUpdateChocoPackage
42 | #>
43 | function InstallOrUpdateChocoPackage {
44 | param (
45 | [string]$packageId,
46 | [string]$version,
47 | [string]$installedVersion
48 | )
49 |
50 | if ([string]::IsNullOrEmpty($installedVersion)) {
51 | #if no version is installed
52 | if ([string]::IsNullOrEmpty($version)) {
53 | #if not require specified version, intall latest version
54 | choco install $packageId -y --accept-license -Verbose
55 | }
56 | else {
57 | #install specified version
58 | choco install $packageId -version $version -y --accept-license -Verbose
59 | }
60 | return
61 | }
62 | #if already installed a version, check update
63 | if ([string]::IsNullOrEmpty($version)) {
64 | #if not require specified version, upgrade to latest
65 | choco upgrade $packageId -y --accept-license -Verbose
66 | return
67 | }
68 | #if a version installed, and required version is specified
69 |
70 | if ($version -lt $installedVersion) {
71 | #if need a older version
72 | Write-Host "the required version of module $packageId is $version, but a newer version $installedVersion is already installed." -foreground Yellow
73 | return
74 |
75 | }
76 | elseif ($version -gt $installedVersion) {
77 | #if need a new version
78 | choco upgrade $packageId -version $version -y --accept-license -Verbose
79 | return
80 | }
81 | else {
82 | # do nothing if already same version
83 | }
84 | }
85 |
86 | InstallNugetPackageProvider
87 | InstallOrUpdateChocoPackages
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Connect/Connect.CopyModels.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "InstallDir": {
4 | "Type": "string",
5 | "Description": "Destination of the web site's root folder.",
6 | "DefaultValue": ""
7 | },
8 | "XConnectInstallDir": {
9 | "Type": "string",
10 | "Description": "Destination of the xConnect web site's root folder.",
11 | "DefaultValue": ""
12 | }
13 | },
14 | "Variables": {
15 | "XConnectModelSrc": "[joinpath(parameter('InstallDir'), '\\XConnectFiles\\Models\\Sitecore.Commerce.Connect.XConnect.Models.json')]",
16 | "XConnectDst": "[joinpath(parameter('XConnectInstallDir'), '\\App_data\\Models')]",
17 | "IndexWorkerDst": "[joinpath(parameter('XConnectInstallDir'), '\\App_data\\jobs\\continuous\\IndexWorker\\App_data\\Models')]",
18 |
19 | "XConnectModelDllSrc": "[joinpath(parameter('InstallDir'), '\\bin\\Sitecore.Commerce.Connect.Collection.Model.dll')]",
20 | "XConnectBinDst": "[joinpath(parameter('XConnectInstallDir'), '\\bin')]",
21 |
22 | "XConnectPluginsConfigSrc": "[joinpath(parameter('InstallDir'), '\\XConnectFiles\\Configs\\sc.XConnect.Collection.Model.Commerce.Plugins.xml')]",
23 | "XconnectPluginsConfigDst": "[joinpath(parameter('XConnectInstallDir'), '\\App_Data\\Config\\Sitecore\\Collection')]",
24 |
25 | "XConnectPredicateConfigSrc": "[joinpath(parameter('InstallDir'), '\\XConnectFiles\\Configs\\sc.XConnect.Segmentation.Commerce.Predicates.xml')]",
26 | "XconnectPredicateConfigDst": "[joinpath(parameter('XConnectInstallDir'), '\\App_Data\\jobs\\continuous\\AutomationEngine\\App_Data\\Config\\sitecore\\Segmentation')]",
27 |
28 | "Services.MarketingAutomationEngine.Name": "[concat(parameter('SiteName'), '_xconnect-MarketingAutomationService')]"
29 |
30 | },
31 | "Tasks": {
32 | "StopServices": {
33 | "Description": "Stops the services if they running.",
34 | "Type": "ManageService",
35 | "Params": [
36 | {
37 | "Name": "[variable('Services.MarketingAutomationEngine.Name')]",
38 | "Status": "Stopped",
39 | "PostDelay": 3000
40 | }
41 | ]
42 | },
43 | "CopyModelsToXConnect": {
44 | "Type": "Copy",
45 | "Params": {
46 | "Source": "[variable('XConnectModelSrc')]",
47 | "Destination": "[variable('XConnectDst')]"
48 | }
49 | },
50 | "CopyModelsToIndexWorker": {
51 | "Type": "Copy",
52 | "Params": {
53 | "Source": "[variable('XConnectModelSrc')]",
54 | "Destination": "[variable('IndexWorkerDst')]"
55 | }
56 | },
57 | "CopyXConnectPluginConfigFiles": {
58 | "Type": "Copy",
59 | "Params": {
60 | "Source": "[variable('XConnectPluginsConfigSrc')]",
61 | "Destination": "[variable('XconnectPluginsConfigDst')]"
62 | }
63 | },
64 | "CopyXConnectPredicateConfigFiles": {
65 | "Type": "Copy",
66 | "Params": {
67 | "Source": "[variable('XConnectPredicateConfigSrc')]",
68 | "Destination": "[variable('XconnectPredicateConfigDst')]"
69 | }
70 | },
71 | "CopyModelDllToXConnect": {
72 | "Type": "Copy",
73 | "Params": {
74 | "Source": "[variable('XConnectModelDllSrc')]",
75 | "Destination": "[variable('XConnectBinDst')]"
76 | }
77 | },
78 | "StartServices": {
79 | "Description": "Starts the service.",
80 | "Type": "ManageService",
81 | "Params": [
82 | {
83 | "Name": "[variable('Services.MarketingAutomationEngine.Name')]",
84 | "Status": "Running"
85 | }
86 | ]
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/XP/install/Certificates/solr-ssl.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | [string]$KeystoreFile = 'solr-ssl.keystore.jks',
3 | [string]$KeystorePassword = 'secret',
4 | [string]$SolrDomain = 'localhost',
5 | [switch]$Clobber
6 | )
7 |
8 | $ErrorActionPreference = 'Stop'
9 |
10 | ### PARAM VALIDATION
11 | if($KeystorePassword -ne 'secret') {
12 | Write-Error 'The keystore password must be "secret", because Solr apparently ignores the parameter'
13 | }
14 |
15 | if((Test-Path $KeystoreFile)) {
16 | if($Clobber) {
17 | Write-Host "Removing $KeystoreFile..."
18 | Remove-Item $KeystoreFile
19 | } else {
20 | $KeystorePath = Resolve-Path $KeystoreFile
21 | Write-Error "Keystore file $KeystorePath already existed. To regenerate it, pass -Clobber."
22 | }
23 | }
24 |
25 | $P12Path = [IO.Path]::ChangeExtension($KeystoreFile, 'p12')
26 | if((Test-Path $P12Path)) {
27 | if($Clobber) {
28 | Write-Host "Removing $P12Path..."
29 | Remove-Item $P12Path
30 | } else {
31 | $P12Path = Resolve-Path $P12Path
32 | Write-Error "Keystore file $P12Path already existed. To regenerate it, pass -Clobber."
33 | }
34 | }
35 |
36 | try {
37 | $keytool = (Get-Command 'keytool.exe').Source
38 | } catch {
39 | try {
40 | $path = $Env:JAVA_HOME + '\bin\keytool.exe'
41 | Write-Host $path
42 | if (Test-Path $path) {
43 | $keytool = (Get-Command $path).Source
44 | }
45 | } catch {
46 | $keytool = Read-Host "keytool.exe not on path. Enter path to keytool (found in JRE bin folder)"
47 |
48 | if([string]::IsNullOrEmpty($keytool) -or -not (Test-Path $keytool)) {
49 | Write-Error "Keytool path was invalid."
50 | }
51 | }
52 | }
53 |
54 | ### DOING STUFF
55 |
56 | Write-Host ''
57 | Write-Host 'Generating JKS keystore...'
58 | & $keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass $KeystorePassword -storepass $KeystorePassword -validity 9999 -keystore $KeystoreFile -ext SAN=DNS:$SolrDomain,IP:127.0.0.1 -dname "CN=$SolrDomain, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country"
59 |
60 | Write-Host ''
61 | Write-Host 'Generating .p12 to import to Windows...'
62 | & $keytool -importkeystore -srckeystore $KeystoreFile -destkeystore $P12Path -srcstoretype jks -deststoretype pkcs12 -srcstorepass $KeystorePassword -deststorepass $KeystorePassword
63 |
64 | Write-Host ''
65 | Write-Host 'Trusting generated SSL certificate...'
66 | $secureStringKeystorePassword = ConvertTo-SecureString -String $KeystorePassword -Force -AsPlainText
67 | $root = Import-PfxCertificate -FilePath $P12Path -Password $secureStringKeystorePassword -CertStoreLocation Cert:\LocalMachine\Root
68 | Write-Host 'SSL certificate is now locally trusted. (added as root CA)'
69 |
70 | Write-Host ''
71 | Write-Host '########## NEXT STEPS ##########' -ForegroundColor Green
72 | Write-Host ''
73 | Write-Host '1. Copy your keystore to $SOLR_HOME\server\etc (MUST be here)' -ForegroundColor Green
74 |
75 | if(-not $KeystoreFile.EndsWith('solr-ssl.keystore.jks')) {
76 | Write-Warning 'Your keystore file is not named "solr-ssl.keystore.jks"'
77 | Write-Warning 'Solr requires this exact name, so make sure to rename it before use.'
78 | }
79 |
80 | $KeystorePath = Resolve-Path $KeystoreFile
81 | Write-Host ''
82 | Write-Host '2. Add the following lines to your solr.in.cmd:' -ForegroundColor Green
83 | Write-Host ''
84 | Write-Host "set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks" -ForegroundColor Yellow
85 | Write-Host "set SOLR_SSL_KEY_STORE_PASSWORD=$KeystorePassword" -ForegroundColor Yellow
86 | Write-Host "set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks" -ForegroundColor Yellow
87 | Write-Host "set SOLR_SSL_TRUST_STORE_PASSWORD=$KeystorePassword" -ForegroundColor Yellow
88 | Write-Host ''
89 | Write-Host 'Done!'
--------------------------------------------------------------------------------
/docs/xp/preparing-installation.md:
--------------------------------------------------------------------------------
1 | # Preparing Installation Configuration
2 |
3 | ## Assets
4 |
5 | Review the `assets.json` file to ensure everything is configured correctly.
6 |
7 | By default, only the SPE and SXA modules get installed automatically. If you would like to install additional modules you will need to set the appropriate flags in this file. See [installing-modules.md](installing-modules.md) for more details.
8 |
9 | ## Setting up Defaults
10 |
11 | Many settings in the Sitecore XP installation don't need to be changed. `set-installation-defaults.ps1` takes care of the most common settings. Don't worry, you can still override many settings to make the installation your own in the next step!
12 |
13 | ```powershell
14 | .\set-installation-defaults.ps1
15 | ```
16 |
17 | ### Parameters
18 |
19 | All paremeters listed below are optional and have defaults configured (see each one below for default value).
20 |
21 | - `ConfigurationFile`:
22 | - Default Value: `.\configuration-xp0.json`
23 | - Specify your own configuration file name if you would like to manage multiple configurations. This is useful when trying to maintain side-by-side Sitecore instances/installations. If you're simply trying to install this for the first time, the default file is set.
24 | - `assetsRoot`:
25 | - Default Value: `$PSScriptRoot\assets`
26 | - Unless you're modifying this for advanced scenarios, leave this one alone.
27 | - `packageRepository`:
28 | - Default value: `.\assets`
29 | - **Important** - This location is where Sitecore installation assets are downloaded and extracted. Ensure the location you choose is acceptable.
30 | - If you already have Sitecore assets downloaded you can move them to the location you specify here.
31 | - It is also the location where you should place your `license.xml` file.
32 | - `sitecoreVersion`:
33 | - Default Value: Currently released product version.
34 | - This is normally set during branching/upgrade and shouldn't need to be modified.
35 |
36 | ### License File
37 |
38 | Copy your license file to the `packageRepository` folder you specified above.
39 |
40 | ```powershell
41 | copy license.xml c:\sitecore-repository
42 | ```
43 |
44 | ## Overriding Default Settings
45 |
46 | Now that we have some defaults configured, let's override some settings to match your local configuration.
47 |
48 | - Make a copy of `set-installation-overrides.ps1.example` file and rename it to remove the .example extension ie: `set-installation-overrides.ps1`.
49 | - We avoid simply renaming the file from .example to .ps1 since it causes changes in source control.
50 |
51 | ```powershell
52 | copy set-installation-overrides.ps1.example set-installation-overrides.ps1
53 | ```
54 |
55 | - Edit **`set-installation-overrides.ps1`** to set the Site, Solr and SQL settings relevant to your environment.
56 | - Apply overrides
57 |
58 | ```powershell
59 | .\set-installation-overrides.ps1
60 | ```
61 |
62 | > **NOTE**: Remember to always execute `set-installation-defaults.ps1` prior to executing `set-installation-overrides.ps1`
63 |
64 | ### Override Parameters
65 |
66 | - `ConfigurationFile`: Specify the configuration file you've set when calling `set-installation-defaults.ps1` or don't specify if you left the default (`configuration-xp0.json`).
67 | - `prefix`: What would you like to call your site. The default is _habitathome_ but it can be anything you want.
68 | > **NOTE**: The default suffix is **dev.local**. Your site will be **_your-prefix_**.dev.local
69 | - `assetsJsonPath`: The default is `assets.json` but this allows you to create your own list of assets.json files to be used.
70 |
71 | ## Next Steps
72 |
73 | [Continue to Next Step (Installing Sitecore XP)](installing-sitecore-xp.md)
74 |
75 | [Return to Index](readme.md)
76 |
77 | [Return to main docs index](../readme.md)
78 |
--------------------------------------------------------------------------------
/XC/install/Set-CommerceEngineHostName.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $ConfigurationFile = "configuration-xc0.json",
3 | [string] $CertificateName,
4 | [string] $HostName
5 | )
6 |
7 | #####################################################
8 | #
9 | # Install Sitecore
10 | #
11 | #####################################################
12 | $ErrorActionPreference = 'Stop'
13 | Set-Location $PSScriptRoot
14 |
15 | if (!(Test-Path $ConfigurationFile)) {
16 | Write-Host "Configuration file '$($ConfigurationFile)' not found." -ForegroundColor Red
17 | Write-Host "Please use 'set-installation...ps1' files to generate a configuration file." -ForegroundColor Red
18 | Exit 1
19 | }
20 | $config = Get-Content -Raw $ConfigurationFile | ConvertFrom-Json
21 | if (!$config) {
22 | throw "Error trying to load configuration!"
23 | }
24 |
25 | #$carbon = Get-Module Carbon
26 | #if (-not $carbon) {
27 | # Write-Host "Installing latest version of Carbon" -ForegroundColor Green
28 | # Install-Module -Name Carbon -Repository PSGallery -AllowClobber -Verbose
29 | # Import-Module Carbon
30 | #}
31 |
32 | $engineSites = @("CommerceAuthoring_{0}:5000", "CommerceMinions_{0}:5010", "CommerceOps_{0}:5015", "CommerceShops_{0}:5005", "SitecoreBizFx_{0}:4200", "SitecoreIdentityServer_{0}:5050")
33 |
34 | $site = $config.settings.site
35 | $assets = $config.assets
36 | $commerce = $config.settings.commerce
37 | $resourcePath = Join-Path $assets.root "Resources"
38 |
39 | function Install-Assets {
40 | #Register Assets PowerShell Repository
41 | if ((Get-PSRepository | Where-Object {$_.Name -eq $assets.psRepositoryName}).count -eq 0) {
42 | Register-PSRepository -Name $assets.psRepositoryName -SourceLocation $assets.psRepository -InstallationPolicy Trusted
43 | }
44 |
45 | #Sitecore Install Framework dependencies
46 | Import-Module WebAdministration
47 |
48 | #Install SIF
49 | $module = Get-Module -FullyQualifiedName @{ModuleName = "SitecoreInstallFramework"; ModuleVersion = $assets.installerVersion}
50 | if (-not $module) {
51 | write-host "Installing the Sitecore Install Framework, version $($assets.installerVersion)" -ForegroundColor Green
52 | Install-Module SitecoreInstallFramework -RequiredVersion $assets.installerVersion -Repository $assets.psRepositoryName -Scope CurrentUser
53 | Import-Module SitecoreInstallFramework -RequiredVersion $assets.installerVersion
54 | }
55 |
56 | #Verify that manual assets are present
57 | if (!(Test-Path $assets.root)) {
58 | throw "$($assets.root) not found"
59 | }
60 | }
61 | function Add-CommerceAdditionalBindings {
62 | # Get Thumbprint
63 | foreach ($engineSite in $engineSites) {
64 | $engineSite = ($engineSite -f $site.prefix)
65 | $siteName = $engineSite.Split(":")[0]
66 | $port = $engineSite.Split(":")[1]
67 |
68 | #Write-Host $sitename
69 | try {
70 | $params = @{
71 | Path = $commerce.engineConfigurationPath
72 | SSLCert = $CertificateName
73 | SiteName = $siteName
74 | HostHeader = $HostName
75 | Port = $port
76 | }
77 |
78 | Install-SitecoreConfiguration @params -WorkingDirectory $(Join-Path $PWD "logs") -Verbose
79 | }
80 | catch {
81 | write-host "Sitecore Setup Failed" -ForegroundColor Red
82 | throw
83 | }
84 | }
85 | }
86 | Function Set-ModulesPath {
87 | Write-Host "Setting Modules Path" -ForegroundColor Green
88 | $modulesPath = ( Join-Path -Path $resourcePath -ChildPath "Modules" )
89 | if ($env:PSModulePath -notlike "*$modulesPath*") {
90 | $p = $env:PSModulePath + ";" + $modulesPath
91 | [Environment]::SetEnvironmentVariable("PSModulePath", $p)
92 | }
93 | }
94 |
95 | Set-ModulesPath
96 | Install-Assets
97 | Add-CommerceAdditionalBindings
98 |
--------------------------------------------------------------------------------
/XP/install/Uninstall/Uninstall.psm1:
--------------------------------------------------------------------------------
1 | $ErrorActionPreference = "Stop"
2 |
3 | [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
4 | Import-Module SitecoreInstallFramework
5 | Import-Module Carbon
6 |
7 | function Get-SitecoreDatabase(
8 | [parameter(Mandatory=$true)]$SqlServer,
9 | [parameter(Mandatory=$true)]$SqlAdminUser,
10 | [parameter(Mandatory=$true)]$SqlAdminPassword
11 | ) {
12 | $databaseServer = New-Object Microsoft.SqlServer.Management.Smo.Server($SqlServer)
13 | $databaseServer.ConnectionContext.LoginSecure = $false
14 | $databaseServer.ConnectionContext.Login = $SqlAdminUser
15 | $databaseServer.ConnectionContext.Password = $SqlAdminPassword
16 | $databases = $databaseServer.Databases
17 | return $databaseServer
18 | }
19 |
20 |
21 | function Remove-SitecoreDatabase(
22 | [parameter(Mandatory=$true)] $Name,
23 | [parameter(Mandatory=$true)] $Server
24 | ) {
25 | if ($Server.Databases[$Name]) {
26 | $Server.KillDatabase($Name)
27 | Write-Host "Database ($Name) is dropped" -ForegroundColor Green
28 | }
29 | else {
30 | Write-Host "Could not find database ($Name)" -ForegroundColor Yellow
31 | }
32 | }
33 |
34 | function Remove-SitecoreSolrCore(
35 | [parameter(Mandatory=$true)]$coreName,
36 | [parameter(Mandatory=$true)]$root) {
37 |
38 | $coreRootPath = Join-Path $root "server\solr"
39 | $corePath = Join-Path $coreRootPath $coreName
40 | Write-Host $corePath
41 | if (Test-Path $corePath) {
42 | Remove-Item $corePath -Force -Recurse
43 | Write-Host "Solr Core $coreName, ($corePath) is removed" -ForegroundColor Green
44 | }
45 | else {
46 | Write-Host "Could not find Solr Core $coreName, ($corePath)" -ForegroundColor Yellow
47 | }
48 | }
49 |
50 | function Remove-SitecoreCertificate($certificateName) {
51 |
52 | $cert = Get-ChildItem -Path "cert:\LocalMachine\My" | Where-Object { $_.subject -like "CN=$certificateName" }
53 | if ($cert -and $cert.Thumbprint) {
54 | $certPath = "cert:\LocalMachine\My\" + $cert.Thumbprint
55 | Remove-Item $certPath
56 | Write-Host "Removing certificate $certificateName ($certPath)" -ForegroundColor Green
57 | }
58 | else {
59 | Write-Host "Could not find certificate $certificateName under cert:\LocalMachine\My" -ForegroundColor Yellow
60 | }
61 | }
62 |
63 | function Remove-SitecoreWindowsService($name) {
64 | if (Get-Service $name -ErrorAction SilentlyContinue) {
65 | Uninstall-Service $name
66 | Write-Host "Windows service $name is uninstalled" -ForegroundColor Green
67 | }
68 | else {
69 | Write-Host "Could not find windows service $name" -ForegroundColor Yellow
70 | }
71 | }
72 |
73 |
74 | function Remove-SitecoreIisSite($name) {
75 | # Delete site
76 | if (Get-IisWebsite $name) {
77 | Uninstall-IisWebsite $name
78 | Write-Host "IIS site $name is uninstalled" -ForegroundColor Green
79 | }
80 | else {
81 | Write-Host "Could not find IIS site $name" -ForegroundColor Yellow
82 | }
83 |
84 | # Delete app pool
85 | if (Get-IisAppPool $name) {
86 | Uninstall-IisAppPool $name
87 | Write-Host "IIS App Pool $name is uninstalled" -ForegroundColor Green
88 | }
89 | else {
90 | Write-Host "Could not find IIS App Pool $name" -ForegroundColor Yellow
91 | }
92 | }
93 |
94 | function Remove-SitecoreFiles($path) {
95 | # Delete site
96 | if (Test-Path($path)) {
97 | Remove-Item $path -Recurse -Force
98 | Write-Host "Removing files $path" -ForegroundColor Green
99 | }
100 | else {
101 | Write-Host "Could not find files $path" -ForegroundColor Yellow
102 | }
103 | }
104 |
105 | function Remove-SitecoreDatabaseLogin($Server, $Name){
106 |
107 | if ($Server.Logins.Contains($Name)){
108 | $Server.Logins[$Name].Drop()
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/CEConnect/CEConnect.InitializeCommerce.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "EngineConnectIncludeDir": {
4 | "Type": "string",
5 | "Description": "The path to the Engine Connect App_Config directory",
6 | "DefaultValue": ""
7 | },
8 | "CommerceInstallRoot": {
9 | "Type": "string",
10 | "Description": "The root path of commerce services.",
11 | "DefaultValue": ""
12 | },
13 | "CommerceServicesPostfix": {
14 | "Type": "string",
15 | "Description": "The Commerce Engine postfix for services names",
16 | "DefaultValue": ""
17 | },
18 | "CommerceServicesHostPostfix": {
19 | "Type": "string",
20 | "Description": "The postfix for Commerce Engine services host names",
21 | "DefaultValue": ""
22 | },
23 | "CommerceAuthoringServicesPort": {
24 | "Type": "string",
25 | "Description": "Commerce Authoring Services port",
26 | "DefaultValue": ""
27 | },
28 | "CommerceMinionsServicesPort": {
29 | "Type": "string",
30 | "Description": "Commerce Minions Services port",
31 | "DefaultValue": ""
32 | },
33 | "SitecoreIdentityServerUrl": {
34 | "Type": "string",
35 | "Description": "Sitecore IDServer url",
36 | "DefaultValue": ""
37 | },
38 | "CommerceEngineConnectClientId": {
39 | "Type": "string",
40 | "Description": "Commerce Engine Connect Client Id for Sitecore IDServer",
41 | "DefaultValue": ""
42 | },
43 | "CommerceEngineConnectClientSecret": {
44 | "Type": "string",
45 | "Description": "Commerce Engine Connect Client Secret for Sitecore IDServer",
46 | "DefaultValue": ""
47 | }
48 | },
49 | "Variables": {
50 | "EngineConnect.IncludeDir": "[parameter('EngineConnectIncludeDir')]",
51 |
52 | "CommerceOps": "[concat('CommerceOps_', parameter('CommerceServicesPostfix'))]",
53 | "CommerceShops": "[concat('CommerceShops_', parameter('CommerceServicesPostfix'))]",
54 | "CommerceAuthoring": "[concat('CommerceAuthoring_', parameter('CommerceServicesPostfix'))]",
55 | "CommerceMinions": "[concat('CommerceMinions_', parameter('CommerceServicesPostfix'))]",
56 | "CommerceOpsPhysicalPath": "[joinpath(parameter('CommerceInstallRoot'), variable('CommerceOps'))]",
57 | "CommerceShopsPhysicalPath": "[joinpath(parameter('CommerceInstallRoot'), variable('CommerceShops'))]",
58 | "CommerceAuthoringPhysicalPath": "[joinpath(parameter('CommerceInstallRoot'), variable('CommerceAuthoring'))]",
59 | "CommerceMinionsPhysicalPath": "[joinpath(parameter('CommerceInstallRoot'), variable('CommerceMinions'))]",
60 | "CE.ClientSecret": "[parameter('CommerceEngineConnectClientSecret')]"
61 | },
62 | "Modules": [
63 | "InitializeCommerce"
64 | ],
65 | "Tasks": {
66 | "UpdateHostnames": {
67 | "Skip": "[not(parameter('CommerceServicesHostPostfix'))]",
68 | "Type": "UpdateHostnames",
69 | "Params": {
70 | "EngineConnectIncludeDir": "[variable('EngineConnect.IncludeDir')]",
71 | "CommerceServicesHostPostfix": "[parameter('CommerceServicesHostPostfix')]"
72 | }
73 | },
74 | "UpdateIdServerSettings": {
75 | "Type": "UpdateIdServerSettings",
76 | "Params": {
77 | "EngineConnectIncludeDir": "[variable('EngineConnect.IncludeDir')]",
78 | "SitecoreIdentityServerUrl": "[parameter('SitecoreIdentityServerUrl')]",
79 | "CommerceEngineConnectClientId": "[parameter('CommerceEngineConnectClientId')]",
80 | "CommerceEngineConnectClientSecret": "[variable('CE.ClientSecret')]"
81 | }
82 | },
83 | "UpdatePorts": {
84 | "Skip": "[parameter('CommerceServicesHostPostfix')]",
85 | "Type": "UpdatePorts",
86 | "Params": {
87 | "EngineConnectIncludeDir": "[variable('EngineConnect.IncludeDir')]",
88 | "CommerceAuthoringServicesPort": "[parameter('CommerceAuthoringServicesPort')]",
89 | "CommerceMinionsServicesPort": "[parameter('CommerceMinionsServicesPort')]"
90 | }
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/XP/install/assets/configuration/XP0/createcert.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "CertificateName": {
4 | "Type": "String",
5 | "Description": "The name of the certificate to be created.",
6 | "DefaultValue": ""
7 | },
8 | "CertPath": {
9 | "Type": "String",
10 | "Description": "The physical path on disk where certificates will be stored.",
11 | "DefaultValue": "C:\\certificates"
12 | },
13 | "RootCertFileName": {
14 | "Type": "String",
15 | "Description": "The file name of the root certificate to be created.",
16 | "DefaultValue": "SitecoreRootCert"
17 | },
18 | "ExportPassword": {
19 | "Type": "String",
20 | "Description": "Password to export certificates with.",
21 | "DefaultValue": "SIF-Default"
22 | }
23 | },
24 | "Variables": {
25 | "Root.Cert.DnsName": "[concat('DO_NOT_TRUST_', parameter('RootCertFileName'))]",
26 | "Root.Cert.Store": "Cert:\\LocalMachine\\Root",
27 | "Client.Cert.Store": "Cert:\\LocalMachine\\My",
28 | "Export.Password": "[if(variable('User.Supplied.Password'),variable('Secure.Password'),variable('Convert.User.Password'))]",
29 | "User.Supplied.Password": "[equal(parameter('ExportPassword'),'SIF-Default')]",
30 | "Secure.Password": "[ConvertToSecureString(String:variable('Password.String'),AsPlainText:true,Force:true)]",
31 | "Password.String": "[RandomString(Length:20,EnforceComplexity:True)]",
32 | "Convert.User.Password": "[ConvertToSecureString(String:parameter('ExportPassword'),AsPlainText:true,Force:true)]"
33 | },
34 | "Register": {
35 | "Tasks": {
36 | "WriteInformation": "Write-Information"
37 | },
38 | "ConfigFunction": {
39 | "ConvertToSecureString": "ConvertTo-SecureString"
40 | }
41 | },
42 | "Tasks": {
43 | "CreatePaths": {
44 | "Description": "Create the physical disk path.",
45 | "Type": "EnsurePath",
46 | "Params": {
47 | "Exists": [
48 | "[parameter('CertPath')]"
49 | ]
50 | }
51 | },
52 | "DisplayPassword": {
53 | "Description": "Print password if the user hasn't supplied their own.",
54 | "Type": "WriteInformation",
55 | "Params": {
56 | "Messagedata": "[concat('Certificate Password: ',variable('Password.String'))]",
57 | "InformationAction": "Continue"
58 | },
59 | "Skip": "[not(variable('User.Supplied.Password'))]"
60 | },
61 | "CreateRootCert": {
62 | "Description": "Create the root certificate.",
63 | "Type": "NewRootCertificate",
64 | "Params": {
65 | "Path": "[parameter('CertPath')]",
66 | "Name": "[parameter('RootCertFileName')]",
67 | "DnsName": [
68 | "[variable('Root.Cert.DnsName')]",
69 | "127.0.0.1"
70 | ],
71 | "IncludePrivateKey": true,
72 | "Password": "[variable('Export.Password')]"
73 | }
74 | },
75 | "CreateSignedCert": {
76 | "Description": "Create a certificate signed by the root authority.",
77 | "Type": "NewSignedCertificate",
78 | "Params": {
79 | "Signer": "[GetCertificate(variable('Root.Cert.DnsName'), variable('Root.Cert.Store'))]",
80 | "Path": "[parameter('CertPath')]",
81 | "CertStoreLocation": "[variable('Client.Cert.Store')]",
82 | "Name": "[parameter('CertificateName')]",
83 | "DnsName": [
84 | "[parameter('CertificateName')]",
85 | "127.0.0.1"
86 | ],
87 | "IncludePrivateKey": true,
88 | "Password": "[variable('Export.Password')]"
89 | }
90 | }
91 | }
92 | }
--------------------------------------------------------------------------------
/XP/install/assets/configuration/XP0/xconnect-solr.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SolrUrl": {
4 | "Type": "string",
5 | "DefaultValue": "https://localhost:8983/solr",
6 | "Description": "The Solr instance url."
7 | },
8 | "SolrRoot": {
9 | "Type": "string",
10 | "DefaultValue": "c:\\solr-8.1.1",
11 | "Description": "The file path to the Solr instance."
12 | },
13 | "SolrService": {
14 | "Type": "string",
15 | "DefaultValue": "Solr-8.1.1",
16 | "Description": "The name of the Solr service."
17 | },
18 | "BaseConfig": {
19 | "Type": "string",
20 | "DefaultValue": "_default",
21 | "Description": "The configset to copy as a base for each core."
22 | },
23 | "CorePrefix": {
24 | "Type": "string",
25 | "DefaultValue": "sitecore",
26 | "Description": "The prefix for each of the created indexes."
27 | }
28 | },
29 | "Variables": {
30 | "Solr.FullRoot": "[resolvepath(parameter('SolrRoot'))]",
31 | "Solr.Server": "[joinpath(variable('Solr.FullRoot'), 'server', 'solr')]",
32 | "Solr.BaseConfigs": "[joinpath(variable('Solr.Server'), 'configsets', parameter('BaseConfig'))]",
33 | "Xdb.Name": "[concat(parameter('CorePrefix'), '_xdb')]",
34 | "Xdb.Rebuild.Name": "[concat(variable('Xdb.Name'), '_rebuild')]",
35 | "Core.Root": "[joinpath(variable('Solr.Server'), variable('Xdb.Name'))]",
36 | "Rebuild.Root": "[joinpath(variable('Solr.Server'), variable('Xdb.Rebuild.Name'))]"
37 | },
38 | "Tasks": {
39 | "UnloadCores": {
40 | "Description" : "Unloads existing Cores (if exists)",
41 | "Type": "ManageSolrCore",
42 | "Params": [
43 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" },
44 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Rebuild.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" }
45 | ]
46 |
47 | },
48 | "CleanCores": {
49 | "Description" : "Creates/clears core paths.",
50 | "Type": "EnsurePath",
51 | "Params": {
52 | "Clean": [
53 | "[variable('Core.Root')]",
54 | "[variable('Rebuild.Root')]"
55 | ]
56 | }
57 | },
58 | "PrepareCores": {
59 | "Description" : "Copies base configs into the core paths.",
60 | "Type": "Copy",
61 | "Params": [
62 | { "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Core.Root')]" },
63 | { "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Rebuild.Root')]" }
64 | ]
65 | },
66 | "CreateCores":{
67 | "Description" : "Tells Solr to create the new cores.",
68 | "Type": "ManageSolrCore",
69 | "Params": [
70 | { "Action": "Create", "Address": "[parameter('SolrUrl')]", "Arguments": { "name": "[variable('Xdb.Name')]", "property.update.autoCreateFields": "false" } },
71 | { "Action": "Create", "Address": "[parameter('SolrUrl')]", "Arguments": { "name": "[variable('Xdb.Rebuild.Name')]", "property.update.autoCreateFields": "false" } }
72 | ]
73 | }
74 | },
75 | "UninstallTasks": {
76 | "RemoveCores": {
77 | "Description": "Removes the cores and instance folders.",
78 | "Type": "ManageSolrCore",
79 | "Params": [
80 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" },
81 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Rebuild.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" }
82 | ]
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/XP/install/assets/configuration/XP0-ExistingSSL/xconnect-solr.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SolrUrl": {
4 | "Type": "string",
5 | "DefaultValue": "https://localhost:8983/solr",
6 | "Description": "The Solr instance url."
7 | },
8 | "SolrRoot": {
9 | "Type": "string",
10 | "DefaultValue": "c:\\solr-7.2.1",
11 | "Description": "The file path to the Solr instance."
12 | },
13 | "SolrService": {
14 | "Type": "string",
15 | "DefaultValue": "Solr-7.2.1",
16 | "Description": "The name of the Solr service."
17 | },
18 | "BaseConfig": {
19 | "Type": "string",
20 | "DefaultValue": "_default",
21 | "Description": "The configset to copy as a base for each core."
22 | },
23 | "CorePrefix": {
24 | "Type": "string",
25 | "DefaultValue": "sitecore",
26 | "Description": "The prefix for each of the created indexes."
27 | }
28 | },
29 | "Variables": {
30 | "Solr.FullRoot": "[resolvepath(parameter('SolrRoot'))]",
31 | "Solr.Server": "[joinpath(variable('Solr.FullRoot'), 'server', 'solr')]",
32 | "Solr.BaseConfigs": "[joinpath(variable('Solr.Server'), 'configsets', parameter('BaseConfig'))]",
33 | "Xdb.Name": "[concat(parameter('CorePrefix'), '_xdb')]",
34 | "Xdb.Rebuild.Name": "[concat(variable('Xdb.Name'), '_rebuild')]",
35 | "Core.Root": "[joinpath(variable('Solr.Server'), variable('Xdb.Name'))]",
36 | "Rebuild.Root": "[joinpath(variable('Solr.Server'), variable('Xdb.Rebuild.Name'))]"
37 | },
38 | "Tasks": {
39 | "UnloadCores": {
40 | "Description" : "Unloads existing Cores (if exists)",
41 | "Type": "ManageSolrCore",
42 | "Params": [
43 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" },
44 | { "Action": "Unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Rebuild.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" }
45 | ]
46 |
47 | },
48 | "CleanCores": {
49 | "Description" : "Creates/clears core paths.",
50 | "Type": "EnsurePath",
51 | "Params": {
52 | "Clean": [
53 | "[variable('Core.Root')]",
54 | "[variable('Rebuild.Root')]"
55 | ]
56 | }
57 | },
58 | "PrepareCores": {
59 | "Description" : "Copies base configs into the core paths.",
60 | "Type": "Copy",
61 | "Params": [
62 | { "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Core.Root')]" },
63 | { "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Rebuild.Root')]" }
64 | ]
65 | },
66 | "CreateCores":{
67 | "Description" : "Tells Solr to create the new cores.",
68 | "Type": "ManageSolrCore",
69 | "Params": [
70 | { "Action": "Create", "Address": "[parameter('SolrUrl')]", "Arguments": { "name": "[variable('Xdb.Name')]", "property.update.autoCreateFields": "false" } },
71 | { "Action": "Create", "Address": "[parameter('SolrUrl')]", "Arguments": { "name": "[variable('Xdb.Rebuild.Name')]", "property.update.autoCreateFields": "false" } }
72 | ]
73 | }
74 | },
75 | "UninstallTasks": {
76 | "RemoveCores": {
77 | "Description": "Removes the cores and instance folders.",
78 | "Type": "ManageSolrCore",
79 | "Params": [
80 | { "Action": "unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" },
81 | { "Action": "unload", "Address": "[parameter('SolrUrl')]", "Arguments": { "core": "[variable('Xdb.Rebuild.Name')]", "deleteInstanceDir": "true" }, "ErrorAction": "SilentlyContinue" }
82 | ]
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/SecurityHardening/configuration/harden-security.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "WebRoot": {
4 | "Type": "String",
5 | "DefaultValue": "",
6 | "Description": "Physical root of Sitecore site"
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "DefaultValue": "",
11 | "Description": "Name of Sitecore Site"
12 | },
13 | "FoldersToDisable": {
14 | "Type": "string[]",
15 | "DefaultValue": "",
16 | "Description": "List of folders to disable"
17 | },
18 | "IOActionPath": {
19 | "Type": "String",
20 | "DefaultValue": "",
21 | "Description": "Path to IOActions.xml file"
22 | },
23 | "UploadFilterPackageUri": {
24 | "Type": "String",
25 | "DefaultValue": "",
26 | "Description": "Path to upload-filter zip"
27 | },
28 | "UploadFilterPackageFileName": {
29 | "Type": "String",
30 | "Description": "Name of upload-filter file",
31 | "DefaultValue": ""
32 | },
33 | "WorkingFolder": {
34 | "Type": "String",
35 | "Description": "Temporary working folder for unzipping",
36 | "DefaultValue": ""
37 | },
38 | "ConfigurationPatchPath":{
39 | "Type": "string",
40 | "Description":"Path to folder which contains all Sitecore patch files to copy to App_Config\\INclude"
41 | },
42 | "TransformSourcePath" : {
43 | "Type": "String",
44 | "Description": "Path containing all xdts to be applied to the instance"
45 | },
46 | "DisableAnonymousAccess:SiteName": {
47 | "Type": "string",
48 | "Reference": "SiteName"
49 | },
50 | "DisableAnonymousAccess:Folders": {
51 | "Type": "string[]",
52 | "Reference": "FoldersToDisable"
53 | },
54 | "IOActions:IOActionPath": {
55 | "Type": "String",
56 | "Reference": "IOActionPath"
57 | },
58 | "DeployUploadFilter:WebRoot": {
59 | "Type": "String",
60 | "Reference": "WebRoot"
61 | },
62 | "DeployUploadFilter:SiteName": {
63 | "Type": "String",
64 | "Reference": "SiteName"
65 | },
66 | "DeployUploadFilter:UploadFilterPackageUri": {
67 | "Type": "String",
68 | "Reference": "UploadFilterPackageUri"
69 | },
70 | "DeployUploadFilter:WorkingFolder": {
71 | "Type": "String",
72 | "Reference": "WorkingFolder"
73 | },
74 | "DeployUploadFilter:UploadFilterPackageFileName": {
75 | "Type": "String",
76 | "Reference": "UploadFilterPackageFileName"
77 | }
78 | },
79 | "Variables": {
80 | "Site.PhysicalPath": "[joinpath(parameter('WebRoot'),parameter('SiteName'))]",
81 | "Site.AppConfigIncludePath":"[joinpath(variable('Site.PhysicalPath'),'App_Config\\Include')]",
82 | "Site.Root": "[variable('Site.PhysicalPath')]",
83 | "IOActions:Site.Root": "[variable('Site.Root')]"
84 | },
85 | "Tasks":{
86 | "CopyConfigurationPatches": {
87 | "Description":"",
88 | "Type": "Copy",
89 | "Params": {
90 | "Source": "[joinpath(parameter('ConfigurationPatchPath'),'\\*')]",
91 | "Destination": "[variable('Site.AppConfigIncludePath')]"
92 | }
93 | },
94 | "ApplyXmlTransforms" : {
95 | "Type": "TransformXmlDoc",
96 | "Params": {
97 | "RootDirectoryPath" : "[variable('Site.PhysicalPath')]",
98 | "XdtDirectory":"[parameter('TransformSourcePath')]"
99 | }
100 | }
101 | },
102 | "Includes": {
103 | "DisableAnonymousAccess": {
104 | "Source": ".\\disable-anonymous-access.json"
105 | },
106 | "IOActions": {
107 | "Source": ".\\apply-ioactions.json"
108 | }
109 | ,
110 | "DeployUploadFilter": {
111 | "Source": ".\\deploy-upload-filter.json"
112 | }
113 | },
114 | "Settings": {
115 | "AutoRegisterExtensions": true
116 | }
117 | }
--------------------------------------------------------------------------------
/XP/install/install-settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets": {
3 | "root": "@@assets.root@@",
4 | "packageRepository": "@@assets.pacakgeRepository",
5 | "psRepository": "@@assets.psRepository@@",
6 | "psRepositoryName": "@@assets.psRepositoryName@@",
7 | "licenseFilePath": "@@assets.licenseFilePath@@",
8 | "certificatesPath": "@@assets.certificatePath@@",
9 | "installerVersion": "@@assets.installerVersion@@",
10 | "sitecoreVersion": "@@assets.sitecoreVersion@@",
11 | "identityServerVersion": "@@assets.identityServerVersion@@",
12 | "sitecoreazuretoolkit": "@@assets.sitecoreazuretoolkit@@",
13 | "sharedUtilitiesRoot": "@@assets.sharedUtilitiesRoot@@"
14 | },
15 | "settings": {
16 | "site": {
17 | "prefix": "@@site.prefix@@",
18 | "suffix": "@@site.suffix@@",
19 | "webRoot": "@@site.webRoot@@",
20 | "hostName": "@@site.hostName@@",
21 | "addSiteBindingWithSSLPath": "@@site.addSiteBindingWithSSLPath@@",
22 | "additionalBindings": []
23 | },
24 | "sql": {
25 | "server": "@@sql.server@@",
26 | "adminUser": "@@sql.adminUser@@",
27 | "adminPassword": "@@sql.adminPassword@@",
28 | "userPassword": "@@sql.userPassword@@",
29 | "coreUser": "@@sql.coreUser@@",
30 | "corePassword": "@@sql.corePassword@@",
31 | "masterUser": "@@sql.masterUser@@",
32 | "masterPassword": "@@sql.masterPassword@@",
33 | "webUser": "@@sql.webUser@@",
34 | "webPassword": "@@sql.webPassword@@",
35 | "collectionUser": "@@sql.collectionUser@@",
36 | "collectionPassword": "@@sql.collectionPassword@@",
37 | "reportingUser": "@@sql.reportingUser@@",
38 | "reportingPassword": "@@sql.reportingPassword@@",
39 | "processingEngineUser": "@@sql.processingEngineUser@@",
40 | "processingEnginePassword": "@@sql.processingEnginePassword@@",
41 | "processingPoolsUser": "@@sql.processingPoolsUser@@",
42 | "processingPoolsPassword": "@@sql.processingPoolsPassword@@",
43 | "processingTasksUser": "@@sql.processingTasksUser@@",
44 | "processingTasksPassword": "@@sql.processingTasksPassword@@",
45 | "referenceDataUser": "@@sql.referenceDataUser@@",
46 | "referenceDataPassword": "@@sql.referenceDataPassword@@",
47 | "securityUser": "@@sql.referenceDataUser@@",
48 | "securityPassword": "@@sql.referenceDataPassword@@",
49 | "marketingAutomationUser": "@@sql.marketingAutomationUser@@",
50 | "marketingAutomationPassword": "@@sql.marketingAutomationPassword@@",
51 | "formsUser": "@@sql.formsUser@@",
52 | "formsPassword": "@@sql.formsPassword@@",
53 | "exmMasterUser": "@@sql.exmMasterUser@@",
54 | "exmMasterPassword": "@@sql.exmMasterPassword@@",
55 | "messagingUser": "@@sql.messagingUser@@",
56 | "messagingPassword": "@@sql.messagingPassword@@",
57 | "minimumVersion": "@@sql.minimumVersion@@"
58 | },
59 | "xConnect": {
60 | "configurationPath": "@@xConnect.configurationPath@@",
61 | "certificateConfigurationPath": "@@xConnect.certificateConfigurationPath@@",
62 | "solrConfigurationPath": "@@xConnect.solrConfigurationPath@@",
63 | "packagePath": "@@xConnect.packagePath@@",
64 | "siteName": "@@xConnect.siteName@@",
65 | "siteRoot": "@@xConnect.siteRoot@@"
66 | },
67 | "sitecore": {
68 | "solrConfigurationPath": "@@sitecore.solrConfigurationPath@@",
69 | "singleDeveloperConfigurationPath": "@@sitecore.singleDeveloperConfigurationPath@@",
70 | "sslConfigurationPath": "@@sitecore.sslConfigurationPath@@",
71 | "packagePath": "@@sitecore.packagePath@@",
72 | "adminPassword": "@@sitecore.adminPassword@@",
73 | "exmCryptographicKey": "@@sitecore.exmCryptographicKey@@",
74 | "exmAuthenticationKey": "@@sitecore.exmAuthenticationKey@@",
75 | "telerikEncryptionKey": "@@sitecore.telerikEncryptionKey@@",
76 | "rootCertificateName": "@@sitecore.rootCertificateName@@"
77 | },
78 | "identityServer": {
79 | "configurationPath": "@@identityServer.ConfigurationPath@@",
80 | "packagePath": "@@identityServer.packagePath@@",
81 | "name": "@@identityServer.name@@",
82 | "url": "@@identityServer.url@@",
83 | "clientSecret": "@@identityServer.clientSecret@@"
84 | },
85 | "solr": {
86 | "url": "@@solr.url@@",
87 | "root": "@@solr.root@@",
88 | "serviceName": "@@solr.serviceName@@"
89 | }
90 | },
91 | "modules": []
92 | }
--------------------------------------------------------------------------------
/Azure/CreateVHDFromSnapshot.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $subscriptionId,
3 | [ValidateSet('xp', 'xc')]
4 | [string]$demoType,
5 | [Parameter(Mandatory = $true)]
6 | [string] $version,
7 | [string[]] $regions = @("na", "emea", "ga", "ea"),
8 | [string] $snapshotPrefix = "habitathome",
9 | [string] $snapshotResourceGroupName = "habitathome-demo-snapshot"
10 |
11 |
12 | )
13 | $config = Get-Content .\config.json | ConvertFrom-Json
14 |
15 | $account = Get-AzureRMContext | Select-Object Account
16 |
17 | if ($null -eq $account.Account) {
18 | Login-AzureRmAccount
19 | }
20 |
21 | ### DO NOT CHANGE
22 | $demoType = $demoType.ToLower()
23 | $osSnapshotName = ("{0}{1}-{2}-os-snapshot" -f $snapshotPrefix, $demoType, $version)
24 | Write-host ("Preparing to copy {0} from {1}" -f $osSnapshotName, $snapshotResourceGroupName)
25 | #Provide the name of the VHD file to which snapshot will be copied.
26 | $osVHDFileName = ("{0}{1}-{2}-os.vhd" -f $snapshotPrefix, $demoType, $version)
27 |
28 |
29 | $sasExpiryDuration = "21600"
30 |
31 | Select-AzureRmSubscription -SubscriptionId $subscriptionId
32 |
33 | # Write-Host "Generating SAS tokens for snapshot(s)..." -ForegroundColor Green
34 |
35 | $DebugPreference = 'Continue'
36 | $result = Grant-AzureRmSnapshotAccess -ResourceGroupName $snapshotResourceGroupName -SnapshotName $osSnapshotName -Access 'Read' -DurationInSecond $sasExpiryDuration 5>&1
37 |
38 | $DebugPreference = 'SilentlyContinue'
39 |
40 | $sasUri = ((($result | Where-Object {$_ -match "accessSAS"})[-1].ToString().Split("`n") | Where-Object {$_ -match "accessSAS"}).Split(' ') | Where-Object {$_ -match "https"}).Replace('"', '')
41 |
42 | if (Test-Path (Join-Path $PWD "vhdcreation.log") -PathType Leaf) {
43 | Remove-Item (Join-Path $PWD "vhdcreation.log") -Force
44 | }
45 |
46 |
47 | $Block = {
48 | param(
49 | [string]$region,
50 | $sas,
51 | $config,
52 | $osVHDFileName
53 | )
54 |
55 | $configRegion = ($config.regions | Where-Object {$_.name -eq $region})
56 |
57 | $storageAccountName = $configRegion.StorageAccountName
58 | $keys = Get-AzureRmStorageAccountKey -ResourceGroupName $configRegion.resourceGroupName -Name $configRegion.StorageAccountName
59 | $storageAccountKey = $keys[0].Value
60 | $storageContainerName = $configRegion.StorageContainerName
61 |
62 | #Create the context for the storage account which will be used to copy snapshot to the storage account
63 | $destinationContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey
64 |
65 | Write-Host "Copying OS Disk" -ForegroundColor Green
66 | $progress = Start-AzureStorageBlobCopy -AbsoluteUri $sas -DestContainer $storageContainerName -DestContext $destinationContext -DestBlob $osVHDFileName -Force
67 |
68 | while (($progress | Get-AzureStorageBlobCopyState).Status -eq "Pending") {
69 | Start-Sleep -s 60
70 | $progress | Get-AzureStorageBlobCopyState
71 | }
72 |
73 | $result = ($progress | Get-AzureStorageBlobCopyState)
74 |
75 | if ($result.Status -eq "Success") {
76 | Write-Host ("Successful copy of OS Disk to {0}" -f $configRegion.location) -ForegroundColor Green
77 | }
78 | else {
79 | $message = ("Error copying OS disk to region {0}" -f $configRegion.location)
80 | Write-Host $message -ForegroundColor Red
81 | Add-Content -Path (Join-Path $PWD "vhdcreation.log") -Value $message -Force
82 | }
83 |
84 | }
85 |
86 | foreach ($region in $regions) {
87 | $jobName = $region
88 |
89 | Start-Job -Name $jobName -ScriptBlock $Block -ArgumentList $region, $sasUri, $config, $osVHDFileName
90 |
91 | }
92 |
93 | while (1 -eq 1) {
94 |
95 |
96 | $jobs = Get-Job | Where-Object {$_.State -eq "Running"}
97 | if ($jobs.Count -eq 0) {
98 | if (Test-Path $(Join-Path $PWD "vhdcreation.log")) {
99 | # this means we've encountered an error
100 | Write-Host "Error copying VHD"
101 | break
102 | }
103 | else {
104 | Write-Host "Success!" -ForegroundColor Green
105 | break
106 | }
107 |
108 | return
109 | }
110 | foreach ($job in $jobs) {
111 | Write-Host ("... Copy of VHD to {0} in progress" -f $job.Name)
112 | $jobs | Receive-Job
113 | }
114 |
115 | Start-Sleep -Seconds 120
116 | }
--------------------------------------------------------------------------------
/Shared/assets/modules/SecurityHardening/SecurityHardening.psm1:
--------------------------------------------------------------------------------
1 |
2 | Function Disable-AnonymousAccess {
3 | param(
4 | [Parameter(Mandatory = $true)]
5 | [string[]]$folders,
6 | [Parameter(Mandatory = $true)]
7 | [string]$siteName
8 |
9 | )
10 | Enable-WindowsFeatureDelegation -featureName "anonymousAuthentication"
11 |
12 | foreach ($folder in $folders) {
13 | Write-Verbose "Disabling anonymous access to $folder"
14 | Set-WebConfigurationProperty -Filter "/system.webServer/security/authentication/anonymousAuthentication" -Name Enabled -Value False -PSPath "IIS:\Sites\$siteName\$folder"
15 | }
16 | Write-Verbose -Message $PSCmdlet.MyInvocation.MyCommand
17 |
18 | # Disable-WindowsFeatureDelegation -featureName "anonymousAuthentication"
19 | }
20 |
21 | Function Enable-WindowsFeatureDelegation {
22 | param(
23 | [Parameter(Mandatory = $true)]
24 | [string]$featureName
25 | )
26 | $delegateSet = (Get-WebConfiguration "/System.WebServer/Security/Authentication/$featureName" -PSPath IIS:/).OverrideMode
27 | if ($delegateSet -eq 'Deny' -or $delegateSet -eq 'Inherit' ) {
28 | Set-WebConfiguration "/System.WebServer/Security/Authentication/$featureName" -metadata overrideMode -value Allow -PSPath IIS:/
29 | Write-Output "Feature Delegation for $featureName has been set to Allow"
30 | }
31 | }
32 |
33 | Function Disable-WindowsFeatureDelegation {
34 | param(
35 | [Parameter(Mandatory = $true)]
36 | [string]$featureName
37 | )
38 | $delegateSet = (Get-WebConfiguration "/System.WebServer/Security/Authentication/$featureName" -PSPath IIS:/).OverrideMode
39 | if ($delegateSet -eq 'Allow') {
40 | Set-WebConfiguration "/System.WebServer/Security/Authentication/$featureName" -metadata overrideMode -value Inherit -PSPath IIS:/
41 | Write-Output "Feature Delegation for $featureName has been set to Inherit"
42 | }
43 | }
44 |
45 | function Block-FilesUsingIOActions {
46 | param(
47 | [Parameter(Mandatory = $true, helpmessage = "Root Directory Path")]
48 | [string]$RootDirectoryPath,
49 | [Parameter(Mandatory = $true, helpmessage = "IO XML Document")]
50 | [string]$IoXmlPath
51 | )
52 |
53 | Write-Verbose "Entering Block-Files"
54 |
55 | $ioXml = (Get-Content $IoXmlPath) -as [xml]
56 | if ($ioXml -eq $null) {
57 | throw "'$IoXmlPath' is not a valid xml"
58 | }
59 | elseif ($ioXml.SelectNodes("IOActions/IOAction").Count -eq 0) {
60 | throw "'$IoXmlPath' is not a valid ioxml and does not contain required root elements"
61 | }
62 |
63 | Write-Verbose "$(@($ioXml.IOActions.IOAction).Count) IO Action(s) detected."
64 |
65 | $ioXml.IOActions.IOAction | ForEach-Object {
66 | $ioAction = $_
67 | switch ($ioAction.action) {
68 | "enable" {
69 |
70 | if (Test-Path (Join-Path $RootDirectoryPath $ioAction.path)) {
71 | Rename-Item (Join-Path $RootDirectoryPath $ioAction.path) ((Join-Path $RootDirectoryPath $ioAction.path) -replace ".disabled", "")
72 | }
73 | else {
74 | Write-Warning -Message "Cannot find the path '$($ioAction.path)'."
75 | }
76 |
77 | }
78 | "disable" {
79 |
80 | if (Test-Path (Join-Path $RootDirectoryPath $ioAction.path)) {
81 | Rename-Item (Join-Path $RootDirectoryPath $ioAction.path) (Join-Path $RootDirectoryPath "$($ioAction.path).disabled")
82 | }
83 | else {
84 | Write-Warning -Message "Cannot find the path '$($ioAction.path)'."
85 | }
86 |
87 | }
88 | "delete" {
89 |
90 | if (Test-Path (Join-Path $RootDirectoryPath $ioAction.path)) {
91 | Remove-Item (Join-Path $RootDirectoryPath $ioAction.path) -Force
92 | }
93 | else {
94 | Write-Warning -Message "Cannot find the path '$($ioAction.path)'."
95 | }
96 |
97 | }
98 | default {
99 | Write-Error -Message "$($ioAction.action) is not a valid action and has been ignored."
100 | }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/SXAStorefront/SXAStorefront.Storefront.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SXACommerceWdpFullPath": {
4 | "Type": "string",
5 | "Description": "The path to the SXA Commerce module zip.",
6 | "DefaultValue": ""
7 | },
8 | "SXAStorefrontWdpFullPath": {
9 | "Type": "string",
10 | "Description": "The path to the SXA Commerce Storefront module zip.",
11 | "DefaultValue": ""
12 | },
13 | "SXAStorefrontThemeWdpFullPath": {
14 | "Type": "string",
15 | "Description": "The path to the SXA Commerce Storefront Theme module zip.",
16 | "DefaultValue": ""
17 | },
18 | "SXAStorefrontCatalogWdpFullPath": {
19 | "Type": "string",
20 | "Description": "The path to the SXA Commerce Storefront Catalog module zip.",
21 | "DefaultValue": ""
22 | },
23 | "SqlAdminUser": {
24 | "Type": "string",
25 | "DefaultValue": "sa",
26 | "Description": "The Sql admin user account to use when installing databases."
27 | },
28 | "SqlAdminPassword": {
29 | "Type": "string",
30 | "DefaultValue": "12345",
31 | "Description": "The Sql admin password to use when installing databases."
32 | },
33 | "SitecoreDbServer": {
34 | "Type": "string",
35 | "DefaultValue": ".\\SQLSERVER",
36 | "Description": "The Sql Server where databases will be installed."
37 | },
38 | "SqlDbPrefix": {
39 | "Type": "string",
40 | "Description": "The Sql Server where databases will be installed.",
41 | "DefaultValue": ""
42 | },
43 | "SiteName": {
44 | "Type": "string",
45 | "Description": "The name of the site to be deployed.",
46 | "DefaultValue": ""
47 | },
48 | "MergeToolFullPath": {
49 | "Type": "string",
50 | "DefaultValue": ""
51 | },
52 | "InstallDir": {
53 | "Type": "string",
54 | "Description": "The sitecore site content path.",
55 | "DefaultValue": ""
56 | },
57 | "SXAStorefrontWdpsInstall:SqlAdminUser": {
58 | "Type": "string",
59 | "Description": "The Sql admin user account to use when installing databases.",
60 | "Reference": "SqlAdminUser"
61 | },
62 | "SXAStorefrontWdpsInstall:SqlAdminPassword": {
63 | "Type": "string",
64 | "Description": "The Sql admin password to use when installing databases.",
65 | "Reference": "SqlAdminPassword"
66 | },
67 | "SXAStorefrontWdpsInstall:SitecoreDbServer": {
68 | "Type": "string",
69 | "Description": "The Sql Server where databases will be installed.",
70 | "Reference": "SitecoreDbServer"
71 | },
72 | "SXAStorefrontWdpsInstall:SqlDbPrefix": {
73 | "Type": "string",
74 | "Description": "The Sql Server where databases will be installed.",
75 | "Reference": "SqlDbPrefix"
76 | },
77 | "SXAStorefrontWdpsInstall:SiteName": {
78 | "Type": "string",
79 | "Description": "The name of the site to be deployed.",
80 | "Reference": "SiteName"
81 | },
82 | "SXAStorefrontWdpsInstall:SXACommerceWdpFullPath": {
83 | "Type": "string",
84 | "Reference": "SXACommerceWdpFullPath"
85 | },
86 | "SXAStorefrontWdpsInstall:SXAStorefrontWdpFullPath": {
87 | "Type": "string",
88 | "Description": "The path to the SXA Commerce Storefront module zip.",
89 | "Reference": "SXAStorefrontWdpFullPath"
90 | },
91 | "SXAStorefrontWdpsInstall:SXAStorefrontThemeWdpFullPath": {
92 | "Type": "string",
93 | "Description": "The path to the SXA Commerce Storefront Theme module zip.",
94 | "Reference": "SXAStorefrontThemeWdpFullPath"
95 | },
96 | "SXAStorefrontWdpsInstall:SXAStorefrontCatalogWdpFullPath": {
97 | "Type": "string",
98 | "Description": "The path to the SXA Commerce Storefront Catalog module zip.",
99 | "Reference": "SXAStorefrontCatalogWdpFullPath"
100 | },
101 | "SXAStorefrontPostInstallationSteps:MergeToolFullPath": {
102 | "Type": "string",
103 | "Reference": "MergeToolFullPath"
104 | },
105 | "SXAStorefrontPostInstallationSteps:InstallDir": {
106 | "Type": "string",
107 | "Reference": "InstallDir"
108 | }
109 | },
110 | "Includes": {
111 | "SXAStorefrontWdpsInstall": {
112 | "Source": ".\\Configuration\\Commerce\\SXAStorefront\\_SXAStorefront.Install.Wdps.json"
113 | },
114 | "SXAStorefrontPostInstallationSteps": {
115 | "Source": ".\\Configuration\\Commerce\\SXAStorefront\\_SXAStorefront.Post.Installation.json"
116 | }
117 | }
118 | }
--------------------------------------------------------------------------------
/XP/install/assets/configuration/XP0-ExistingSSL/createcert.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "CertificateName": {
4 | "Type": "String",
5 | "Description": "The name of the certificate to be created.",
6 | "DefaultValue": ""
7 | },
8 | "CertPath": {
9 | "Type": "String",
10 | "Description": "The physical path on disk where certificates will be stored.",
11 | "DefaultValue": "C:\\certificates"
12 | },
13 | "RootCertFileName": {
14 | "Type": "String",
15 | "Description": "The file name of the root certificate to be created.",
16 | "DefaultValue": "SitecoreRootCert"
17 | },
18 | "ExportPassword": {
19 | "Type": "String",
20 | "Description": "Password to export certificates with.",
21 | "DefaultValue": "SIF-Default"
22 | },
23 | "SkipTasks": {
24 | "Type": "Boolean",
25 | "Description": "Pass true to skip all of the tasks",
26 | "DefaultValue": false
27 | }
28 | },
29 | "Variables": {
30 | "Root.Cert.DnsName": "[concat('DO_NOT_TRUST_', parameter('RootCertFileName'))]",
31 | "Root.Cert.Store": "Cert:\\LocalMachine\\Root",
32 | "Client.Cert.Store": "Cert:\\LocalMachine\\My",
33 | "Export.Password": "[if(variable('User.Supplied.Password'),variable('Convert.User.Password'),variable('Secure.Password'))]",
34 | "User.Supplied.Password": "[not(equal(parameter('ExportPassword'),'SIF-Default'))]",
35 | "Secure.Password": "[ConvertToSecureString(String:variable('Password.String'),AsPlainText:true,Force:true)]",
36 | "Password.String": "[RandomString(Length:20,EnforceComplexity:True)]",
37 | "Convert.User.Password": "[ConvertToSecureString(String:parameter('ExportPassword'),AsPlainText:true,Force:true)]",
38 | "Skip": "[parameter('SkipTasks')]",
39 | "Skip.DisplayPassword": "[or(variable('Skip'),variable('User.Supplied.Password'))]"
40 | },
41 | "Register": {
42 | "Tasks": {
43 | "WriteInformation": "Write-Information"
44 | },
45 | "ConfigFunction": {
46 | "ConvertToSecureString": "ConvertTo-SecureString"
47 | }
48 | },
49 | "Tasks": {
50 | "CreatePaths": {
51 | "Description": "Create the physical disk path.",
52 | "Type": "EnsurePath",
53 | "Params": {
54 | "Exists": [
55 | "[parameter('CertPath')]"
56 | ]
57 | },
58 | "Skip": "[variable('Skip')]"
59 | },
60 | "DisplayPassword": {
61 | "Description": "Print password if the user hasn't supplied their own.",
62 | "Type": "WriteInformation",
63 | "Params": {
64 | "Messagedata": "[concat('Certificate Password: ',variable('Password.String'))]",
65 | "InformationAction": "Continue"
66 | },
67 | "Skip": "[variable('Skip.DisplayPassword')]"
68 | },
69 | "CreateRootCert": {
70 | "Description": "Create the root certificate.",
71 | "Type": "NewRootCertificate",
72 | "Params": {
73 | "Path": "[parameter('CertPath')]",
74 | "Name": "[parameter('RootCertFileName')]",
75 | "DnsName": [
76 | "[variable('Root.Cert.DnsName')]",
77 | "127.0.0.1"
78 | ],
79 | "IncludePrivateKey": true,
80 | "Password": "[variable('Export.Password')]"
81 | },
82 | "Skip": "[variable('Skip')]"
83 | },
84 | "CreateSignedCert": {
85 | "Description": "Create a certificate signed by the root authority.",
86 | "Type": "NewSignedCertificate",
87 | "Params": {
88 | "Signer": "[GetCertificate(variable('Root.Cert.DnsName'), variable('Root.Cert.Store'))]",
89 | "Path": "[parameter('CertPath')]",
90 | "CertStoreLocation": "[variable('Client.Cert.Store')]",
91 | "Name": "[parameter('CertificateName')]",
92 | "DnsName": [
93 | "[parameter('CertificateName')]",
94 | "127.0.0.1"
95 | ],
96 | "IncludePrivateKey": true,
97 | "Password": "[variable('Export.Password')]"
98 | },
99 | "Skip": "[variable('Skip')]"
100 | }
101 | }
102 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/add-new-binding-and-certificate.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "Description": "The name of the site deployed site in iis."
6 | },
7 | "WebRoot": {
8 | "Type": "string",
9 | "DefaultValue": "c:\\inetpub\\wwwroot",
10 | "Description": "The physical path of the configured Web Root for the environment"
11 | },
12 | "HostHeader": {
13 | "Type": "string",
14 | "Description": "The certificate to use for HTTPS web bindings. Provide the name or the thumbprint. If not provided a certificate will be generated."
15 | },
16 | "Port": {
17 | "Type": "int",
18 | "DefaultValue": 443,
19 | "Description": "The port to bind to."
20 | },
21 | "CertPath": {
22 | "Type": "string",
23 | "Description": "The physical path on disk where certificates will be stored.",
24 | "DefaultValue": "c:\\certificates"
25 | },
26 | "RootCertFileName": {
27 | "Type": "string",
28 | "Description": "The file name of the root certificate to be created.",
29 | "DefaultValue": "SitecoreRootCert"
30 | },
31 | "CertificateName": {
32 | "Type": "string",
33 | "Description": "The name of certificate to be used or created.",
34 | "DefaultValue": "[parameter('HostHeader')]"
35 | }
36 | },
37 | "Variables": {
38 | "Client.Cert.Store": "cert:\\LocalMachine\\My",
39 | "Root.Cert.DnsName": "[concat('DO_NOT_TRUST_', parameter('RootCertFileName'))]",
40 | "Root.Cert.Store": "cert:\\LocalMachine\\Root",
41 | "Site.PhysicalPath": "[concat(parameter('WebRoot'),'\\', parameter('SiteName'))]",
42 | "Site.DataFolder": "[joinpath(variable('Site.PhysicalPath'), 'App_Data')]",
43 | "Security.CertificateStore": "Cert:\\Localmachine\\My"
44 | },
45 | "Tasks": {
46 | "CreatePaths": {
47 | "Type": "EnsurePath",
48 | "Params": {
49 | "Exists": [
50 | "[parameter('CertPath')]"
51 | ]
52 | }
53 | },
54 | "CreateRootCert": {
55 | "Type": "NewRootCertificate",
56 | "Params": {
57 | "Path": "[parameter('CertPath')]",
58 | "Name": "[parameter('RootCertFileName')]",
59 | "StoreLocation": "CurrentUser",
60 | "DnsName": "[variable('Root.Cert.DnsName')]"
61 | }
62 | },
63 | "ImportRootCertificate": {
64 | "Type": "ImportCertificate",
65 | "Params": {
66 | "CertStoreLocation": "[variable('Root.Cert.Store')]",
67 | "FilePath": "[concat(joinpath(parameter('CertPath'), parameter('RootCertFileName')), '.crt')]"
68 | }
69 | },
70 | "CreateSignedCert": {
71 | "Type": "NewSignedCertificate",
72 | "Params": {
73 | "Signer": "[GetCertificate(variable('Root.Cert.DnsName'), variable('Root.Cert.Store'))]",
74 | "Path": "[parameter('CertPath')]",
75 | "CertStoreLocation": "[variable('Client.Cert.Store')]",
76 | "Name": "[parameter('CertificateName')]",
77 | "DnsName": "[parameter('HostHeader')]"
78 | }
79 | },
80 | "CreateBindingsWithThumprint": {
81 | "Type": "WebBinding",
82 | "Params": {
83 | "SiteName": "[parameter('SiteName')]",
84 | "Add": [{
85 | "HostHeader": "[parameter('HostHeader')]",
86 | "Protocol": "https",
87 | "SSLFlags": 1,
88 | "Port": "[parameter('Port')]",
89 | "Thumbprint": "[GetCertificateThumbprint(parameter('CertificateName'), variable('Client.Cert.Store'))]"
90 | }]
91 | }
92 | },
93 | "CreateBindings": {
94 | "Type": "WebBinding",
95 | "Params": {
96 | "SiteName": "[parameter('SiteName')]",
97 | "Add": [{
98 | "HostHeader": "[parameter('HostHeader')]",
99 | "Protocol": "http",
100 | "Port": "80"
101 | }]
102 | }
103 | },
104 | "CreateHostHeader": {
105 | "Type": "HostHeader",
106 | "Params": {
107 | "HostName": "[parameter('HostHeader')]"
108 | }
109 | }
110 | }
111 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/Common/Common.InstallWdpModule.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "PackagePath": {
4 | "Type": "string",
5 | "Description": "The path to the SCWDP to deploy.",
6 | "DefaultValue": ""
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "Description": "The name of the site to be deployed.",
11 | "DefaultValue": ""
12 | },
13 | "SqlDbPrefix": {
14 | "Type": "string",
15 | "Description": "SQL DB Prefix",
16 | "DefaultValue": ""
17 | },
18 | "SqlAdminUser": {
19 | "Type": "string",
20 | "Description": "The Sql admin user account to use when installing databases.",
21 | "DefaultValue": ""
22 | },
23 | "SqlAdminPassword": {
24 | "Type": "string",
25 | "Description": "The Sql admin password to use when installing databases.",
26 | "DefaultValue": ""
27 | },
28 | "SqlServer": {
29 | "Type": "string",
30 | "Description": "The Sql Server where databases will be installed.",
31 | "DefaultValue": ""
32 | },
33 | "SqlModuleDatabase": {
34 | "Type": "string",
35 | "Description": "Databases required for module install: ('master','mastercore','core')",
36 | "DefaultValue": ""
37 | }
38 | },
39 | "Variables": {
40 | "Package.Path": "[parameter('PackagePath')]",
41 | "Sql.Server": "[parameter('SqlServer')]",
42 | "Sql.Module.Database": "[parameter('SqlModuleDatabase')]",
43 | "Sql.Database.Core": "[concat(parameter('SqlDbPrefix'), '_Core')]",
44 | "Sql.Database.Master": "[concat(parameter('SqlDbPrefix'), '_Master')]",
45 | "Sql.Core.ConnectionString": "[SqlConnectionString(variable('Sql.Server'),variable('Sql.Database.Core'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
46 | "Sql.Master.ConnectionString": "[SqlConnectionString(variable('Sql.Server'),variable('Sql.Database.Master'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
47 | "Skip.Master": "[not(equal(variable('Sql.Module.Database'), 'master'))]",
48 | "Skip.MasterCore": "[not(equal(variable('Sql.Module.Database'), 'mastercore'))]",
49 | "Skip.Core": "[not(equal(variable('Sql.Module.Database'), 'core'))]"
50 | },
51 | "Settings": {
52 | "AutoRegisterExtensions": true
53 | },
54 | "Tasks": {
55 | "InstallWDPModuleMasterCore": {
56 | "Type": "WebDeploy",
57 | "Skip": "[equal(variable('Skip.MasterCore'),'True')]",
58 | "Params": {
59 | "Verb": "Sync",
60 | "Arguments": {
61 | "Source": {
62 | "Package": "[resolvepath(variable('Package.Path'))]"
63 | },
64 | "Dest": "Auto",
65 | "EnableRule": "DoNotDeleteRule",
66 | "SetParam": [
67 | {
68 | "Name": "Application Path",
69 | "Value": "[parameter('SiteName')]"
70 | },
71 | {
72 | "Name": "Core Admin Connection String",
73 | "Value": "[variable('Sql.Core.ConnectionString')]"
74 | },
75 | {
76 | "Name": "Master Admin Connection String",
77 | "Value": "[variable('Sql.Master.ConnectionString')]"
78 | }
79 | ]
80 | }
81 | }
82 | },
83 | "InstallWDPModuleMaster": {
84 | "Type": "WebDeploy",
85 | "Skip": "[equal(variable('Skip.Master'),'True')]",
86 | "Params": {
87 | "Verb": "Sync",
88 | "Arguments": {
89 | "Source": {
90 | "Package": "[resolvepath(variable('Package.Path'))]"
91 | },
92 | "Dest": "Auto",
93 | "EnableRule": "DoNotDeleteRule",
94 | "SetParam": [
95 | {
96 | "Name": "Application Path",
97 | "Value": "[parameter('SiteName')]"
98 | },
99 | {
100 | "Name": "Master Admin Connection String",
101 | "Value": "[variable('Sql.Master.ConnectionString')]"
102 | }
103 | ]
104 | }
105 | }
106 | },
107 | "InstallWDPModuleCore": {
108 | "Type": "WebDeploy",
109 | "Skip": "[equal(variable('Skip.Core'),'True')]",
110 | "Params": {
111 | "Verb": "Sync",
112 | "Arguments": {
113 | "Source": {
114 | "Package": "[resolvepath(variable('Package.Path'))]"
115 | },
116 | "Dest": "Auto",
117 | "EnableRule": "DoNotDeleteRule",
118 | "SetParam": [
119 | {
120 | "Name": "Application Path",
121 | "Value": "[parameter('SiteName')]"
122 | },
123 | {
124 | "Name": "Core Admin Connection String",
125 | "Value": "[variable('Sql.Core.ConnectionString')]"
126 | }
127 | ]
128 | }
129 | }
130 | }
131 | }
132 | }
--------------------------------------------------------------------------------
/Warmup/warmup-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "instanceName": "habitathome.dev.local",
3 | "urls": [
4 | {
5 | "sitecore": [
6 | {
7 | "url": "/sitecore/shell"
8 | },
9 | {
10 | "url": "/sitecore/shell/Applications/Content%20Editor.aspx?sc_bw=1"
11 | },
12 | {
13 | "url": "/sitecore/client/Applications/ControlPanel.aspx?sc_bw=1"
14 | },
15 | {
16 | "url": "/sitecore/client/Applications/FormsBuilder/Pages/Forms"
17 | },
18 | {
19 | "url": "/sitecore/client/Applications/ExperienceProfile/search?text=*"
20 | },
21 | {
22 | "url": "/sitecore/client/Applications/ExperienceAnalytics/Dashboard"
23 | },
24 | {
25 | "url": "/sitecore/client/Applications/ECM/Pages/Dashboard"
26 | },
27 | {
28 | "url": "/sitecore/client/Applications/ExperienceAnalytics/Dashboard"
29 | },
30 | {
31 | "url": "/sitecore/client/Applications/ExperienceProfile/search?text=*"
32 | },
33 | {
34 | "url": "/sitecore/client/applications/List%20Manager/Dashboard"
35 | }
36 | ]
37 | },
38 | {
39 | "xp": [
40 | {
41 | "url": "/landing-pages/bing-home-theater"
42 | },
43 | {
44 | "url": "/landing-pages/bing-smart-home-gym"
45 | },
46 | {
47 | "url": "/guides/intense-cycling-workouts"
48 | },
49 | {
50 | "url": "/guides/best-in-wearable-fitness-technology"
51 | },
52 | {
53 | "url": "/Guides/Setting-Up-the-Perfect-Home-Theater/?sc_camp=C23D8C90FCE7400F8CBD072FB537854C"
54 | },
55 | {
56 | "url": "/content-finder"
57 | },
58 | {
59 | "url": "/on-the-go-devices"
60 | },
61 | {
62 | "url": "/home-entertainment"
63 | },
64 | {
65 | "url": "/computers"
66 | },
67 | {
68 | "url": "/appliances"
69 | },
70 | {
71 | "url": "/smart-home"
72 | },
73 | {
74 | "url": "/gift-cards"
75 | },
76 | {
77 | "url": "/support"
78 | },
79 | {
80 | "url": "/login?ReturnUrl=%2faccount-management"
81 | },
82 | {
83 | "url": "/Gaming"
84 | },
85 | {
86 | "url": "/guides"
87 | },
88 | {
89 | "url": "/guides/laptops-obsolete"
90 | },
91 | {
92 | "url": "/guides/kitchen-appliances"
93 | },
94 | {
95 | "url": "/guides/must-have-mobile"
96 | },
97 | {
98 | "url": "/guides/setting-up-the-perfect-home-theater"
99 | }
100 | ]
101 | },
102 | {
103 | "xc": [
104 | {
105 | "url": "/shop/Health%2CBeautyandFitness%3dhabitat_master-health%20%20beauty%20and%20fitness/SydneyCummings-PlatinumPackage%3d8042103"
106 | },
107 | {
108 | "url": "/habitat-health?sc_camp=0292C2AA99EE401086B91B862BBA99CA"
109 | },
110 | {
111 | "url": "/habitat-health?sc_camp=86F4B51D01D84372889A2DEAC430E01D"
112 | },
113 | {
114 | "url": "/habitat-health/trainer-finder"
115 | },
116 | {
117 | "url": "/shop/fitness-activity-trackers"
118 | },
119 | {
120 | "url": "/shop/Smart-Sports-Equipment"
121 | },
122 | {
123 | "url": "/shop/Digital-Subscriptions"
124 | },
125 | {
126 | "url": "/shop/Electric-Shaver"
127 | },
128 | {
129 | "url": "/shop/Women-s-Shavers"
130 | },
131 | {
132 | "url": "/shop/Appliances%3dhabitat_master-appliances/HabitatViva4-Door280CubicFootRefrigeratorwithIceMakerandTouchscreen%3d6042579"
133 | }
134 | ]
135 | }
136 | ]
137 | }
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/SXAStorefront/SXAStorefront.Preconfigure.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "SiteName": {
4 | "Type": "string",
5 | "Description": "The name of the site.",
6 | "DefaultValue": ""
7 | },
8 | "SiteHostHeaderName": {
9 | "Type": "string",
10 | "Description": "The host name of the storefront.",
11 | "DefaultValue": ""
12 | },
13 | "InstallDir": {
14 | "Type": "string",
15 | "Description": "The sitecore site content path.",
16 | "DefaultValue": ""
17 | },
18 | "SiteUtilitiesSrc": {
19 | "Type": "string",
20 | "Description": "Site Utilities source path",
21 | "DefaultValue": ""
22 | },
23 | "CertPath": {
24 | "Type": "string",
25 | "Description": "The physical path on disk where certificates will be stored.",
26 | "DefaultValue": "c:\\certificates"
27 | },
28 | "RootCertName": {
29 | "Type": "string",
30 | "Description": "The name of the root certificate.",
31 | "DefaultValue": "SitecoreRootCert"
32 | }
33 | },
34 | "Variables": {
35 | "Client.Cert.Store": "cert:\\LocalMachine\\My",
36 | "Security.SSL.CertificateThumbprint": "[GetCertificateThumbprint(parameter('SiteHostHeaderName'), variable('Client.Cert.Store'))]",
37 |
38 | "Root.Cert.DnsName": "[concat('DO_NOT_TRUST_', parameter('RootCertName'))]",
39 | "Root.Cert.Store": "cert:\\LocalMachine\\Root",
40 |
41 | "ContentSearchConfig": "[concat(parameter('InstallDir'), '\\App_Config\\Sitecore\\ContentSearch\\Sitecore.ContentSearch.config')]",
42 | "ContentSearchEnabledXpath": "//configuration/sitecore/settings/setting[@name='ContentSearch.Enabled']",
43 | "MarketingConfigDir": "[concat(parameter('InstallDir'), '\\App_Config\\Sitecore\\Marketing.Operations.xMgmt')]"
44 | },
45 | "Modules": [ "SitecoreUtilityTasks" ],
46 | "Tasks": {
47 | "CreatePaths": {
48 | "Type": "EnsurePath",
49 | "Params": {
50 | "Exists": [
51 | "[parameter('CertPath')]"
52 | ]
53 | }
54 | },
55 | "CreateSignedCert": {
56 | "Type": "NewSignedCertificate",
57 | "Params": {
58 | "Signer": "[GetCertificate(variable('Root.Cert.DnsName'), variable('Root.Cert.Store'))]",
59 | "Path": "[parameter('CertPath')]",
60 | "CertStoreLocation": "[variable('Client.Cert.Store')]",
61 | "Name": "[parameter('SiteHostHeaderName')]",
62 | "DnsName": "[parameter('SiteHostHeaderName')]"
63 | }
64 | },
65 | "StopWebsite": {
66 | "Type": "ManageWebsite",
67 | "Params": {
68 | "Name": "[parameter('SiteName')]",
69 | "Action": "Stop"
70 | }
71 | },
72 | "StopAppPool": {
73 | "Type": "ManageAppPool",
74 | "Params": {
75 | "Name": "[parameter('SiteName')]",
76 | "Action": "Stop",
77 | "Timeout": 60
78 | }
79 | },
80 | "CreateBindingsWithThumprint": {
81 | "Description": "Creates SSL binding, removes the default *:80 web binding.",
82 | "Type": "WebBinding",
83 | "Params": {
84 | "SiteName": "[parameter('SiteName')]",
85 | "Add": [
86 | {
87 | "HostHeader": "[parameter('SiteHostHeaderName')]",
88 | "Protocol": "https",
89 | "SSLFlags": 1,
90 | "Thumbprint": "[variable('Security.SSL.CertificateThumbprint')]"
91 | },
92 | {
93 | "HostHeader": "[parameter('SiteHostHeaderName')]",
94 | "Protocol": "http",
95 | "Port": "80"
96 | }
97 | ]
98 | }
99 | },
100 | "CreateHostHeader": {
101 | "Type": "HostHeader",
102 | "Params": {
103 | "HostName": "[parameter('SiteHostHeaderName')]"
104 | }
105 | },
106 | "StartAppPool": {
107 | "Type": "ManageAppPool",
108 | "Params": {
109 | "Name": "[parameter('SiteName')]",
110 | "Action": "Start",
111 | "Timeout": 60
112 | }
113 | },
114 | "StartWebsite": {
115 | "Type": "ManageWebsite",
116 | "Params": {
117 | "Name": "[parameter('SiteName')]",
118 | "Action": "Start"
119 | }
120 | },
121 | "CopySiteUtilityFolder": {
122 | "Type": "Copy",
123 | "Params": {
124 | "Source": "[parameter('SiteUtilitiesSrc')]",
125 | "Destination": "[parameter('InstallDir')]"
126 | }
127 | },
128 | "DisableIndexUpdate": {
129 | "Type": "SetXml",
130 | "Params": [
131 | {
132 | "FilePath": "[variable('ContentSearchConfig'))]",
133 | "Xpath": "[variable('ContentSearchEnabledXpath')]",
134 | "Attributes": {
135 | "value": "false"
136 | }
137 | }
138 | ]
139 | },
140 | "DisableConfigFiles": {
141 | "Type": "DisableConfigFiles",
142 | "Params": {
143 | "ConfigDir": "[variable('MarketingConfigDir')]",
144 | "ConfigFileList": [ "Sitecore.Marketing.Search.config" ]
145 | }
146 | }
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/XC/install/assets/Resources/Configuration/Commerce/IdentityServer/IdentityServer.Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "CommerceInstallRoot": {
4 | "Type": "string",
5 | "Description": "The root path of commerce services.",
6 | "DefaultValue": ""
7 | },
8 | "SitecoreIdentityServerApplicationName": {
9 | "Type": "string",
10 | "Description": "Application name of Sitecore Identity Server in the IIS",
11 | "DefaultValue": ""
12 | },
13 | "CommerceServicesHostPostfix": {
14 | "Type": "string",
15 | "Description": "The postfix for Commerce Engine services host names",
16 | "DefaultValue": ""
17 | },
18 | "CommerceAuthoringServicesPort": {
19 | "Type": "string",
20 | "Description": "The postfix for Commerce Engine services host names",
21 | "DefaultValue": "5000"
22 | },
23 | "BizFxPort": {
24 | "Type": "string",
25 | "Description": "The postfix for Commerce Engine services host names",
26 | "DefaultValue": "4200"
27 | },
28 | "SiteName": {
29 | "Type": "string",
30 | "Description": "The name of the site to be deployed.",
31 | "DefaultValue": ""
32 | },
33 | "SiteHostHeaderName": {
34 | "Type": "string",
35 | "Description": "The host name for storefront.",
36 | "DefaultValue": ""
37 | },
38 | "CommerceEngineConnectClientId": {
39 | "Type": "string",
40 | "Description": "The Commerce Engine Connect Client Id for the Sitecore Identity Server",
41 | "DefaultValue": ""
42 | },
43 | "CommerceEngineConnectClientSecret": {
44 | "Type": "string",
45 | "Description": "Commerce Engine Connect Client Secret for Sitecore IDServer",
46 | "DefaultValue": ""
47 | }
48 | },
49 | "Variables": {
50 | "AuthoringLocalhost": "[concat('https://localhost:', parameter('CommerceAuthoringServicesPort'))]",
51 | "BizfxLocalhost": "[concat('https://localhost:', parameter('BizFxPort'))]",
52 | "Group1": "[concat(variable('BizfxLocalhost'), '|', variable('AuthoringLocalhost')))]",
53 | "AuthoringUrl": "[concat('https://commerceauthoring.', parameter('CommerceServicesHostPostfix'))]",
54 | "BizfxUrl": "[concat('https://bizfx.', parameter('CommerceServicesHostPostfix'))]",
55 | "Group2": "[concat(variable('BizfxUrl'), '|', variable('AuthoringUrl'))]",
56 | "SitecoreUrl": "[concat('https://', parameter('SiteName'), '|', 'http://', parameter('SiteName'))]",
57 | "StorefrontUrl": "[concat('https://', parameter('SiteHostHeaderName'), '|', 'http://', parameter('SiteHostHeaderName'))]",
58 | "CEConnectGroup": "[concat(variable('SitecoreUrl'), '|', variable('StorefrontUrl'))]",
59 | "CE.ClientSecret": "[parameter('CommerceEngineConnectClientSecret')]"
60 | },
61 | "Tasks": {
62 | "UpdateAllowedCorsOriginsGroup1": {
63 | "Type": "SetXml",
64 | "Params": {
65 | "FilePath": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
66 | "XPath": "//Settings/Sitecore/IdentityServer/Clients/CommerceClient/AllowedCorsOrigins/AllowedCorsOriginsGroup1",
67 | "Value": "[variable('Group1')]"
68 | }
69 | },
70 | "AddAllowedCorsOriginsGroup2": {
71 | "Skip": "[not(parameter('CommerceServicesHostPostfix'))]",
72 | "Type": "SetXml",
73 | "Params": {
74 | "FilePath": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
75 | "XPath": "//Settings/Sitecore/IdentityServer/Clients/CommerceClient/AllowedCorsOrigins",
76 | "Element": "AllowedCorsOriginsGroup2",
77 | "Value": "[variable('Group2')]"
78 | }
79 | },
80 | "UpdateCEConnectAllowedCorsOriginsGroup1": {
81 | "Type": "SetXml",
82 | "Params": {
83 | "FilePath": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
84 | "XPath": "//Settings/Sitecore/IdentityServer/Clients/CommerceEngineConnectClient/AllowedCorsOrigins/AllowedCorsOriginsGroup1",
85 | "Value": "[variable('CEConnectGroup')]"
86 | }
87 | },
88 | "UpdateCEConnectClientId": {
89 | "Type": "SetXml",
90 | "Params": {
91 | "FilePath": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
92 | "XPath": "//Settings/Sitecore/IdentityServer/Clients/CommerceEngineConnectClient/ClientId",
93 | "Value": "[parameter('CommerceEngineConnectClientId')]"
94 | }
95 | },
96 | "UpdateCEConnectClientSecret": {
97 | "Type": "SetXml",
98 | "Params": {
99 | "FilePath": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
100 | "XPath": "//Settings/Sitecore/IdentityServer/Clients/CommerceEngineConnectClient/ClientSecrets/ClientSecret1",
101 | "Value": "[variable('CE.ClientSecret')]"
102 | }
103 | },
104 | "CopyIdentityServerCommerceConfiguration": {
105 | "Type": "Copy",
106 | "Params": {
107 | "Source": ".\\IdentityServer\\Sitecore.Commerce.IdentityServer.Host.xml",
108 | "Destination": "[joinpath(parameter('CommerceInstallRoot'), concat(parameter('SitecoreIdentityServerApplicationName'), '\\Config\\production\\Sitecore.Commerce.IdentityServer.Host.xml'))]"
109 | }
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/Shared/assets/configuration/install-module.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "Package": {
4 | "Type": "string",
5 | "DefaultValue": "",
6 | "Description": "The path to the SCWDP to deploy."
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "DefaultValue": "Sitecore",
11 | "Description": "The name of the site to be deployed."
12 | },
13 | "DatabasePrefix": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "SQL DB Prefix"
17 | },
18 | "SqlAdminUser": {
19 | "Type": "string",
20 | "DefaultValue": "sa",
21 | "Description": "The Sql admin user account to use when installing databases."
22 | },
23 | "SqlAdminPassword": {
24 | "Type": "string",
25 | "DefaultValue": "12345",
26 | "Description": "The Sql admin password to use when installing databases."
27 | },
28 | "SqlServer": {
29 | "Type": "string",
30 | "DefaultValue": ".\\SQLSERVER",
31 | "Description": "The Sql Server where databases will be installed."
32 | },
33 | "ModuleDatabase": {
34 | "Type": "string",
35 | "DefaultValue": "",
36 | "Description": "Databases required for module install: ('master','mastercore','core')"
37 | }
38 | },
39 | "Variables": {
40 | "Sql.Database.Core": "[concat(parameter('DatabasePrefix'), '_Core')]",
41 | "Sql.Database.Master": "[concat(parameter('DatabasePrefix'), '_Master')]",
42 | "Sql.Core.ConnectionString": "[SqlConnectionString(parameter('SqlServer'),variable('Sql.Database.Core'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
43 | "Sql.Master.ConnectionString": "[SqlConnectionString(parameter('SqlServer'),variable('Sql.Database.Master'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
44 | "Skip.Master": "[not(equal(parameter('ModuleDatabase'), 'master'))]",
45 | "Skip.MasterCore": "[not(equal(parameter('ModuleDatabase'), 'mastercore'))]",
46 | "Skip.Core": "[not(equal(parameter('ModuleDatabase'), 'core'))]",
47 | "Skip.None":"[not(equal(parameter('ModuleDatabase'), 'none'))]"
48 | },
49 | "Settings": {
50 | "AutoRegisterExtensions": true
51 | },
52 | "Tasks": {
53 | "InstallWDPModuleNoDB": {
54 | "Type": "WebDeploy",
55 | "Params": {
56 | "Verb": "Sync",
57 | "Arguments": {
58 | "Source": {
59 | "Package": "[resolvepath(parameter('Package'))]"
60 | },
61 | "Dest": "Auto",
62 | "EnableRule": "DoNotDeleteRule",
63 | "SetParam": [
64 | {
65 | "Name": "IIS Web Application name",
66 | "Value": "[parameter('SiteName')]"
67 | }
68 | ]
69 | }
70 | },
71 | "Skip": "[variable('Skip.None')]"
72 | },
73 | "InstallWDPModuleMasterCore": {
74 | "Type": "WebDeploy",
75 | "Params": {
76 | "Verb": "Sync",
77 | "Arguments": {
78 | "Source": {
79 | "Package": "[resolvepath(parameter('Package'))]"
80 | },
81 | "Dest": "Auto",
82 | "EnableRule": "DoNotDeleteRule",
83 | "SetParam": [
84 | {
85 | "Name": "Application Path",
86 | "Value": "[parameter('SiteName')]"
87 | },
88 | {
89 | "Name": "Core Admin Connection String",
90 | "Value": "[variable('Sql.Core.ConnectionString')]"
91 | },
92 | {
93 | "Name": "Master Admin Connection String",
94 | "Value": "[variable('Sql.Master.ConnectionString')]"
95 | }
96 | ]
97 | }
98 | },
99 | "Skip": "[equal(variable('Skip.MasterCore'),'True')]"
100 | },
101 | "InstallWDPModuleMaster": {
102 | "Type": "WebDeploy",
103 | "Params": {
104 | "Verb": "Sync",
105 | "Arguments": {
106 | "Source": {
107 | "Package": "[resolvepath(parameter('Package'))]"
108 | },
109 | "Dest": "Auto",
110 | "EnableRule": "DoNotDeleteRule",
111 | "SetParam": [
112 | {
113 | "Name": "Application Path",
114 | "Value": "[parameter('SiteName')]"
115 | },
116 | {
117 | "Name": "Master Admin Connection String",
118 | "Value": "[variable('Sql.Master.ConnectionString')]"
119 | }
120 | ]
121 | }
122 | },
123 | "Skip": "[equal(variable('Skip.Master'),'True')]"
124 | },
125 | "InstallWDPModuleCore": {
126 | "Type": "WebDeploy",
127 | "Params": {
128 | "Verb": "Sync",
129 | "Arguments": {
130 | "Source": {
131 | "Package": "[resolvepath(parameter('Package'))]"
132 | },
133 | "Dest": "Auto",
134 | "EnableRule": "DoNotDeleteRule",
135 | "SetParam": [
136 | {
137 | "Name": "Application Path",
138 | "Value": "[parameter('SiteName')]"
139 | },
140 | {
141 | "Name": "Core Admin Connection String",
142 | "Value": "[variable('Sql.Core.ConnectionString')]"
143 | }
144 | ]
145 | }
146 | },
147 | "Skip": "[equal(variable('Skip.Core'),'True')]"
148 | }
149 | }
150 | }
--------------------------------------------------------------------------------
/Shared/assets/configuration/download-and-install-module.json:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "ModuleConfiguration": {
4 | "Type": "psobject",
5 | "DefaultValue": "",
6 | "Description": "The hashtable of the package to deploy."
7 | },
8 | "SiteName": {
9 | "Type": "string",
10 | "DefaultValue": "Sitecore",
11 | "Description": "The name of the site to be deployed."
12 | },
13 | "DatabasePrefix": {
14 | "Type": "string",
15 | "DefaultValue": "",
16 | "Description": "SQL DB Prefix"
17 | },
18 | "SqlAdminUser": {
19 | "Type": "string",
20 | "DefaultValue": "sa",
21 | "Description": "The Sql admin user account to use when installing databases."
22 | },
23 | "SqlAdminPassword": {
24 | "Type": "string",
25 | "DefaultValue": "12345",
26 | "Description": "The Sql admin password to use when installing databases."
27 | },
28 | "SqlServer": {
29 | "Type": "string",
30 | "DefaultValue": ".\\SQLSERVER",
31 | "Description": "The Sql Server where databases will be installed."
32 | },
33 | "LoginSession": {
34 | "Type": "Microsoft.PowerShell.Commands.WebRequestSession",
35 | "DefaultValue": "",
36 | "Description": "dev.sitecore.com login session"
37 | }
38 | },
39 | "Variables": {
40 | "Sql.Database.Core": "[concat(parameter('DatabasePrefix'), '_Core')]",
41 | "Sql.Database.Master": "[concat(parameter('DatabasePrefix'), '_Master')]",
42 | "Sql.Core.ConnectionString": "[SqlConnectionString(parameter('SqlServer'),variable('Sql.Database.Core'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
43 | "Sql.Master.ConnectionString": "[SqlConnectionString(parameter('SqlServer'),variable('Sql.Database.Master'), parameter('SqlAdminUser'), parameter('SqlAdminPassword'))]",
44 | "Module.Configuration": "[parameter('ModuleConfiguration')]",
45 | "Module.Databases": "[SelectObject(ExpandProperty:'databases',InputObject:variable('Module.Configuration'))]",
46 | "Module.Database": "[ReplaceString(variable('Module.Databases'),',','')]",
47 | "Module.Url": "[SelectObject(ExpandProperty:'url',InputObject:variable('Module.Configuration'))]",
48 | "Module.OriginalFileName": "[SelectObject(ExpandProperty:'fileName',InputObject:variable('Module.Configuration'))]",
49 | "Module.FileName": "[if(variable('Module.test'),variable('Module.True'),variable('Module.False'))]",
50 | "Module.Test": "[and(not(variable('Module.IsScwdp')), not(variable('Skip.Convert')))]",
51 | "Module.True": "[ReplaceString(variable('Module.OriginalFileName'), 'zip','scwdp.zip')]",
52 | "Module.False": "[variable('Module.OriginalFileName')]",
53 | "Module.IsScwdp": "[ValidatePattern('scwdp.zip', variable('Module.OriginalFileName'))]",
54 | "Module.DestinationPath": "[SplitPath(variable('Module.OriginalFileName'))]",
55 | "Skip.Download": "[TestPath(variable('Module.OriginalFileName'))]",
56 | "Check.Convert":"[SelectObject(ExpandProperty:'convert',InputObject:variable('Module.Configuration'))]",
57 | "Skip.Convert": "[or(not(variable('Check.Convert')),variable('Module.IsScwdp'))]",
58 | "Skip.Master": "[not(equal(variable('Module.Database'), 'master'))]",
59 | "Skip.MasterCore": "[not(equal(variable('Module.Database'), 'mastercore'))]",
60 | "Skip.Core": "[not(equal(variable('Module.Database'), 'core'))]",
61 | "ProgressPreferencePath": "[resolvepath('..\\modules\\Set-ProgressPreference.ps1')]"
62 | },
63 | "Register":{
64 | "Tasks":{
65 | "InstallSitecoreModule":"Install-SitecoreConfiguration",
66 | "ConvertToWDP":"ConvertTo-SCModuleWebDeployPackage"
67 | }
68 | },
69 | "Settings": {
70 | "AutoRegisterExtensions": true
71 | },
72 | "Tasks": {
73 | "TurnOffProgress": {
74 | "Type": "Command",
75 | "Params": {
76 | "Path": "[variable('ProgressPreferencePath')]",
77 | "Arguments": "SilentlyContinue"
78 | }
79 | },
80 | "DownloadModule": {
81 | "Type": "DownloadFile",
82 | "Params": {
83 | "SourceUri": "[variable('Module.Url')]",
84 | "DestinationPath": "[variable('Module.OriginalFileName')]",
85 | "LoginSession": "[parameter('LoginSession')]"
86 | },
87 | "Skip": "[equal(variable('Skip.Download'),'True')]"
88 | },
89 | "TurnOnProgress": {
90 | "Type": "Command",
91 | "Params": {
92 | "Path": "[variable('ProgressPreferencePath')]",
93 | "Arguments": "Continue"
94 | }
95 | },
96 | "ConvertModuleToScwdp": {
97 | "Type": "ConvertToWDP",
98 | "Params": {
99 | "Path": "[variable('Module.OriginalFileName')]",
100 | "Destination": "[variable('Module.DestinationPath')]",
101 | "Force": true
102 | },
103 | "Skip": "[variable('Skip.Convert')]"
104 | },
105 | "InstallModule": {
106 | "Type": "InstallSitecoreModule",
107 | "Params": {
108 | "Path": "[resolvepath('.\\install-module.json')]",
109 | "Package": "[resolvepath(variable('Module.FileName'))]",
110 | "SiteName": "[parameter('SiteName')]",
111 | "DatabasePrefix": "[parameter('DatabasePrefix')]",
112 | "SqlAdminUser": "[parameter('SqlAdminUser')]",
113 | "SqlAdminPassword": "[parameter('SqlAdminPassword')]",
114 | "SqlServer": "[parameter('SqlServer')]",
115 | "ModuleDatabase": "[variable('Module.Database')]"
116 | }
117 | }
118 | }
119 | }
--------------------------------------------------------------------------------
/XP/install/set-installation-overrides.ps1.example:
--------------------------------------------------------------------------------
1 | Param(
2 | [string] $configurationFile = "configuration-xp0.json",
3 | [string] $prefix = "habitathome",
4 | [string] $assetsJsonPath = "assets.json"
5 | )
6 |
7 | # Replace the values in this file with your installation Overrides
8 | # all objects in the install-settings.json file can be overridden in this file
9 |
10 | # You can remove any items that you do not need to override. Keep in mind the dependency on other settings when removing items.
11 | # For example, $assets is used in various sections.
12 |
13 | Write-Host "Setting Local Overrides in $configurationFile"
14 |
15 | $json = Get-Content -Raw $configurationFile | ConvertFrom-Json
16 |
17 | # Assets and prerequisites
18 | $assets = $json.assets
19 | $assets.licenseFilePath = Join-Path $assets.packageRepository "license.xml"
20 |
21 | # Allows for custom SIF identityServerVersion
22 | $assets.psRepository = "https://sitecore.myget.org/F/sc-powershell/api/v2/"
23 | $assets.psRepositoryName = "SitecoreGallery"
24 | $assets.installerVersion = "2.2.0"
25 | # Settings
26 |
27 | # Site Settings
28 | $site = $json.settings.site
29 | $site.prefix = $prefix
30 | $site.suffix = "dev.local"
31 | $site.webroot = "C:\inetpub\wwwroot"
32 | $site.hostName = $json.settings.site.prefix + "." + $json.settings.site.suffix
33 |
34 | # Sitecore Parameters
35 | $sitecore = $json.settings.sitecore
36 | $sitecore.adminPassword = "b"
37 | $sitecore.exmCryptographicKey = "0x0000000000000000000000000000000000000000000000000000000000000000"
38 | $sitecore.exmAuthenticationKey = "0x0000000000000000000000000000000000000000000000000000000000000000"
39 | $sitecore.telerikEncryptionKey = "PutYourCustomEncryptionKeyHereFrom32To256CharactersLong"
40 |
41 | # Solr Parameters
42 | $solr = $json.settings.solr
43 | $solr.url = "https://localhost:8811/solr"
44 | $solr.root = "c:\solr\solr-8.1.1"
45 | $solr.serviceName = "Solr-8.1.1"
46 |
47 | # SQL Settings
48 | $sql = $json.settings.sql
49 |
50 | $SqlSaPassword = "Str0NgPA33w0rd!!"
51 | $SqlStrongPassword = $SqlSaPassword # Used for all other services
52 | $sql.server = "."
53 | $sql.adminUser = "sa"
54 |
55 | # #### EXAMPLE additional bindings
56 | # $otherAdditionalBinding = [ordered]@{
57 | # hostName = "otherexample.dev.local"
58 | # createCertificate = $false
59 | # port = 443
60 | # }
61 | # $otherAdditionalBinding = $otherAdditionalBinding | ConvertTo-Json
62 | # $site.additionalBindings += (ConvertFrom-Json -InputObject $otherAdditionalBinding)
63 |
64 | ##### You should not need to modify settings below
65 |
66 | $sql.adminPassword = $SqlSaPassword
67 | $sql.userPassword = $SqlStrongPassword
68 | $sql.coreUser = "coreuser"
69 | $sql.corePassword = $SqlStrongPassword
70 | $sql.masterUser = "masteruser"
71 | $sql.masterPassword = $SqlStrongPassword
72 | $sql.webUser = "webuser"
73 | $sql.webPassword = $SqlStrongPassword
74 | $sql.collectionUser = "collectionuser"
75 | $sql.collectionPassword = $SqlStrongPassword
76 | $sql.reportingUser = "reportinguser"
77 | $sql.reportingPassword = $SqlStrongPassword
78 | $sql.processingEngineUser = "processingengineuser"
79 | $sql.processingEnginePassword = $SqlStrongPassword
80 | $sql.processingPoolsUser = "poolsuser"
81 | $sql.processingPoolsPassword = $SqlStrongPassword
82 | $sql.processingTasksUser = "tasksuser"
83 | $sql.processingTasksPassword = $SqlStrongPassword
84 | $sql.referenceDataUser = "referencedatauser"
85 | $sql.referenceDataPassword = $SqlStrongPassword
86 | $sql.marketingAutomationUser = "marketingautomationuser"
87 | $sql.marketingAutomationPassword = $SqlStrongPassword
88 | $sql.formsUser = "formsuser"
89 | $sql.formsPassword = $SqlStrongPassword
90 | $sql.exmMasterUser = "exmmasteruser"
91 | $sql.exmMasterPassword = $SqlStrongPassword
92 | $sql.messagingUser = "messaginguser"
93 | $sql.messagingPassword = $SqlStrongPassword
94 | $sql.securityuser = "securityuser"
95 | $sql.securityPassword = $SqlStrongPassword
96 |
97 | # XConnect Parameters
98 | $xConnect = $json.settings.xConnect
99 | $xConnect.siteName = $site.prefix + "_xconnect." + $site.suffix
100 | $xConnect.siteRoot = Join-Path $site.webRoot -ChildPath $xConnect.siteName
101 |
102 | # IdentityServer Parameters
103 | $identityServer = $json.settings.identityServer
104 | $identityServer.packagePath = Join-Path $assets.packageRepository $("Sitecore.IdentityServer " + $assets.identityServerVersion + " (OnPrem)_identityserver.scwdp.zip")
105 | $identityServer.name = $site.prefix + "-identityserver." + $site.suffix
106 | $identityServer.url = ("https://{0}" -f $identityServer.name)
107 | $identityServer.clientSecret = "ClientSecret"
108 |
109 | Write-Host "Setting modules parameters in $configurationFile"
110 | # Modules
111 |
112 | Function Reset-Path {
113 | param(
114 | $module,
115 | $root
116 | )
117 | $module.fileName = (Join-Path $root ("\modules\{0}" -f $module.fileName))
118 | }
119 |
120 | $modulesConfig = Get-Content $assetsJsonPath -Raw -Encoding Ascii | ConvertFrom-Json
121 | $modules = $json.modules
122 | $sitecore = $modulesConfig.sitecore
123 |
124 | $config = @{
125 | id = $sitecore.id
126 | name = $sitecore.name
127 | fileName = Join-Path $assets.packageRepository ("\{0}" -f $sitecore.fileName)
128 | url = $sitecore.url
129 | extract = $sitecore.extract
130 | source = $sitecore.source
131 | databases = $sitecore.databases
132 | }
133 | $config = $config| ConvertTo-Json
134 | $modules += (ConvertFrom-Json -InputObject $config)
135 |
136 | foreach ($module in $modulesConfig.modules) {
137 | Reset-Path $module $assets.packageRepository
138 | }
139 | $modules += $modulesConfig.modules
140 |
141 | $json.modules = $modules
142 |
143 | Set-Content $configurationFile (ConvertTo-Json -InputObject $json -Depth 6)
144 |
--------------------------------------------------------------------------------