SIF/1012/Platform/XM1-SingleDeveloper.json

{
    "Parameters": {
        "LicenseFile": {
            "Type": "String",
            "Description": "The path to the Sitecore license file.",
            "DefaultValue": ".\\License.xml"
        },
        "IdentityServerCertificateName": {
            "Type": "String",
            "Description": "The name of the certificate to be created for the identity server.",
            "DefaultValue": ""
        },
        "IdentityServerSiteName": {
            "Type": "String",
            "Description": "The name of the identity server to be created.",
            "DefaultValue": "IdentityServer"
        },
        "Prefix": {
            "Type": "String",
            "DefaultValue": "SC910",
            "Description": "The prefix for uniquely identifying instances."
        },
        "SitecoreContentManagementSiteName": {
            "Type": "string",
            "DefaultValue": "SitecoreXM1CD",
            "Description": "The name of the content management site to be deployed."
        },
        "SitecoreContentDeliverySiteName": {
            "Type": "string",
            "DefaultValue": "SitecoreXP1CM",
            "Description": "The name of the content delivery site to be deployed."
        },
        "SitecoreAdminPassword": {
            "Type": "string",
            "DefaultValue": "",
            "Description": "The admin password for the Sitecore instance."
        },
        "SiteRoot": {
            "Type": "String",
            "Description": "Root folder to install the site to. If left on the default [systemdrive]:\\inetpub\\wwwroot will be used.",
            "DefaultValue": ""
        },
        "SqlAdminUser": {
            "Type": "string",
            "DefaultValue": "sa",
            "Description": "The Sql admin user account to use when installing databases."
        },
        "SqlAdminPassword": {
            "Type": "string",
            "DefaultValue": "12345",
            "Description": "The Sql admin password to use when installing databases."
        },
        "SQLServer": {
            "Type": "String",
            "DefaultValue": "Localhost",
            "Description": "The Sql Server where databases will be installed."
        },
        "SqlFormsPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Experience Forms connection string in Sitecore."
        },
        "SqlSecurityPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Security connection string in Sitecore."
        },
        "SqlCorePassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Core connection string in Sitecore."
        },
        "SqlMasterPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Master connection string in Sitecore."
        },
        "SqlWebPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Web connection string in Sitecore."
        },
        "SolrUrl": {
            "Type": "String",
            "DefaultValue": "https://localhost:8983/solr",
            "Description": "The Solr instance to use."
        },
        "SolrRoot": {
            "Type": "String",
            "DefaultValue": "C:\\solr-8.4.0",
            "Description": "The file path to the Solr instance."
        },
        "SolrService": {
            "Type": "String",
            "DefaultValue": "Solr-8.4.0",
            "Description": "The name of the Solr service."
        },
        "SitecoreContentManagementPackage": {
            "Type": "String",
            "DefaultValue": "",
            "Description": "The path to the Sitecore package to deploy."
        },
        "SitecoreContentDeliveryPackage": {
            "Type": "String",
            "DefaultValue": "",
            "Description": "The path to the Sitecore package to deploy."
        },
        "IdentityServerPackage": {
            "Type": "String",
            "DefaultValue": "",
            "Description": "The path to the Identity Server package to deploy."
        },
        "PasswordRecoveryUrl": {
            "Type": "string",
            "Description": "Password recovery Url (Host name of CM instance).",
            "DefaultValue": "http:\\"
        },
        "ClientsConfiguration": {
            "Type": "string",
            "DefaultValue": "",
            "Description": "Sitecore IdentityServer clients configuration"
        },
        "AllowedCorsOrigins": {
            "Type": "string",
            "Description": "Pipe-separated list of instances (URIs) that are allowed to login via Sitecore Identity.",
            "DefaultValue": ""
        },
        "ClientSecret": {
            "Type": "string",
            "Description": "Client secret of PasswordClient section. It's a random string between 1 and 100 symbols long.",
            "DefaultValue": "IdentityServerClientSecret"
        },
        "SitecoreIdentityAuthority": {
            "Type": "string",
            "DefaultValue": "https://SitecoreIdentityServerHost",
            "Description": "IdentityServer provider URI."
        },
        "PackagesTempLocation": {
            "Type": "String",
            "Description": "Alternative location to save WDP packages. If left on the default $Env:Temp will be used.",
            "DefaultValue": ""
        },
        "DownloadLocations": {
            "Type": "String",
            "Description": "File with URI and SHA256 hashes of dynamically downloadable WDPs.",
            "DefaultValue": ".\\downloads.json"
        },
        "DisableHttpsForCD": {
            "Type": "bool",
            "Description": "The option for the enable/disable HTTPS to the Sitecore Content Delivery.",
            "DefaultValue": false
        },
        "Update": {
            "Type": "bool",
            "Description": "The parameter for the installing delta WDP packages.",
            "DefaultValue": false
        },
        "SitecoreSolr:SolrUrl": {
            "Type": "String",
            "Reference": "SolrUrl",
            "Description": "Override to pass SolrURL value to SitecoreSolr config."
        },
        "SitecoreCM:SolrUrl": {
            "Type": "String",
            "Reference": "SolrUrl",
            "Description": "Override to pass SolrURL value to SitecoreCM config."
        },
        "SitecoreCD:SolrUrl": {
            "Type": "String",
            "Reference": "SolrUrl",
            "Description": "Override to pass SolrURL value to SitecoreCD config."
        },
        "SitecoreSolr:SolrRoot": {
            "Type": "String",
            "Reference": "SolrRoot",
            "Description": "Override to pass SolrRoot value to SitecoreSolr config."
        },
        "SitecoreSolr:SolrService": {
            "Type": "String",
            "Reference": "SolrService",
            "Description": "Override to pass SolrService value to SitecoreSolr config."
        },
        "SitecoreSolr:SolrCorePrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to SitecoreSolr config."
        },
        "SitecoreCM:SolrCorePrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to SitecoreCM config."
        },
        "SitecoreCD:SolrCorePrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to SitecoreCD config."
        },
        "SitecoreCM:LicenseFile": {
            "Type": "String",
            "Reference": "LicenseFile",
            "Description": "Override to pass LicenseFile value to SitecoreCM config."
        },
        "SitecoreCD:LicenseFile": {
            "Type": "String",
            "Reference": "LicenseFile",
            "Description": "Override to pass LicenseFile value to SitecoreCD config."
        },
        "IdentityServerCertificates:CertificateName": {
            "Type": "String",
            "Reference": "IdentityServerCertificateName",
            "Description": "Override to pass IdentityServerCertificateName value to IdentityServerCertificates config."
        },
        "IdentityServerCertificates:Update": {
            "Type": "bool",
            "Reference": "Update",
            "Description": "Override to pass Update value to Certificates config."
        },
        "IdentityServer:SiteName": {
            "Type": "String",
            "Reference": "IdentityServerSiteName",
            "Description": "Override to pass IdentityServerSiteName value to IdentityServer config."
        },
        "SitecoreCM:SiteName": {
            "Type": "String",
            "Reference": "SitecoreContentManagementSiteName",
            "Description": "Override to pass SitecoreContentManagementSiteName value to SitecoreCM config."
        },
        "SitecoreCD:SiteName": {
            "Type": "String",
            "Reference": "SitecoreContentDeliverySiteName",
            "Description": "Override to pass SitecoreContentDeliverySiteName value to SitecoreCD config."
        },
        "IdentityServer:SiteRoot": {
            "Type": "String",
            "Reference": "SiteRoot",
            "Description": "Override to pass SiteRoot value to IdentityServer config."
        },
        "SitecoreCM:SiteRoot": {
            "Type": "String",
            "Reference": "SiteRoot",
            "Description": "Override to pass SiteRoot value to SitecoreCM config."
        },
        "SitecoreCD:SiteRoot": {
            "Type": "String",
            "Reference": "SiteRoot",
            "Description": "Override to pass SiteRoot value to SitecoreCD config."
        },
        "IdentityServer:SitecoreIdentityCert": {
            "Type": "String",
            "Reference": "IdentityServerCertificateName",
            "Description": "Override to pass IdentityServerCertificateName value to IdentityServer config."
        },
        "IdentityServer:LicenseFile": {
            "Type": "String",
            "Reference": "LicenseFile",
            "Description": "Override to pass LicenseFile value to IdentityServer config."
        },
        "IdentityServer:ClientsConfiguration": {
            "Type": "String",
            "Reference": "ClientsConfiguration",
            "Description": "Override to pass ClientsConfiguration value to IdentityServer config."
        },
        "IdentityServer:PasswordRecoveryUrl": {
            "Type": "String",
            "Reference": "PasswordRecoveryUrl",
            "Description": "Override to pass PasswordRecoveryUrl value to IdentityServer config."
        },
        "SitecoreCM:Package": {
            "Type": "String",
            "Reference": "SitecoreContentManagementPackage",
            "Description": "Override to pass SitecoreContentManagementPackage value to SitecoreXP0 config."
        },
        "SitecoreCD:Package": {
            "Type": "String",
            "Reference": "SitecoreContentDeliveryPackage",
            "Description": "Override to pass SitecoreContentDeliveryPackage value to SitecoreXP0 config."
        },
        "IdentityServer:Package": {
            "Type": "String",
            "Reference": "IdentityServerPackage",
            "Description": "Override to pass IdentityServerPackage value to IdentityServer config."
        },
        "SitecoreCM:SqlDbPrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to SitecoreCM config."
        },
        "SitecoreCD:SqlDbPrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to SitecoreCD config."
        },
        "IdentityServer:SqlDbPrefix": {
            "Type": "String",
            "Reference": "Prefix",
            "Description": "Override to pass Prefix value to IdentityServer config."
        },
        "SitecoreCM:SqlServer": {
            "Type": "String",
            "Reference": "SQLServer",
            "Description": "Override to pass SqlServer value to SitecoreCM config."
        },
        "SitecoreCD:SqlServer": {
            "Type": "String",
            "Reference": "SQLServer",
            "Description": "Override to pass SqlServer value to SitecoreCD config."
        },
        "IdentityServer:SqlServer": {
            "Type": "String",
            "Reference": "SQLServer",
            "Description": "Override to pass SqlServer value to IdentityServer config."
        },
        "SitecoreCM:SqlAdminUser": {
            "Type": "String",
            "Reference": "SqlAdminUser",
            "Description": "Override to pass SqlAdminUser value to SitecoreCM config."
        },
        "SitecoreCM:SqlAdminPassword": {
            "Type": "String",
            "Reference": "SqlAdminPassword",
            "Description": "Override to pass SqlAdminPassword value to SitecoreCM config."
        },
        "IdentityServer:AllowedCorsOrigins": {
            "Type": "String",
            "Reference": "AllowedCorsOrigins",
            "Description": "Override to pass AllowedCorsOrigins value to IdentityServer config."
        },
        "SitecoreCM:SitecoreIdentityAuthority": {
            "Type": "String",
            "Reference": "SitecoreIdentityAuthority",
            "Description": "Override to pass SitecoreIdentityAuthority value to SitecoreCM config."
        },
        "SitecoreCD:SitecoreIdentityAuthority": {
            "Type": "String",
            "Reference": "SitecoreIdentityAuthority",
            "Description": "Override to pass SitecoreIdentityAuthority name value to SitecoreCD config."
        },
        "IdentityServer:PackagesTempLocation": {
            "Type": "String",
            "Reference": "PackagesTempLocation",
            "Description": "Override to pass PackagesTempLocation value to IdentityServer config."
        },
        "SitecoreCD:PackagesTempLocation": {
            "Type": "String",
            "Reference": "PackagesTempLocation",
            "Description": "Override to pass PackagesTempLocation name value to SitecoreCD config."
        },
        "SitecoreCM:PackagesTempLocation": {
            "Type": "String",
            "Reference": "PackagesTempLocation",
            "Description": "Override to pass PackagesTempLocation name value to SitecoreCM config."
        },
        "IdentityServer:DownloadLocations": {
            "Type": "String",
            "Reference": "DownloadLocations",
            "Description": "Override to pass DownloadLocations value to IdentityServer config."
        },
        "SitecoreCD:DownloadLocations": {
            "Type": "String",
            "Reference": "DownloadLocations",
            "Description": "Override to pass DownloadLocations name value to SitecoreCD config."
        },
        "SitecoreCM:DownloadLocations": {
            "Type": "String",
            "Reference": "DownloadLocations",
            "Description": "Override to pass DownloadLocations name value to SitecoreCM config."
        },
        "SitecoreCM:SitecoreAdminPassword": {
            "Type": "String",
            "Reference": "SitecoreAdminPassword",
            "Description": "Override to pass SitecoreAdminPassword name value to SitecoreCM config."
        },
        "SitecoreCD:DisableHttps": {
            "Type": "bool",
            "Reference": "DisableHttpsForCD",
            "Description": "Override to pass DisableHttpsForCD value to SitecoreCD config."
        },
        "SitecoreCD:Update": {
            "Type": "bool",
            "Reference": "Update",
            "Description": "Override to pass Update value to SitecoreCD config."
        },
        "SitecoreCM:Update": {
            "Type": "bool",
            "Reference": "Update",
            "Description": "Override to pass Update value to SitecoreCM config."
        },
        "IdentityServer:Update": {
            "Type": "bool",
            "Reference": "Update",
            "Description": "Override to pass Update value to IdentityServer config."
        },
        "SitecoreSolr:Update": {
            "Type": "bool",
            "Reference": "Update",
            "Description": "Override to pass Update value to SitecoreSolr config."
        }
    },
    "Variables": {
        "Sql.Database.Core.Password": "[if(variable('Sql.Database.Core.Password.Test'),variable('Sql.Database.Core.Password.Generate'),parameter('SqlCorePassword'))]",
        "Sql.Database.Core.Password.Test": "[equal(parameter('SqlCorePassword'),'SIF-Default')]",
        "Sql.Database.Core.Password.Generate": "[randomstring(Length:20,DisAllowSpecial:True,EnforceComplexity:True)]",
 
        "SitecoreCM:Sql.Database.Core.Password": "[variable('Sql.Database.Core.Password')]",
 
        "Sql.Database.Security.Password": "[if(variable('Sql.Database.Security.Password.Test'),variable('Sql.Database.Security.Password.Generate'),parameter('SqlSecurityPassword'))]",
        "Sql.Database.Security.Password.Test": "[equal(parameter('SqlSecurityPassword'),'SIF-Default')]",
        "Sql.Database.Security.Password.Generate": "[randomstring(Length:20,DisAllowSpecial:True,EnforceComplexity:True)]",
 
        "SitecoreCM:Sql.Database.Security.Password": "[variable('Sql.Database.Security.Password')]",
        "SitecoreCD:Sql.Database.Security.Password": "[variable('Sql.Database.Security.Password')]",
        "IdentityServer:Sql.Database.Security.Password": "[variable('Sql.Database.Security.Password')]",
 
        "Sql.Database.Master.Password": "[if(variable('Sql.Database.Master.Password.Test'),variable('Sql.Database.Master.Password.Generate'),parameter('SqlMasterPassword'))]",
        "Sql.Database.Master.Password.Test": "[equal(parameter('SqlMasterPassword'),'SIF-Default')]",
        "Sql.Database.Master.Password.Generate": "[randomstring(Length:20,DisAllowSpecial:True,EnforceComplexity:True)]",
 
        "SitecoreCM:Sql.Database.Master.Password": "[variable('Sql.Database.Master.Password')]",
 
        "Sql.Database.Web.Password": "[if(variable('Sql.Database.Web.Password.Test'),variable('Sql.Database.Web.Password.Generate'),parameter('SqlWebPassword'))]",
        "Sql.Database.Web.Password.Test": "[equal(parameter('SqlWebPassword'),'SIF-Default')]",
        "Sql.Database.Web.Password.Generate": "[randomstring(Length:20,DisAllowSpecial:True,EnforceComplexity:True)]",
 
        "SitecoreCM:Sql.Database.Web.Password": "[variable('Sql.Database.Web.Password')]",
        "SitecoreCD:Sql.Database.Web.Password": "[variable('Sql.Database.Web.Password')]",
 
        "Sql.Database.Forms.Password": "[if(variable('Sql.Database.Forms.Password.Test'),variable('Sql.Database.Forms.Password.Generate'),parameter('SqlFormsPassword'))]",
        "Sql.Database.Forms.Password.Test": "[equal(parameter('SqlFormsPassword'),'SIF-Default')]",
        "Sql.Database.Forms.Password.Generate": "[randomstring(Length:20,DisAllowSpecial:True,EnforceComplexity:True)]",
 
        "SitecoreCM:Sql.Database.Forms.Password": "[variable('Sql.Database.Forms.Password')]",
        "SitecoreCD:Sql.Database.Forms.Password": "[variable('Sql.Database.Forms.Password')]",
 
        "IdentityServer.Client.Secret": "[if(variable('IdentityServer.Client.Secret.Test'),variable('IdentityServer.Client.Secret.Generate'),parameter('ClientSecret'))]",
        "IdentityServer.Client.Secret.Test": "[equal(parameter('ClientSecret'),'SIF-Default')]",
        "IdentityServer.Client.Secret.Generate": "[randomstring(Length:100,DisAllowSpecial:True)]",
 
        "IdentityServer:IdentityServer.Client.Secret": "[variable('IdentityServer.Client.Secret')]",
        "SitecoreCM:IdentityServer.Client.Secret": "[variable('IdentityServer.Client.Secret')]"
    },
    "Includes": {
        "IdentityServerCertificates": {
            "Source": ".\\..\\Certificates\\createcert.json"
        },
        "IdentityServer": {
            "Source": ".\\identityServer.json"
        },
        "SitecoreSolr": {
            "Source": ".\\Sitecore-solr.json"
        },
        "SitecoreCM": {
            "Source": ".\\Sitecore-XM1-cm.json"
        },
        "SitecoreCD": {
            "Source": ".\\Sitecore-XM1-cd.json"
        }
    },
    "Register": {
        "Tasks": {
            "SetVariable": "Set-Variable"
        }
    },
    "Tasks": {
        "GeneratePasswords": {
            "Description": "Generates all shared passwords and secrets.",
            "Type": "SetVariable",
            "Params": {
                "Name": "XM1Passwords",
                "Scope": "Global",
                "Value": [
                    {
                        "SqlCorePassword": "[variable('Sql.Database.Core.Password')]"
                    },
                    {
                        "SqlSecurityPassword": "[variable('Sql.Database.Security.Password')]"
                    },
                    {
                        "SqlMasterPassword": "[variable('Sql.Database.Master.Password')]"
                    },
                    {
                        "SqlWebPassword": "[variable('Sql.Database.Web.Password')]"
                    },
                    {
                        "SqlFormsPassword": "[variable('Sql.Database.Forms.Password')]"
                    },
                    {
                        "ClientSecret": "[variable('IdentityServer.Client.Secret')]"
                    }
                ]
            },
            "Skip": "[parameter('Update')]"
        }
    }
}