- Drop existing indexes on DeploymentJobTargets and DeploymentJobSteps - Alter Status column to nvarchar(450) in DeploymentJobTargets, DeploymentJobSteps, and DeploymentJobs - Add new columns: Finished, OutputMetadataJson, Started to DeploymentJobTargets; ErrorMessage, Finished, OutputMetadataJson, Started to DeploymentJobSteps; CorrelationId, HeartbeatAt, Priority, RowVersion, ScheduledAt, WorkerName to DeploymentJobs - Create new indexes for improved query performance - Add constraints to ensure OutputMetadataJson is valid JSON - Record migration in __EFMigrationsHistory
420 lines
43 KiB
C#
420 lines
43 KiB
C#
namespace Microsoft.SelfService.Portal.Core.API.Context
|
|
{
|
|
internal static partial class DemoData
|
|
{
|
|
private const string BgwEnvironmentTestTemplateJson = """
|
|
{
|
|
"schemaVersion": "1.0",
|
|
"templateType": "Environment",
|
|
"metadata": {
|
|
"TemplateType": "Environment",
|
|
"Name": "Test"
|
|
},
|
|
"parameters": {
|
|
"Landscape": {
|
|
"DefaultValue": "Prod",
|
|
"Value": "Test",
|
|
"Type": "string",
|
|
"AllowedValues": [
|
|
"Prod",
|
|
"QA",
|
|
"Test"
|
|
]
|
|
}
|
|
},
|
|
"variables": {
|
|
"AdminDbName": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), \u0027Farm_AdminContent\u0027)]",
|
|
"ContentDbPrefix": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), parameters(\u0027ContentDatabaseSegment\u0027))]",
|
|
"ServiceDbPrefix": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), parameters(\u0027ServiceDatabaseSegment\u0027))]",
|
|
"DatabasePrefix": "[joinNotEmpty(\u0027_\u0027, parameters(\u0027DatabasePrefix\u0027), parameters(\u0027DomainLabel\u0027), if(equals(parameters(\u0027Landscape\u0027), \u0027Test\u0027), \u0027Test\u0027, \u0027\u0027))]",
|
|
"ConfigDbName": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), \u0027Farm_Config\u0027)]"
|
|
},
|
|
"resources": {
|
|
|
|
}
|
|
}
|
|
""";
|
|
|
|
private const string BgwDomainContosoTemplateJson = """
|
|
{
|
|
"schemaVersion": "1.0",
|
|
"templateType": "Domain",
|
|
"metadata": {
|
|
"TemplateType": "Domain",
|
|
"Name": "Contoso"
|
|
},
|
|
"parameters": {
|
|
"DomainFQDN": {
|
|
"DefaultValue": "",
|
|
"Pattern": "^[A-Za-z0-9.-]+$",
|
|
"Type": "string",
|
|
"Value": "contoso.local",
|
|
"Required": true
|
|
},
|
|
"DomainLabel": {
|
|
"Type": "string",
|
|
"MaxLength": 32,
|
|
"Value": "Contoso",
|
|
"DefaultValue": "",
|
|
"Pattern": "^[A-Za-z][A-Za-z0-9_-]*$",
|
|
"MinLength": 2,
|
|
"Required": false
|
|
},
|
|
"DomainNetBIOS": {
|
|
"Type": "string",
|
|
"MaxLength": 15,
|
|
"Value": "CONTOSO",
|
|
"DefaultValue": "",
|
|
"Pattern": "^[A-Za-z0-9_-]+$",
|
|
"MinLength": 1,
|
|
"Required": true
|
|
}
|
|
},
|
|
"variables": {
|
|
|
|
},
|
|
"resources": {
|
|
"NonNodeData": {
|
|
"Services": {
|
|
"ActiveDirectory": {
|
|
"NetBIOSName": "[parameters(\u0027DomainNetBIOS\u0027)]",
|
|
"DomainName": "[parameters(\u0027DomainFQDN\u0027)]"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
""";
|
|
|
|
private const string BgwSharePointContosoTemplateJson = """
|
|
{
|
|
"schemaVersion": "1.0",
|
|
"templateType": "Service",
|
|
"metadata": {
|
|
"TemplateType": "Service",
|
|
"Name": "SharePoint.Contoso"
|
|
},
|
|
"parameters": {
|
|
"FarmCredential": {
|
|
"Sensitive": true,
|
|
"Value": {
|
|
"Provider": "SecretManagement",
|
|
"Vault": "Test",
|
|
"Name": "Windows/SharePoint/FarmAccount"
|
|
},
|
|
"Type": "credential",
|
|
"Required": true
|
|
},
|
|
"ContentDatabaseSegment": {
|
|
"DefaultValue": "Content",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.",
|
|
"en-US": "Name segment used for SharePoint content databases within the database name."
|
|
}
|
|
}
|
|
},
|
|
"ServiceApplicationPoolDefault": {
|
|
"DefaultValue": "SharePoint Service Applications",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.",
|
|
"en-US": "Display name of the default application pool for SharePoint service applications."
|
|
}
|
|
}
|
|
},
|
|
"WebApplicationPoolDefault": {
|
|
"DefaultValue": "SharePoint Web Applications",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.",
|
|
"en-US": "Display name of the default application pool for SharePoint web applications."
|
|
}
|
|
}
|
|
},
|
|
"DatabaseServerName": {
|
|
"DefaultValue": "SQL_Server",
|
|
"Type": "string",
|
|
"Value": "CL-SQL-01"
|
|
},
|
|
"WebApplicationPoolDefaultAccount": {
|
|
"DefaultValue": "SVC_SHP_WAP",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.",
|
|
"en-US": "Account name used by the default application pool for SharePoint web applications."
|
|
}
|
|
}
|
|
},
|
|
"ServiceDatabaseSegment": {
|
|
"DefaultValue": "Services",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.",
|
|
"en-US": "Name segment used for SharePoint service databases within the database name."
|
|
}
|
|
}
|
|
},
|
|
"FarmPassphrase": {
|
|
"Sensitive": true,
|
|
"Value": {
|
|
"Provider": "SecretManagement",
|
|
"Vault": "Test",
|
|
"Name": "Windows/SharePoint/FarmPassphrase"
|
|
},
|
|
"Type": "credential",
|
|
"Required": true
|
|
},
|
|
"DatabaseInstanceName": {
|
|
"DefaultValue": "SQL_Server",
|
|
"Type": "string",
|
|
"Value": "SQLServer"
|
|
},
|
|
"DatabaseTcpPort": {
|
|
"DefaultValue": 1433,
|
|
"Type": "int",
|
|
"Value": 1433
|
|
},
|
|
"DefaultServiceApplicationPoolAccount": {
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.",
|
|
"en-US": "Account name used by the default application pool for SharePoint service applications."
|
|
}
|
|
},
|
|
"Sensitive": true,
|
|
"Value": {
|
|
"Provider": "SecretManagement",
|
|
"Vault": "Test",
|
|
"Name": "Windows/SharePoint/DefaultServiceAccount"
|
|
},
|
|
"Type": "credential",
|
|
"Required": true
|
|
},
|
|
"ProductKey": {
|
|
"DefaultValue": "0000-0000-0000-0000-0000",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "SharePoint-Produktlizenzschluessel.",
|
|
"en-US": "SharePoint product license key."
|
|
}
|
|
}
|
|
},
|
|
"SetupCredential": {
|
|
"Sensitive": true,
|
|
"Value": {
|
|
"Provider": "SecretManagement",
|
|
"Vault": "Test",
|
|
"Name": "Windows/SharePoint/SetupAccount"
|
|
},
|
|
"Type": "credential",
|
|
"Required": true
|
|
},
|
|
"DatabasePrefix": {
|
|
"DefaultValue": "SharePoint",
|
|
"Type": "string",
|
|
"Value": "SharePoint"
|
|
},
|
|
"SearchServiceApplicationPoolAccount": {
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.",
|
|
"en-US": "Account name used by the search application pool for SharePoint service applications."
|
|
}
|
|
},
|
|
"Sensitive": true,
|
|
"Value": {
|
|
"Provider": "SecretManagement",
|
|
"Vault": "Test",
|
|
"Name": "Windows/SharePoint/SearchAccount"
|
|
},
|
|
"Type": "credential",
|
|
"Required": true
|
|
},
|
|
"CentralAdminPort": {
|
|
"DefaultValue": 443,
|
|
"Type": "int",
|
|
"Value": 4000
|
|
},
|
|
"ServiceApplicationPoolSearch": {
|
|
"DefaultValue": "SharePoint Search Service Applications",
|
|
"Type": "string",
|
|
"Metadata": {
|
|
"Description": {
|
|
"de-DE": "Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.",
|
|
"en-US": "Display name of the application pool for SharePoint Search service applications."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"variables": {
|
|
"AdminDbName": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), \u0027Farm_AdminContent\u0027)]",
|
|
"ContentDbPrefix": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), parameters(\u0027ContentDatabaseSegment\u0027))]",
|
|
"ServiceDbPrefix": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), parameters(\u0027ServiceDatabaseSegment\u0027))]",
|
|
"DatabasePrefix": "[joinNotEmpty(\u0027_\u0027, parameters(\u0027DatabasePrefix\u0027), parameters(\u0027DomainLabel\u0027), if(equals(parameters(\u0027Landscape\u0027), \u0027Test\u0027), \u0027Test\u0027, \u0027\u0027))]",
|
|
"ConfigDbName": "[joinNotEmpty(\u0027_\u0027, variables(\u0027DatabasePrefix\u0027), \u0027Farm_Config\u0027)]"
|
|
},
|
|
"resources": {
|
|
"AllNodes": [
|
|
{
|
|
"PSDscAllowDomainUser": true,
|
|
"PSDSCAllowPlainTextPassword": true,
|
|
"NodeName": "*",
|
|
"RunCentralAdministration": false
|
|
}
|
|
],
|
|
"NonNodeData": {
|
|
"Services": {
|
|
"SharePoint": {
|
|
"Farm": {
|
|
"ManagedAccounts": {
|
|
"DefaultServiceApplicationPoolAccount": "[parameters(\u0027DefaultServiceApplicationPoolAccount\u0027)]",
|
|
"FarmAccount": "[parameters(\u0027FarmCredential\u0027)]",
|
|
"SearchServiceApplicationPoolAccount": "[parameters(\u0027SearchServiceApplicationPoolAccount\u0027)]"
|
|
},
|
|
"Passphrase": "[parameters(\u0027FarmPassphrase\u0027)]",
|
|
"ServiceApplications": {
|
|
"AppManagementService": {
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027AppManagement\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"StateService": {
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027StateService\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"SubscriptionSettingsService": {
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027SubscriptionSettings\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"ManagedMetadataService": {
|
|
"Name": "Managed Metadata Service",
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027), \u0027ManagedMetadata\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"SearchService": {
|
|
"Name": "Search Service Application",
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027Search\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"UsageAndHealthService": {
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027UsageAndHealth\u0027)]",
|
|
"Provision": true
|
|
},
|
|
"SecureStoreService": {
|
|
"Name": "Secure Store Service",
|
|
"DatabaseName": "[concat(variables(\u0027ServiceDbPrefix\u0027),\u0027SecureStore\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true,
|
|
"AuditingEnabled": true
|
|
},
|
|
"UserProfileService": {
|
|
"SyncDBName": "[concat(variables(\u0027ServiceDbPrefix\u0027), \u0027UserProfile_Sync\u0027)]",
|
|
"ApplicationPool": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\u0027, \u0027Name\u0027)]",
|
|
"Provision": true,
|
|
"Name": "User Profile Service",
|
|
"SocialDBName": "[concat(variables(\u0027ServiceDbPrefix\u0027), \u0027UserProfile_Social\u0027)]",
|
|
"ProfileDBName": "[concat(variables(\u0027ServiceDbPrefix\u0027), \u0027UserProfile_Profile\u0027)]"
|
|
}
|
|
},
|
|
"CentralAdminAuth": "NTLM",
|
|
"ConfigDatabaseName": "[variables(\u0027ConfigDbName\u0027)]",
|
|
"Accounts": {
|
|
"SetupAccount": "[parameters(\u0027SetupCredential\u0027)]"
|
|
},
|
|
"CentralAdminPort": "[parameters(\u0027CentralAdminPort\u0027)]",
|
|
"AdminContentDatabase": "[variables(\u0027AdminDbName\u0027)]",
|
|
"ServiceApplicationPools": {
|
|
"SearchServiceApplicationPool": {
|
|
"Account": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\u0027, \u0027UserName\u0027)]",
|
|
"Name": "[parameters(\u0027ServiceApplicationPoolSearch\u0027)]"
|
|
},
|
|
"DefaultServiceApplicationPool": {
|
|
"Account": "[reference(\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\u0027, \u0027UserName\u0027)]",
|
|
"Name": "[parameters(\u0027ServiceApplicationPoolDefault\u0027)]"
|
|
}
|
|
}
|
|
},
|
|
"Database": {
|
|
"Targets": {
|
|
"Farm": {
|
|
"Server": "SQLServer",
|
|
"DependsOnAlias": "SQLServer"
|
|
},
|
|
"Content": {
|
|
"Server": "SQLServer",
|
|
"DependsOnAlias": "SQLServer"
|
|
},
|
|
"Service": {
|
|
"Server": "SQLServer",
|
|
"DependsOnAlias": "SQLServer"
|
|
}
|
|
},
|
|
"SQLAlias": {
|
|
"SQLServer": {
|
|
"InstanceName": "[parameters(\u0027DatabaseInstanceName\u0027)]",
|
|
"ServerName": "[parameters(\u0027DatabaseServerName\u0027)]",
|
|
"Protocol": "TCP",
|
|
"TcpPort": "[parameters(\u0027DatabaseTcpPort\u0027)]"
|
|
}
|
|
}
|
|
},
|
|
"General": {
|
|
"ProductKey": "[parameters(\u0027ProductKey\u0027)]"
|
|
},
|
|
"Windows": {
|
|
"Registry": {
|
|
"DisableLoopbackCheck": {
|
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa",
|
|
"Name": "DisableLoopbackCheck",
|
|
"Value": 1,
|
|
"Type": "DWord"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
""";
|
|
|
|
private const string BgwStageInstallTemplateJson = """
|
|
{
|
|
"schemaVersion": "1.0",
|
|
"templateType": "Stage",
|
|
"metadata": {
|
|
"TemplateType": "Stage",
|
|
"Name": "Install"
|
|
},
|
|
"parameters": {
|
|
|
|
},
|
|
"variables": {
|
|
|
|
},
|
|
"resources": {
|
|
"NonNodeData": {
|
|
"LocalConfigurationManager": {
|
|
"RefreshFrequencyMins": "30",
|
|
"RefreshMode": "PUSH",
|
|
"ConfigurationModeFrequencyMins": "120",
|
|
"ConfigurationMode": "ApplyOnly"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
""";
|
|
|
|
}
|
|
}
|