GitLab's annual major release is around the corner, along with a lot of new and exciting features, there will be a few breaking changes, learn more here.

Commit 798216ff authored by Viet Hoang's avatar Viet Hoang
Browse files

add Scripts for Sitecore 9.1

parent 90030416
{
"Parameters": {
"InstallDirectory": {
"Type": "String",
"Description": "The install directory for the site.",
"DefaultValue": ""
},
"Package": {
"Type": "string",
"Description": "The path to the Web Deploy package to deploy.",
"DefaultValue": ""
},
"SqlDbPrefix": {
"Type": "string",
"Description": "The prefix used for all Sql databases.",
"DefaultValue": ""
},
"SitecoreIdentityCert": {
"Type": "string",
"Description": "The certificate to use for encryption. Provide the name or the thumbprint.",
"DefaultValue": ""
},
"LicenseFile": {
"Type": "string",
"Description": "The path to the Sitecore license file.",
"DefaultValue": ".\\License.xml"
},
"SiteName": {
"Type": "string",
"DefaultValue": "IdentityServer",
"Description": "The name of the site to be deployed."
},
"SqlCoreUser": {
"Type": "string",
"DefaultValue": "coreuser",
"Description": "The user to create and use in Core connection string."
},
"SqlCoreDbName": {
"Type": "string",
"DefaultValue": "_Core",
"Description": "The database to use in Core connection string."
},
"SqlCorePassword": {
"Type": "string",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Core connection string in Sitecore."
},
"SqlServer": {
"Type": "string",
"DefaultValue": ".\\SQLSERVER",
"Description": "The Sql Server where databases will be installed."
},
"PasswordRecoveryUrl": {
"Type": "string",
"Description": "Password recovery Url (Host name of CM instance).",
"DefaultValue": "http:\\"
},
"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": "SIF-Default"
},
"CustomConfigurationFile": {
"Type": "string",
"DefaultValue": "",
"Description": "Path to file with custom configuration to be deployed in Identity Server folder."
},
"HostMappingName": {
"Type": "string",
"Reference": "SiteName",
"Description": "The host name of the site."
},
"DnsName" :{
"Type": "string",
"Reference": "SiteName",
"Description": "The dns name of the site."
}
},
"Variables": {
"Sql.Database.Core": "[concat(parameter('SqlDbPrefix'), parameter('SqlCoreDbName'))]",
"Security.CertificateStore": "Cert:\\Localmachine\\My",
"Security.IdentityServer.CertificateThumbprint": "[GetCertificateThumbprint(parameter('SitecoreIdentityCert'), variable('Security.CertificateStore'))]",
"Security.IdentityServer.CertificatePath": "[joinpath(variable('Security.CertificateStore'), variable('Security.IdentityServer.CertificateThumbprint'))]",
"Site.PhysicalPath": "[joinpath(parameter('InstallDirectory'), parameter('SiteName'))]",
"Site.LicenseFolder": "[joinpath(variable('Site.PhysicalPath'), 'sitecoreruntime')]",
"Site.ConfigFolder": "[joinpath(variable('Site.PhysicalPath'), 'Config', 'production')]",
"SqlCore.Password": "[parameter('SqlCorePassword')]",
"Client.Secret" : "[parameter('ClientSecret'))]"
},
"Register":{
"Tasks": {
"RemoveItem": "Remove-Item"
}
},
"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",
"idleTimeoutAction": "Suspend",
"loadUserProfile": "True"
},
"ManagedRuntimeVersion": ""
}
}
},
"SetAppPoolCertStorePermissions": {
"Description": "Set permissions for the App Pool User to access the client certificate.",
"Type": "FilePermissions",
"Params": {
"Path" : "[ResolveCertificatePath(variable('Security.IdentityServer.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"
}
},
"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.IdentityServer.CertificateThumbprint')]"
}
]
},
"Skip": "[not(parameter('SitecoreIdentityCert'))]"
},
"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": "Core DB Name", "Value": "[variable('Sql.Database.Core')]" },
{ "Name": "Core DB User Name", "Value": "[parameter('SqlCoreUser')]" },
{ "Name": "Core DB User Password", "Value": "[variable('SqlCore.Password')]" },
{ "Name": "CertificateThumbprint", "Value": "[variable('Security.IdentityServer.CertificateThumbprint')]" },
{ "Name": "PasswordRecoveryUrl", "Value": "[parameter('PasswordRecoveryUrl')]" },
{ "Name": "AllowedCorsOrigins", "Value": "[parameter('AllowedCorsOrigins')]" },
{ "Name": "ClientSecret", "Value": "[variable('Client.Secret')]" }
]
}
}
},
"CreateLicenseFolder": {
"Description": "Ensure the destination path for the license exists.",
"Type": "EnsurePath",
"Params": {
"Exists": [ "[variable('Site.LicenseFolder')]" ]
}
},
"SetLicense" : {
"Description": "Copies the license file to the instance license folder.",
"Type": "Copy",
"Params": {
"Source": "[resolvepath(parameter('LicenseFile'))]",
"Destination": "[variable('Site.LicenseFolder')]"
},
"Skip": "[not(parameter('LicenseFile'))]"
},
"CustomConfigFile" : {
"Description": "Copies the custom config file to the instance config folder.",
"Type": "Copy",
"Params": {
"Source": "[resolvepath(parameter('CustomConfigurationFile'))]",
"Destination": "[variable('Site.ConfigFolder')]"
},
"Skip": "[not(parameter('CustomConfigurationFile'))]"
},
"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"
}
}
},
"UninstallTasks": {
"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"
}
},
"RemoveAppPool": {
"Description": "Removes the AppPool.",
"Type": "RemoveAppPool",
"Params": {
"Name": "[parameter('SiteName')]"
}
},
"RemoveWebsite": {
"Description": "Removes the website.",
"Type": "RemoveWebsite",
"Params": {
"Name": "[parameter('SiteName')]"
}
},
"RemoveContent": {
"Description": "Removes website content.",
"Type": "RemoveItem",
"Params": {
"Path": "[variable('Site.PhysicalPath')]",
"Recurse": true,
"ErrorAction": "SilentlyContinue"
}
},
"RemoveHostHeader": {
"Description": "Removes the hostheader for the website.",
"Type": "HostHeader",
"Params": {
"HostName": "[parameter('SiteName')]",
"Action": "Remove"
}
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
"Parameters": {
"InstallDirectory": {
"Type": "String",
"Description": "The install directory for the site",
"Description": "The install directory for the site.",
"DefaultValue": ""
},
"Package": {
......@@ -62,7 +62,7 @@
},
"SqlCollectionPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql admin password to use when installing databases."
},
"SqlProcessingPoolsUser": {
......@@ -72,7 +72,7 @@
},
"SqlProcessingPoolsPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Processing Pools connection string in Sitecore."
},
"SqlReferenceDataUser": {
......@@ -82,7 +82,7 @@
},
"SqlReferenceDataPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Reference Data connection string in Sitecore."
},
"SqlMarketingAutomationUser": {
......@@ -92,7 +92,7 @@
},
"SqlMarketingAutomationPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Marketing Automation connection string in Sitecore."
},
"SqlMessagingUser": {
......@@ -102,7 +102,7 @@
},
"SqlMessagingPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Messaging connection string in Sitecore."
},
"SqlProcessingEngineUser": {
......@@ -112,7 +112,7 @@
},
"SqlProcessingEnginePassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Processing Engine Tasks and Storage database connection strings in Sitecore."
},
"SqlReportingUser": {
......@@ -122,7 +122,7 @@
},
"SqlReportingPassword": {
"Type": "string",
"DefaultValue": "Test12345",
"DefaultValue": "SIF-Default",
"Description": "The Sql password for the Reporting connection string in Sitecore."
},
"SqlServer": {
......@@ -169,6 +169,16 @@
"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": {
......@@ -229,7 +239,32 @@
"Xdb.Rebuild.Name": "[concat(variable('Xdb.Name'), '_rebuild')]",
"Solr.Url.Xdb": "[concat(parameter('SolrUrl'), '/', variable('Xdb.Name'))]",
"Solr.Config.Path": "[joinpath(variable('Site.DataFolder'), 'solrcommands', 'schema.json')]"
"Solr.Config.Path": "[joinpath(variable('Site.DataFolder'), 'solrcommands', 'schema.json')]",
"SqlProcessingPools.Password": "[parameter('SqlProcessingPoolsPassword'))]",
"SqlCollection.Password": "[parameter('SqlCollectionPassword'))]",
"SqlReferenceData.Password": "[parameter('SqlReferenceDataPassword'))]",
"SqlMarketingAutomation.Password": "[parameter('SqlMarketingAutomationPassword'))]",
"SqlMessaging.Password": "[parameter('SqlMessagingPassword'))]",
"SqlProcessingEngine.Password": "[parameter('SqlProcessingEnginePassword'))]",
"SqlReporting.Password": "[parameter('SqlReportingPassword'))]",
"SqlCollection.User": "[if(variable('Test.SqlCollection.User'),variable('Generate.SqlCollection.User'),parameter('SqlCollectionUser'))]",
"Test.SqlCollection.User": "[equal(parameter('SqlCollectionUser'),'collectionuser')]",
"Generate.SqlCollection.User": "[concat(parameter('SqlDbPrefix'), '_collectionuser')]",
"Sql.Secure.Password" : "[ConvertToSecureString(String:parameter('SqlAdminPassword'),AsPlainText:true,Force:true)]",
"Sql.Credential": "[NewPSCredential(Username:parameter('SqlAdminUser'),Password:variable('SQL.Secure.Password'))]"
},
"Register":{
"Tasks": {
"RemoveItem": "Remove-Item",
"RemoveSqlLogin": "Remove-SqlLogin"
},
"ConfigFunction": {
"ConvertToSecureString": "ConvertTo-SecureString"
}
},
"Tasks": {
"CreatePaths": {
......@@ -337,7 +372,7 @@
"SiteName": "[parameter('SiteName')]",
"Add": [
{
"HostHeader": "[parameter('SiteName')]",
"HostHeader": "[parameter('DnsName')]",
"Protocol": "https",
"SSLFlags": 1,
"Thumbprint": "[variable('Security.SSL.CertificateThumbprint')]"
......@@ -366,8 +401,9 @@
"Description": "Sets a hostheader for the website.",
"Type": "HostHeader",
"Params": {
"HostName": "[parameter('SiteName')]"
}
"HostName": "[parameter('HostMappingName')]"
},
"Skip": "[not(parameter('HostMappingName'))]"
},
"SetPermissions": {
"Description": "Sets permissions for the app pool user.",
......@@ -424,20 +460,20 @@
{ "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": "Collection Database Application User Name", "Value": "[parameter('SqlCollectionUser')]" },
{ "Name": "Collection Database Application User Password", "Value": "[parameter('SqlCollectionPassword')]" },
{ "Name": "Collection Database Application User Name", "Value": "[variable('SqlCollection.User')]" },
{ "Name": "Collection Database Application User Password", "Value": "[variable('SqlCollection.Password')]" },
{ "Name": "Processing Pool Database Application User Name", "Value": "[parameter('SqlProcessingPoolsUser')]" },
{ "Name": "Processing Pool Database Application User Password", "Value": "[parameter('SqlProcessingPoolsPassword')]" },
{ "Name": "Processing Pool Database Application User Password", "Value": "[variable('SqlProcessingPools.Password')]" },
{ "Name": "Reference Data Database Application User Name", "Value": "[parameter('SqlReferenceDataUser')]" },
{ "Name": "Reference Data Database Application User Password", "Value": "[parameter('SqlReferenceDataPassword')]" },
{ "Name": "Reference Data Database Application User Password", "Value": "[variable('SqlReferenceData.Password')]" },
{ "Name": "Reporting Database Application User Name", "Value": "[parameter('SqlReportingUser')]" },
{ "Name": "Reporting Database Application User Password", "Value": "[parameter('SqlReportingPassword')]" },
{ "Name": "Reporting Database Application User Password", "Value": "[variable('SqlReporting.Password')]" },
{ "Name": "Marketing Automation Database Application User Name", "Value": "[parameter('SqlMarketingAutomationUser')]" },
{ "Name": "Marketing Automation Database Application User Password", "Value": "[parameter('SqlMarketingAutomationPassword')]" },
{ "Name": "Marketing Automation Database Application User Password", "Value": "[variable('SqlMarketingAutomation.Password')]" },
{ "Name": "Messaging Database Application User Name", "Value": "[parameter('SqlMessagingUser')]" },
{ "Name": "Messaging Database Application User Password", "Value": "[parameter('SqlMessagingPassword')]" },
{ "Name": "Messaging Database Application User Password", "Value": "[variable('SqlMessaging.Password')]" },
{ "Name": "Processing Engine Database Application User Name", "Value": "[parameter('SqlProcessingEngineUser')]" },
{ "Name": "Processing Engine Database Application User Password", "Value": "[parameter('SqlProcessingEnginePassword')]" },
{ "Name": "Processing Engine Database Application User Password", "Value": "[variable('SqlProcessingEngine.Password')]" },
{ "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')]" },
......@@ -459,7 +495,8 @@
"Description": "Creates a new thumbprint with a custom CA",
"Type": "AddWebFeatureSSL",
"Params": {
"HostName": "[parameter('SiteName')]",
"SiteName": "[parameter('SiteName')]",
"HostName": "[parameter('DnsName')]",
"OutputDirectory": "[variable('Site.DataFolder')]"
},
"Skip": "[parameter('SSLCert')]"
......@@ -527,9 +564,9 @@
"-P",
"[parameter('SqlAdminPassword')]",
"-v",
"[concat('UserName=',parameter('SqlCollectionUser'))]",
"[concat('UserName=',variable('SqlCollection.User'))]",
"-v",
"[concat('Password=',parameter('SqlCollectionPassword'))]"
"[concat('Password=',variable('SqlCollection.Password'))]"
]
}
},
......@@ -548,7 +585,7 @@
"-P",
"[parameter('SqlAdminPassword')]",
"-v",
"[concat('UserName=',parameter('SqlCollectionUser'))]",
"[concat('UserName=',variable('SqlCollection.User'))]",
"-v",
"[concat('ShardMapManagerDatabaseName=',variable('Sql.Database.ShardMapManager'))]"
]
......@@ -569,7 +606,7 @@
"-P",
"[parameter('SqlAdminPassword')]",
"-v",
"[concat('UserName=',parameter('SqlCollectionUser'))]",
"[concat('UserName=',variable('SqlCollection.User'))]",
"-v",
"[concat('ShardDatabaseName=',variable('Sql.Database.Shard0'))]"
]
......@@ -590,7 +627,7 @@
"-P",
"[parameter('SqlAdminPassword')]",
"-v",
"[concat('UserName=',parameter('SqlCollectionUser'))]",
"[concat('UserName=',variable('SqlCollection.User'))]",
"-v",
"[concat('ShardDatabaseName=',variable('Sql.Database.Shard1'))]"
]
......@@ -691,6 +728,22 @@
}
]
},
"StartAppPool": {
"Description": "Starts the app pool.",
"Type": "ManageAppPool",
"Params": {
"Name": "[parameter('SiteName')]",
"Action": "Start"
}
},
"StartWebsite": {
"Description": "Starts the website.",
"Type": "ManageWebsite",
"Params": {