I was preparing a demo for Azure Pack Websites. I installed all the VM needed for a HA Websites installation. I also used a file server cluster so the installation of the Websites was using a preconfigured file server option. After all the configuration and assigning the Website cloud to a plan i deployed my first website. The result was Error: Cannot find SKU ‘Free’.
Ok, that’s odd I see in my plan in Azure Pack admin that there are settings we can define:
When I checked in the database the plans and the SKU’s I found that the plan is there but the SKU table is empty:
It turns out that in this release ‘Azure Pack Websites UR9’ that there is a bug when you install it using predefined /external fileserver. This will be fixed in the next UR is said. SO for now we need to define the SKU’s our self.
First we need to check if the Fileserver is not the issue. When you run this query it should return a fileserver type:
1 2 3 |
SELECT * FROM [runtime].[HostingConfigurations] WHERE ConfigurationKey = 'FileServerType' |
Then we can run this query:
1 2 3 4 5 6 7 8 9 10 11 12 |
IF NOT EXISTS (SELECT 1 FROM [admin].[Plans] WHERE [Name] = N'DefaultSkuPlan') BEGIN DECLARE @WebSystemId AS INT; SET @WebSystemId = (SELECT [Id] FROM [admin].[WebSystems] WHERE Name = N'MgmtSvcCloud') IF @WebSystemId IS NOT NULL BEGIN INSERT INTO [admin].[Plans] ([Name], [Active], [WebSystemId]) VALUES (N'DefaultSkuPlan', 1, @WebSystemId); INSERT INTO [admin].[WebPlans] ([WebSystemId], [PlanId], [VirtualDedicatedEnabled], [MaxNumberOfSites], [MaxNumberOfWorkersPerSite], [MaxNumberOfVirtualWorkers]) VALUES (@WebSystemId, (SELECT [Id] FROM [admin].[Plans] WHERE [Name] = N'DefaultSkuPlan'), 1, -1, -1, -1); END END |
Finally we need to add the SKU’s using PoweShell on the Controller VM:
1 2 3 4 |
Add-PSSnapin webhostingsnapin New-WebSitesSku -SkuName Free -ComputeMode Shared -WorkerTiers @('Shared') New-WebSitesSku -SkuName Shared -ComputeMode Shared -WorkerTiers @('Shared') New-WebSitesSku -SkuName Standard -ComputeMode Dedicated -WorkerTiers @('Small', 'Medium', 'Large') |
And now web deployment’s started working!