Skip to content

Instantly share code, notes, and snippets.

@dsolovay
Last active September 14, 2021 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsolovay/952123d11b91374454d5a927f95d7349 to your computer and use it in GitHub Desktop.
Save dsolovay/952123d11b91374454d5a927f95d7349 to your computer and use it in GitHub Desktop.
SIF for creating a duplicate ID server (for dev testing, plugin development, etc.)
# A subset of XP0_SingleDeveloper.ps1 for creating duplicate ID servers for plugin development.
# Note values marked "UPDATE FROM EXISTING" should be updated based on a working starting point ID server (installed using SIF or the
# graphical installer).
# The Prefix that will be used on SOLR, Website and Database instances.
$Prefix = "UPDATE FROM EXISTING"
# The root folder with the license file and WDP files.
$SCInstallRoot = "C:\ResourceFiles"
$SitecoreSiteName="UPDATE FROM EXISTING"
# Identity Server site name
$IdentityServerSiteName = "TestIdServer1"
# The Path to the license file
$LicenseFile = "c:\license\license.xml"
$IdentityServerPackage = (Get-ChildItem "$SCInstallRoot\Sitecore.IdentityServer * rev. * (OnPrem)_identityserver.*scwdp.zip").FullName
# The Identity Server password recovery URL, this should be the URL of the CM Instance
$PasswordRecoveryUrl = "UPDATE FROM EXISTING"
# The URL of the Identity Server
$SitecoreIdentityAuthority = "https://$IdentityServerSiteName"
# The random string key used for establishing connection with IdentityService. This will be regenerated if left on the default.
$ClientSecret = "UPDATE FROM EXISTING"
# Pipe-separated list of instances (URIs) that are allowed to login via Sitecore Identity.
$AllowedCorsOrigins = "https://$SitecoreSiteName"
$SqlSecurityPassword = "UPDATE FROM EXISTING"
$SqlServer = "localhost"
# Install XP0 via combined partials file.
$singleDeveloperParams = @{
Path = "$SCInstallRoot\XP0-SingleDeveloper.json"
SqlServer = $SqlServer
SqlSecurityPassword = $SqlSecurityPassword
Prefix = $Prefix
IdentityServerCertificateName = $IdentityServerSiteName
IdentityServerSiteName = $IdentityServerSiteName
LicenseFile = $LicenseFile
IdentityServerPackage = $IdentityServerPackage
PasswordRecoveryUrl = $PasswordRecoveryUrl
SitecoreIdentityAuthority = $SitecoreIdentityAuthority
ClientSecret = $ClientSecret
AllowedCorsOrigins = $AllowedCorsOrigins
From = "IdentityServerCertificates_CreatePaths"
To = "IdentityServer_StartWebsite"
}
Push-Location $SCInstallRoot
Install-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Object XP0-SingleDeveloper.log
# Uncomment the below line and comment out the above if you want to remove the XP0 SingleDeveloper Config
#Uninstall-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Object XP0-SingleDeveloper-Uninstall.log
Pop-Location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment