Is it possible to create an Umbraco site from the Azure Marketplace using powershell?

强颜欢笑 提交于 2019-12-11 02:58:32

问题


I keep getting requests to set up Umbraco sites for developers.

I have done a bit of searching and, I am wondering if it is possible to use powershell to create an Umbraco site from the Azure Marketplace using powershell.

I create VMs, for example, using the following commands:

  • Get-AzureVMImage
  • New-AzureQuickVM

But I cand find any for websites (web apps) from the market place.

There is what I would use to do in in the portal:

Note: it must be done using the market place.

Update to question: I have got further with this thanks to @theadriangreen.

Now I have the following after I run the command:

siteName: the website name

hostingPlanName: Basic

serverFarmResourceGroup: I have no idea

siteLocation: Australia Southeast

serverName: is this the database server name?

serverLocation: Australia Southeast

administratorLogin: is this the database admin login name?

databaseName: is this the database admin login password?

webDeploy_DatabaseUsername: no idea

webDeploy_DatabasePassword: no idea

@theadriangreen I hope you can clarify some of these for me?


回答1:


Yes it is possible. From the command Get-AzureResourceGroupGalleryTemplate we are able to locate the template identity as umbracoorg.UmbracoCMS.0.4.6-preview, hence the powershell command is:

Switch-AzureMode -Name AzureResourceManager
Add-AzureAccount
Select-AzureSubscription -SubscriptionId '<subscription-id>'
New-AzureResourceGroup -Name testrg -Location westus -DeploymentName testrg -GalleryTemplateIdentity umbracoorg.UmbracoCMS.0.4.6-preview

Looking at the template (https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/umbracoorg.UmbracoCMS.0.4.6-preview/DeploymentTemplates/Website_NewHostingPlan_SQL_NewDB-Default.json) which we get from Get-AzureResourceGroupGalleryTemplate -Identity umbracoorg.UmbracoCMS.0.4.6-preview we can infer the following about the parameters:

  • siteName: the website name
  • hostingPlanName: Name of the app server plan to use.
  • serverFarmResourceGroup: Must be the same as the resource group name
  • siteLocation: location
  • serverName: MSSQL Server name
  • serverLocation: location, should be the same as above
  • administratorLogin: MSSQL admin login
  • databaseName: MSSQL admin login password
  • webDeploy_DatabaseUsername: MSSQL admin login provided to the app, should be the same as above
  • webDeploy_DatabasePassword: MSSQL admin login password provided to the app, should be the same as above


来源:https://stackoverflow.com/questions/31173471/is-it-possible-to-create-an-umbraco-site-from-the-azure-marketplace-using-powers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!