Affichage des articles dont le libellé est Azure Resource Manager. Afficher tous les articles
Affichage des articles dont le libellé est Azure Resource Manager. Afficher tous les articles

Azure App Service Environment – error on creating a new Web App

When creating a new Web App hosted inside an App Service Environment (ASE) via an ARM template, you may encounter the following error:

"Resource Microsoft.Web/sites 'yourapplication-web01' failed with message 'Server farm with name yourappserviceplan not found.' ". Here is the reference line in the template: "serverFarmId": "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/yourresourceid/providers/Microsoft.Web/serverfarms/ yourappserviceplan".

(where: yourapplication-web01 = the name of your web app,  yourresourceid = the name of your resource group, yourappserviceplan = the name of your app service hosting plan)

This error comes usually from an insufficient information in the ARM template you are trying to deploy. If in a Web App deployment outside ASE it is enough to reference the hosting plan which hosts the application, within an ASE you need to specify also the information for referencing the ASE environment which includes the hosting plan:

[template segment for the web app definition]

  {

      "apiVersion": "2015-08-01",
      "name": "[parameters('siteName')]",
      "type": "Microsoft.Web/sites",
      "location": "[parameters('location')]",
      "tags": {
        "displayName": "[parameters('siteName')]"
      },
      "properties": {
        "name": "[parameters('siteName')]",
        "hostingEnvironment": "[parameters('environmentName')]",
        "hostingEnvironmentId": "[resourceId('Microsoft.Web/hostingEnvironments', parameters('environmentName'))]",
        "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
      }
    }

So for the parametering aspect, you will need to include the hosting plan name ('hostingPlanName') as well as the ASE name ('environmentName').

Note: if the web site will be deployed in a different resource group, then you will need to qualify the resource references with their resource group name:
"serverFarmId": "[resourceId(parameters('hostingPlanResourceGroupName'), 'Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"

That’s all. Have a good deployment!



Global Azure Bootcamp Paris 2015


Samedi prochain, 25 avril 2015, comme chaque année dans cette période, il y aura Global Azure Bootcamp, événement ayant rassemblé à travers le monde et le même jour 7432 personnes, 154 Speakers, 96 villes, 194 sessions techniques et 74 MVP.
En France, l'évènement se tiendra à la fois à Paris et Lyon. Pour Paris - où vous pourrez me rencontrer - vous trouverez les informations logistiques ici.

QUEL PROGRAMME ?

Des sessions techniques sur Azure se tiendront toute la journée.
Des environnements de laboratoires Microsoft Azure seront mis en place ad-hoc. Les experts seront à vos côtés pour vous apporter le support nécessaire à votre initiation dans le Cloud ou, au contraire, pour donner vie à vos expériences techniques les plus folles sur la plateforme Azure.

Agenda du jour :
Track 1
Track 2
9H
Accueil
9H30
Keynote
10H35
Nouveautés sur le stockage de données dans Azure
Atelier : Science Lab Azure Bootcamp
11H25
Concevoir une architecture distribuée avec Azure WebJobs
12H10
Déjeuner
13H10
Azure IoT
Atelier : Machine Learning
14H00
Pourquoi le Cloud Azure pour votre stratégie eCommerce et digitale ?
15H10
Premiers pas avec Azure Search
Atelier : Racing Lab
16H00
Automati(sati)on de votre application Azure
16H50
Clôture
 

 Voici la session que je présenterai ensemble mon collègue Maxime Launay:
Automati(sati)on de votre application Azure. Passage sur les solutions d'automatisation des processus Azure. Moment pour discuter, bien sûr, d'Azure Automation, mais aussi  PowerShell DSC. D'autres surprises à venir.

Venez nombreux !


Using Azure Resource Manager within Azure Automation


I am publishing here an extract of a post on MSDN Forums, about the utilization of Azure Resource Manager within Azure Automation.

The answer to the question asked in this post, given by Joe Levy, a Microsoft employee, is more important than the original thread. It may be a temporary solution, but also a long term one (if the ARM module will not be exposed by default in Azure Automation).

Here it is:


·        We do not ship the Azure Resource Manager module out of the box yet in Azure Automation like we do the Azure (AzureServiceManagement) module. We have done some limited testing on the ARM module in Azure Automation. If you would like to import this module yourself, here are the steps to get ARM set up in Azure Automation:
Step 1 – Create an Azure Automation Integration Module from the AzureResourceManager PowerShell module.
Navigate to the AzureResourceManager module within the Azure PowerShell directory on a host with Azure PowerShell installed.

Zip up the AzureResourceManager folder.
Step 2 – Import into Azure Automation
Importing this zip as an integration module into Azure Automation works fine as the below screenshots show:

Step 3 – Write a Runbook that uses AzureResourceManager functionality
Like you normally would, except no need to use Switch-AzureMode to switch between AzureServiceManagement and AzureResourceManager, as both AzureServiceManagement and AzureResourceManager modules are now in the PS path.


Thanks, Joe!