本文演示Sitecore XP Single(XP0)在Azure上的一鍵部署,即“30分鐘生成Sitecore演示環(huán)境”的一環(huán)。
關于XP(即Sitecore Experience Platform) roles的相關介紹移步
XP Single配置主要用來開發(fā)和測試:
Four Sitecore roles: Content Delivery, Content Management, Processing, and Reporting as a single WebApp instance.(cd,cm,Processing,Reporting作為一個web應用實例)
All XP roles: Search, Collection, Reference Data, Sitecore Cortex Processing, Sitecore Cortex Reporting, Marketing Automation, and Marketing Automation Reporting as a single WebApp instance.(其它所有功能作為一個應用實例)
?本文使用的Sitecore版本為:Sitecore Experience Platform 10.1 Update-2
為什么使用這個版本?主要考慮使用Azure PaaS的全部功能,無需額外配置。如果使用Sitecore 10.2+以上,則需要額外搭建Solr服務,參照 Azure Search compatibility table
即使用8.2-10.1版本,是可以使用Azure Search代替Solr服務的。這里方便利用Azure云資源直接一鍵配置,無需做額外的動作。故使用Sitecore 10.1-Update-2來演示。
本地操作系統(tǒng)為Windows11專業(yè)版。
準備工作
1,Azure Portal賬號一個,沒有的話可以使用國際信用卡注冊;
2,本地PowerShell ISE安裝Azure模塊;
3,Microsoft Azure Storage Explorer
4,Sitecore license文件
?文章來源地址http://www.zghlxwxcb.cn/news/detail-424670.html
下載
1,下載?Sitecore Experience Platform 10.1 Update-2
? ? ?打開下載頁定位到?Download options for Azure AppService
? ? ? 下載 Packages for XP Single ,即XP0。解壓得到3個壓縮包:
? ? ??
?2,下載?Sitecore Identity
? ? ? ?選擇?Sitecore Identity 7.0.326? ,
? ? ?
? ? ??下載WDP installation package. 解壓得到1個壓縮包:
? ? ??
? ? ? 打開Microsoft Azure Storage Explorer,上傳上面4個壓縮包到Azure Blob
? ? ??
? ? ??
? ? ? 上傳完畢后,分別點擊每一個資源,鼠標右鍵,獲取共享訪問簽名 -- 讀?。嘞蓿?-- 創(chuàng)建 -- 復制資源的URL備用,上面4個資源都要復制。
?3,下載Sitecore Azure Toolkit ,選擇?Sitecore Azure Toolkit 2.8.0
? ?
? ? ? 下載后解壓得到:
? ? ? ?
?4,下載Sitecore Azure Resource Manager (ARM) template,解壓后得到:
? ? ? ?
?
生成authentication certificate
以管理員身份運行Windows PowerShell ISE,輸入以下代碼并運行:
#Create a self-signed certificate. $thumbprint = (New-SelfSignedCertificate ` -Subject "CN=$env:COMPUTERNAME @ Sitecore, Inc." ` -Type SSLServerAuthentication ` -FriendlyName "$env:USERNAME Certificate").Thumbprint $certificateFilePath = "D:\Workspace\$thumbprint.pfx" Export-PfxCertificate ` -cert cert:\LocalMachine\MY\$thumbprint ` -FilePath "$certificateFilePath" ` -Password (Read-Host -Prompt "Enter password that would protect the certificate" -AsSecureString)
?
編輯azuredeploy.parameters.json
編輯ARM template中的azuredeploy.parameters.json文件
如上圖所示,黃色框部分先留空即可。 其它key說明如下:
Key | Description |
location | 云資源所在的地理位置,比如填:East Asia,代表東亞 |
sitecoreAdminPassword | Sitecore Admin賬戶的密碼 |
sqlServerLogin
|
云生成SQL數(shù)據(jù)庫后的SQL賬號 |
sqlServerPassword
|
云生成SQL數(shù)據(jù)庫后的SQL密碼 |
siMsDeployPackageUrl
|
下載章節(jié)中的IdentityServer的完整URL |
singleMsDeployPackageUrl
|
下載章節(jié)中的single.scwdp完整URL |
xcSingleMsDeployPackageUrl
|
下載章節(jié)中的xp0xconnect.scwdp.zip完整URL |
authCertificatePassword
|
生成authentication certificate章節(jié)中輸入的密碼 |
"allowInvalidClientCertificates": { "value": true }
?
執(zhí)行腳本
以管理員身份打開Windows PowerShell ISE,
沒有安裝Azure模塊的先安裝Azure模塊,移步Install Azure PowerShell on Windows
腳本代碼:
#Azure一鍵部署Sitecore xp0(xp single)開發(fā)/測試/演示環(huán)境 $SCSDK="D:\Workspace\Sitecore Azure Toolkit 2.8.0-r02542.1366\tools" $SCTemplates="https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%2010.1.1/XPSingle" $DeploymentId = "demo-sitecore1011" $ResourceGroup = "demo-sitecore1011" $LicenseFile = "你的本地license文件路徑" $CertificateFile = "D:\Workspace\93F2CA3845DB2577A005BCA0CEE48B8951694F1F.pfx(生成authentication certificate章節(jié)生成的文件)" $SubscriptionId = "Azure訂閱ID(SubscriptionID)" $Location="East Asia" $ParamFile="D:\Workspace\Sitecore-Azure-Quickstart-Templates-2.13.0\Sitecore 10.1.1\XPSingle\azuredeploy.parameters.json" $Parameters = @{ "deploymentId"=$DeploymentId; "authCertificateBlob" = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($CertificateFile)) } Import-Module $SCSDK\Sitecore.Cloud.Cmdlets.psm1 Connect-AzAccount Set-AzContext -SubscriptionId $SubscriptionId Start-SitecoreAzureDeployment -Name $ResourceGroup -Location $Location -ArmTemplateUrl "$SCTemplates/azuredeploy.json" -ArmParametersPath $ParamFile -LicenseXmlPath $LicenseFile -SetKeyValue $Parameters -Verbose
直接執(zhí)行,執(zhí)行后的輸出信息如下:
執(zhí)行完畢大概需要35分鐘左右:
?執(zhí)行完畢后打開Azure資源頁面:
找到demo-sitecore1011-single APP Service(Azure APP Service)?
?單擊 默認域 的鏈接
?打開了Sitecore歡迎頁,即表明成功!
?在此鏈接后輸入 /sitecore 進入管理后臺:
用戶名輸入admin
密碼輸入azuredeploy.parameters.json文件中
進入管理后臺,驗證Sitecore版本為:?
文章來源:http://www.zghlxwxcb.cn/news/detail-424670.html
?
到了這里,關于Sitecore10 Demo演示環(huán)境Azure一鍵部署(Step By Step Guide to installing Sitecore10 in Azure Paas)的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!