2
votes

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: enter image description here

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

1 Answers

2
votes

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