Pipelines/Steps/Install/OnPrem/Sitecore/XP/Scaled/9.2/0/xconnect-xp1-CortexProcessing.json
{
"Parameters": { "Package": { "Type": "string", "Description": "The path to the Web Deploy package to deploy.", "DefaultValue": "" }, "LicenseFile": { "Type": "string", "Description": "The path to the Sitecore license file.", "DefaultValue": ".\\License.xml" }, "SiteName": { "Type": "string", "DefaultValue": "CortexProcessing", "Description": "The name of the site to be deployed." }, "SSLCert": { "Type": "string", "Description": "The certificate to use for HTTPS web bindings. Provide the name or the thumbprint. If not provided a certificate will be generated.", "DefaultValue": "" }, "XConnectCert": { "Type": "string", "Description": "The certificate to use for encryption. Provide the name or the thumbprint.", "DefaultValue": "" }, "SqlDbPrefix": { "Type": "string", "Description": "The prefix used for all Sql databases.", "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." }, "SqlMessagingUser": { "Type": "string", "DefaultValue": "messaginguser", "Description": "The Sql user for the Messaging connection string in Sitecore." }, "SqlMessagingPassword": { "Type": "string", "DefaultValue": "SIF-Default", "Description": "The Sql password for the Messaging connection string in Sitecore." }, "SqlProcessingEngineUser": { "Type": "string", "DefaultValue": "processingengineuser", "Description": "The Sql user for the Processing Engine Tasks and Storage database connection strings in Sitecore." }, "SqlProcessingEnginePassword": { "Type": "string", "DefaultValue": "SIF-Default", "Description": "The Sql password for the Processing Engine Tasks and Storage database connection strings in Sitecore." }, "SqlReportingUser": { "Type": "string", "DefaultValue": "reportinguser", "Description": "The Sql user for the Reporting database connection string in Sitecore." }, "SqlReportingPassword": { "Type": "string", "DefaultValue": "SIF-Default", "Description": "The Sql password for the Reporting database connection string in Sitecore." }, "SqlServer": { "Type": "string", "DefaultValue": ".\\SQLSERVER", "Description": "The Sql Server where databases will be installed." }, "XConnectCollectionService": { "Type": "string", "DefaultValue": "https://XConnectCollection", "Description": "The url for the XConnect Collection Service." }, "XConnectSearchService": { "Type": "string", "DefaultValue": "https://XConnectSearch", "Description": "The url for the XConnect Search Service." }, "XConnectEnvironment": { "Type": "string", "DefaultValue": "Development", "Description": "The configuration environment for this instance." }, "XConnectLogLevel": { "Type": "string", "DefaultValue": "Information", "Description": "The level of log information to output." }, "MachineLearningServerUrl": { "Type": "string", "DefaultValue": "", "Description": "The Microsoft Machine Learning Server instance to use." }, "MachineLearningServerBlobEndpointCertificatePath": { "Type": "string", "DefaultValue": "", "Description": "The Machine Learning Server Blob Storage WebApi Endpoint Certificate Path." }, "MachineLearningServerBlobEndpointCertificatePassword": { "Type": "string", "DefaultValue": "", "Description": "The Machine Learning Server Blob Storage WebApi Endpoint Certificate Password." }, "MachineLearningServerTableEndpointCertificatePath": { "Type": "string", "DefaultValue": "", "Description": "The Machine Learning Server Table Storage WebApi Endpoint Certificate Path." }, "MachineLearningServerTableEndpointCertificatePassword": { "Type": "string", "DefaultValue": "", "Description": "The Machine Learning Server Table Storage WebApi Endpoint Certificate Password." }, "MachineLearningServerEndpointCertificationAuthorityCertificatePath": { "Type": "string", "DefaultValue": "", "Description": "The path to certificate of certification authority that issued certificates for Machine Learning Server Blob and Table storage endpoints." }, "HostMappingName": { "Type": "string", "Reference": "SiteName", "Description": "The host mapping name of the site." }, "DnsName" :{ "Type": "string", "Reference": "SiteName", "Description": "The dns name of the site." } }, "Variables": { "Sql.Database.Messaging": "[concat(parameter('SqlDbPrefix'), '_Messaging')]", "Sql.Database.ProcessingEngineTasks": "[concat(parameter('SqlDbPrefix'), '_ProcessingEngineTasks')]", "Sql.Database.ProcessingEngineStorage": "[concat(parameter('SqlDbPrefix'), '_ProcessingEngineStorage')]", "Sql.Database.Reporting": "[concat(parameter('SqlDbPrefix'), '_Reporting')]", "SqlProcessingEngine.Password": "[parameter('SqlProcessingEnginePassword'))]", "SqlMessaging.Password": "[parameter('SqlMessagingPassword')]", "SqlReporting.Password":"[parameter('SqlReportingPassword')]", "Security.CertificateStore": "Cert:\\Localmachine\\My", "Security.SSL.CertificateThumbprint": "[GetCertificateThumbprint(parameter('SSLCert'), variable('Security.CertificateStore'))]", "Security.XConnect.CertificateThumbprint": "[GetCertificateThumbprint(parameter('XConnectCert'), variable('Security.CertificateStore'))]", "Security.XConnect.CertificatePath": "[joinpath(variable('Security.CertificateStore'), variable('Security.XConnect.CertificateThumbprint'))]", "Site.PhysicalPath": "[joinpath(environment('SystemDrive'), 'inetpub', 'wwwroot', parameter('SiteName'))]", "Site.DataFolder": "[joinpath(variable('Site.PhysicalPath'), 'App_Data')]", "Services.ProcessingEngine.InstallPath": "[joinpath(variable('Site.DataFolder'), 'jobs','continuous','ProcessingEngine')]", "Services.ProcessingEngine.Name": "[concat(parameter('SiteName'), '-ProcessingEngineService')]", "Endpoint.Collection": "[parameter('XConnectCollectionService')]", "Endpoint.Search": "[parameter('XConnectSearchService')]", "Endpoint.Processing.BlobStorage": "[concat('https://', parameter('SiteName'))]", "Endpoint.Processing.TableStorage": "[concat('https://', parameter('SiteName'))]", "Sql.Secure.Password" : "[ConvertToSecureString(String:parameter('SqlAdminPassword'),AsPlainText:true,Force:true)]" }, "Register":{ "Tasks": { "RemoveItem": "Remove-Item" }, "ConfigFunction": { "ConvertToSecureString": "ConvertTo-SecureString" } }, "Tasks": { "CreatePaths": { "Description": "Ensure the destination path for the site exists.", "Type": "EnsurePath", "Params": { "Exists": [ "[variable('Site.PhysicalPath')]" ] } }, "CreateAppPool": { "Description": "Creates or updates the app pool.", "Type": "AppPool", "Params": { "Name": "[parameter('SiteName')]", "Properties": { "ProcessModel": { "identityType" : "ApplicationPoolIdentity" } } } }, "SetAppPoolCertStorePermissions": { "Description": "Set permissions for the App Pool User to access the client certificate.", "Type": "FilePermissions", "Params": { "Path" : "[ResolveCertificatePath(variable('Security.XConnect.CertificatePath'))]", "Rights": [ { "User": "[concat('IIS AppPool\\', parameter('SiteName'))]", "FileSystemRights": ["Read"], "InheritanceFlags": [ "None"] } ] } }, "CreateWebsite": { "Description": "Creates or updates the IIS website instance.", "Type": "Website", "Params": { "Name": "[parameter('SiteName')]", "ApplicationPool": "[parameter('SiteName')]", "PhysicalPath": "[variable('Site.PhysicalPath')]" } }, "StopWebsite": { "Description": "Stops the website if it is running.", "Type": "ManageWebsite", "Params": { "Name": "[parameter('SiteName')]", "Action": "Stop" } }, "StopAppPool": { "Description": "Stops the app pool if it is running.", "Type": "ManageAppPool", "Params": { "Name": "[parameter('SiteName')]", "Action": "Stop" } }, "StopService": { "Description": "Stops the service if it is running.", "Type": "ManageService", "Params":{ "Name": "[variable('Services.ProcessingEngine.Name')]", "Status": "Stopped", "PostDelay": 3000 } }, "RemoveService": { "Description": "Removes the current service.", "Type": "RemoveService", "Params":{ "Name":"[variable('Services.ProcessingEngine.Name')]" } }, "RemoveDefaultBinding": { "Description": "Removes the default *:80 web binding.", "Type": "WebBinding", "Params": { "SiteName" : "[parameter('SiteName')]", "Remove" : [ { "Port": "80", "IPAddress": "*" } ] } }, "CreateBindingsWithThumbprint": { "Description": "Configures the site bindings for the website.", "Type": "WebBinding", "Params": { "SiteName" : "[parameter('SiteName')]", "Add": [ { "HostHeader": "[parameter('DnsName')]", "Protocol": "https", "SSLFlags": 1, "Thumbprint": "[variable('Security.SSL.CertificateThumbprint')]" } ] }, "Skip": "[not(parameter('SSLCert'))]" }, "SetClientCertificatePermissions": { "Type": "WebsiteClientCert", "Params": { "SiteName": "[parameter('SiteName')]", "Setting": "Accept" } }, "CreateHostHeader": { "Description": "Sets a hostheader for the website.", "Type": "HostHeader", "Params": { "HostName": "[parameter('HostMappingName')]" }, "Skip": "[not(parameter('HostMappingName'))]" }, "SetPermissions": { "Description": "Sets permissions for the app pool user.", "Type": "FilePermissions", "Params": { "Path" : "[variable('Site.PhysicalPath')]", "Rights": [ { "User": "[concat('IIS AppPool\\', parameter('SiteName'))]", "FileSystemRights": "FullControl", "InheritanceFlags": [ "ContainerInherit", "ObjectInherit"] } ] } }, "InstallWDP": { "Description": "Syncs the web deploy package with the website.", "Type": "WebDeploy", "Params" : { "Verb": "Sync", "Arguments": { "Source": { "Package": "[resolvepath(parameter('Package'))]" }, "Dest": "Auto", "SetParam": [ { "Name": "IIS Web Application Name", "Value": "[parameter('SiteName')]" }, { "Name": "Database Server Name", "Value": "[parameter('SqlServer')]" }, { "Name": "Database Admin User Name", "Value": "[parameter('SqlAdminUser')]" }, { "Name": "Database Admin User Password", "Value": "[parameter('SqlAdminPassword')]" }, { "Name": "Processing Engine Tasks Database Name", "Value": "[variable('Sql.Database.ProcessingEngineTasks')]" }, { "Name": "Processing Engine Storage Database Name", "Value": "[variable('Sql.Database.ProcessingEngineStorage')]" }, { "Name": "Messaging Database Name", "Value": "[variable('Sql.Database.Messaging')]" }, { "Name": "Reporting Database Name", "Value": "[variable('Sql.Database.Reporting')]" }, { "Name": "Processing Engine Database Application User Name", "Value": "[parameter('SqlProcessingEngineUser')]" }, { "Name": "Processing Engine Database Application User Password", "Value": "[variable('SqlProcessingEngine.Password')]" }, { "Name": "Messaging Database Application User Name", "Value": "[parameter('SqlMessagingUser')]" }, { "Name": "Messaging Database Application User Password", "Value": "[variable('SqlMessaging.Password')]" }, { "Name": "Reporting Database Application User Name", "Value": "[parameter('SqlReportingUser')]" }, { "Name": "Reporting Database Application User Password", "Value": "[variable('SqlReporting.Password')]" }, { "Name": "XConnect Server Configuration Environment", "Value": "[parameter('XConnectEnvironment')]" }, { "Name": "XConnect Server Certificate Validation Thumbprint", "Value": "[variable('Security.XConnect.CertificateThumbprint')]" }, { "Name": "XConnect Server Log Level", "Value": "[parameter('XConnectLogLevel')]" }, { "Name": "Processing Engine Xconnect Collection Client Endpoint", "Value": "[variable('Endpoint.Collection')]" }, { "Name": "Processing Engine Xconnect Collection Client Certificate Thumbprint", "Value": "[variable('Security.XConnect.CertificateThumbprint')]" }, { "Name": "Processing Engine Xconnect Search Client Endpoint", "Value": "[variable('Endpoint.Search')]" }, { "Name": "Processing Engine Xconnect Search Client Certificate Thumbprint", "Value": "[variable('Security.XConnect.CertificateThumbprint')]" }, { "Name": "Processing Engine Blob Storage WebApi Endpoint", "Value": "[variable('Endpoint.Processing.BlobStorage')]" }, { "Name": "Processing Engine Table Storage WebApi Endpoint", "Value": "[variable('Endpoint.Processing.TableStorage')]" }, { "Name": "Processing Engine Machine Learning Server Endpoint", "Value": "[parameter('MachineLearningServerUrl')]" }, { "Name": "Machine Learning Server Blob Storage WebApi Endpoint Certificate Path", "Value": "[parameter('MachineLearningServerBlobEndpointCertificatePath')]" }, { "Name": "Machine Learning Server Blob Storage WebApi Endpoint Certificate Password", "Value": "[parameter('MachineLearningServerBlobEndpointCertificatePassword')]" }, { "Name": "Machine Learning Server Table Storage WebApi Endpoint Certificate Path", "Value": "[parameter('MachineLearningServerTableEndpointCertificatePath')]" }, { "Name": "Machine Learning Server Table Storage WebApi Endpoint Certificate Password", "Value": "[parameter('MachineLearningServerTableEndpointCertificatePassword')]" }, { "Name": "Machine Learning Server Storage WebApi Endpoint Certification Authority Certificate Path", "Value": "[parameter('MachineLearningServerEndpointCertificationAuthorityCertificatePath')]" } ] } } }, "SetLicense" : { "Description": "Copies the license file to the instance data folder.", "Type": "Copy", "Params": { "Source": "[resolvepath(parameter('LicenseFile'))]", "Destination": "[variable('Site.DataFolder')]" } }, "CreateBindingsWithDevelopmentThumbprint": { "Description": "Creates a new thumbprint with a custom CA.", "Type": "AddWebFeatureSSL", "Params": { "SiteName": "[parameter('SiteName')]", "HostName": "[parameter('DnsName')]", "OutputDirectory": "[variable('Site.DataFolder')]" }, "Skip": "[parameter('SSLCert')]" }, "StartAppPool": { "Description": "Starts the app pool.", "Type": "ManageAppPool", "Params": { "Name": "[parameter('SiteName')]", "Action": "Start" } }, "StartWebsite": { "Description": "Starts the website.", "Type": "ManageWebsite", "Params": { "Name": "[parameter('SiteName')]", "Action": "Start" } }, "SetServicesCertStorePermissions": { "Description": "Set permissions for the services to access the client certificate.", "Type": "FilePermissions", "Params": { "Path" : "[ResolveCertificatePath(variable('Security.XConnect.CertificatePath'))]", "Rights": [ { "User": "NT AUTHORITY\\LocalService", "FileSystemRights": ["Read"], "InheritanceFlags": [ "None"] } ] } }, "CreateServiceLogPath": { "Description": "Ensure the destination path for the site exists.", "Type": "EnsurePath", "Params": { "Exists": [ "[joinpath(variable('Services.ProcessingEngine.InstallPath'), 'App_Data', 'Logs')]" ] } }, "SetProcessingEngineServiceLicense" : { "Description": "Copies the license file to the processing engine service data folder.", "Type": "Copy", "Params": { "Source": "[resolvepath(parameter('LicenseFile'))]", "Destination": "[joinpath(variable('Services.ProcessingEngine.InstallPath'), 'App_Data')]" } }, "SetServicePermissions": { "Description": "Set permissions for the service.", "Type": "FilePermissions", "Params": { "Path" : "[joinpath(variable('Services.ProcessingEngine.InstallPath'), 'App_Data', 'Logs')]", "Rights": [ { "User": "NT AUTHORITY\\LocalService", "FileSystemRights": ["FullControl"], "InheritanceFlags": [ "ContainerInherit", "ObjectInherit"] } ] } }, "InstallService": { "Description": "Installs the service.", "Type": "Command", "Params": { "Path": "[joinpath(variable('Services.ProcessingEngine.InstallPath'), 'Sitecore.ProcessingEngine.exe')]", "Arguments": ["-i", "[variable('Services.ProcessingEngine.Name')]"] } }, "StartService": { "Description": "Starts the service.", "Type": "ManageService", "Params":{ "Name": "[variable('Services.ProcessingEngine.Name')]", "Status": "Running" } } }, "UninstallTasks": { "StopService": { "Description": "Stops the service if it is running.", "Type": "ManageService", "Params":{ "Name": "[variable('Services.ProcessingEngine.Name')]", "Status": "Stopped", "PostDelay": 3000 } }, "RemoveService": { "Description": "Removes the current service.", "Type": "RemoveService", "Params":{ "Name":"[variable('Services.ProcessingEngine.Name')]" } }, "StopWebsite": { "Description": "Stops the website if it is running.", "Type": "ManageWebsite", "Params": { "Name": "[parameter('SiteName')]", "Action": "Stop", "ErrorAction": "SilentlyContinue" } }, "StopAppPool": { "Description": "Stops the app pool if it is running.", "Type": "ManageAppPool", "Params": { "Name": "[parameter('SiteName')]", "Action": "Stop", "ErrorAction": "SilentlyContinue" } }, "RemoveWebsite": { "Description": "Removes the IIS website.", "Type": "RemoveWebsite", "Params": { "Name": "[parameter('SiteName')]" } }, "RemoveAppPool": { "Description": "Removes the IIS application pool.", "Type": "RemoveAppPool", "Params": { "Name": "[parameter('SiteName')]" } }, "RemoveContent": { "Description": "Removes website content.", "Type": "RemoveItem", "Params": { "Path": "[variable('Site.PhysicalPath')]", "Recurse": true, "ErrorAction": "SilentlyContinue" } }, "RemoveHostHeader": { "Description": "Removes the website host name.", "Type": "HostHeader", "Params": { "HostName": "[parameter('SiteName')]", "Action": "Remove" } }, "RemoveDatabases": { "Description": "Removes the databases.", "Type": "RemoveSQLDatabase", "Params": { "ServerName": "[parameter('SqlServer')]", "Username": "[parameter('SqlAdminUser')]", "Password": "[variable('Sql.Secure.Password')]", "DatabaseName": [ "[variable('Sql.Database.ProcessingEngineTasks')]", "[variable('Sql.Database.ProcessingEngineStorage')]" ] } } } } |