Syntax Highlighter

sábado, 18 de marzo de 2017

Visual Studio 2017 Launch Event con TenerifeDev

VS2017Launch

El próximo 23 de abril de 2017 a las 17:30 en el Salón de Grados de la ESIT tenemos un nuevo encuentro con TenerifeDev, dentro de los eventos globales que se están realizando sobre las novedades de Visual Studio 2017. Si quieres conocerlas, no te pierdas este evento en el que hablaremos de ellas y las podremos probar.

Contenidos:

• Novedades en Visual Studio 2017

• Desarrollo con Xamarin en VS 2017

• Data Tools

• Debugging, Unit Testing, Live Code Analysis, Intellisense

• Continuos Delivery and Deployment

Contaremos con:

• Santiago Porras, MVP Windows Platform (@saintwukong)

• Eickhel Mendoza, MCSA Cloud Platform (@eickhel)

• César Abreu, MVP Azure (@cesabreu)

• David Rodríguez, MVP Azure (@davidjrh)

Más información y registro en https://www.meetup.com/es-ES/TenerifeDev/events/237759368

miércoles, 18 de enero de 2017

Microsoft Tour, Workshop de Xamarin, Azure Functions y Machine Learning el 30 de Enero

El próximo 30 de enero, dentro de la gira de Microsoft por las universidades de España, vamos a tener el placer de tener varias sesiones relacionadas con bots, Azure, Machine Learning y Xamarin de mano de los cracks del departamento de DX (Developer Experience) de Microsoft.

Para que los tengas todos a mano:

  • 10:00 – 14:00 Microsoft Tour en la Universidad de la Laguna https://www.meetup.com/es-ES/Clubs-NET-Spain/events/235624825/
    ¿Eres un estudiante técnico? ¿Apasionado de la tecnología? ¿Emprendedor nato?
    Microsoft Academic Tour llega a la Universidad de la Laguna gracias al Club .NET para enseñarte las últimas novedades en herramientas cross-platform, que tienes a tu alcance y que están usando la gran parte de empresas y startups.
    ¿Dónde? Salón de Grados de la ESIT
  • 16:00 – 18:00 Workshop Xamarin is coming en ULL https://www.meetup.com/es-ES/Clubs-NET-Spain/events/235927143/
    El día 30 de enero, en el Aula 2.3 de la Escuela Superior de Ingeniería y Tecnología de la Universidad de la Laguna, podrás aprender a crear tu propia aplicación para Windows, Android e iOS en una tarde. Yo que tú, no me lo pensaba dos veces :) ¿Te imaginas poder crear un Whatsapp 2.0? ¿Y un Pokemon Go 2.0? Es más fácil de lo que te imaginas, y te queremos a enseñar cómo.
    ¿Dónde? Aula 2.3 Escuela Superior de Ingeniería y Tecnología
  • 18:00 – 19:30 Azure Functions y Machine Learning con TenerifeDev y Microsoft https://www.meetup.com/es-ES/TenerifeDev/events/236225160/
    Estamos de suerte. Aprovechando que vienen los compis de Microsoft durante estos días en su gira por España, tendremos una sesión especial en TenerifeDev en el que hablaremos de dos temas de actualidad: Azure Functions y Machine Learning.
    ¿Dónde? CIFP César Manrique

¡Chacho, que te lo pierdes!

miércoles, 6 de julio de 2016

The storage account already exists error when redeploying an ARM template

Update 06 Jul 2016

Seems this is resolved on the latest Storage Resource Provider API 2016-01-01. The schema documented at https://azure.microsoft.com/en-us/documentation/articles/resource-manager-template-storage/ is for 2015-06-15, and that version didn’t support PUT operations. The new 2016-01-01 schema can be found at:

So this new template now works as expected and tags and other settings can be changed:

{

    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

    "contentVersion": "1.0.0.0",

    "resources": [

      {

        "name": "dnntest20160705",

        "type": "Microsoft.Storage/storageAccounts",

        "location": "[resourceGroup().location]",

        "apiVersion": "2016-01-01",

        "dependsOn": [ ],

        "tags": {

          "displayName": "MyStorageAccount"

        },

        "sku": {

          "name": "Standard_LRS"

        },

        "kind": "Storage"

      }

    ]

}

 

Notes:

  • Ensure you install the latest Azure PowerShell and SDKs or the latest 2016-01-01 version won’t be recognized
  • With the latest Azure SDK 2.9.1 available, I have syntax errors on the template, seems the schema was not included in the latest release. While you have syntax errors, you can deploy from Visual Studio with no problems. I suppose this will be fixed on the next Azure SDK release.

Thanks to Tom FitzMacken for the indications.

_____________________________________________________________________________

Original issue description

Seems that when deploying an storage account using an ARM template like the one below:

{

    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

    "contentVersion": "1.0.0.0",

    "resources": [

      {

        "name": "dnntest20160705",

        "type": "Microsoft.Storage/storageAccounts",

        "location": "[resourceGroup().location]",

        "apiVersion": "2015-06-15",

        "dependsOn": [ ],

        "tags": {

          "displayName": "MyStorageAccount"

        },

        "properties": {

          "accountType": "Standard_LRS"

        }

      }

    ]

}

 

If you go and change the “displayName” tag value for something else or try to add a new tag, when you deploy the update I get the following deployment exception:

22:44:07 - [ERROR] New-AzureRmResourceGroupDeployment : 22:44:07 - Resource

22:44:07 - [ERROR] Microsoft.Storage/storageAccounts 'dnntest20160705' failed with message '{

22:44:07 - [ERROR]   "error": {

22:44:07 - [ERROR]     "code": "StorageAccountAlreadyExists",

22:44:07 - [ERROR]     "message": "The storage account named dnntest20160705 already exists under

22:44:07 - [ERROR] the subscription."

22:44:07 - [ERROR]   }

22:44:07 - [ERROR] }'

22:44:07 - [ERROR] At D:\temp\azureresourcegroup2\Scripts\Deploy-AzureResourceGroup.ps1:98 char:1

Workaround

Change the tag value through the portal/PowerShell, so new deployment updates work.

 

This sounds like a bug, that will probably be resolved in a future release.

martes, 5 de julio de 2016

The storage account already exists error when redeploying an ARM template

Seems that when deploying an storage account using an ARM template like the one below:

{

    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

    "contentVersion": "1.0.0.0",

    "resources": [

      {

        "name": "dnntest20160705",

        "type": "Microsoft.Storage/storageAccounts",

        "location": "[resourceGroup().location]",

        "apiVersion": "2015-06-15",

        "dependsOn": [ ],

        "tags": {

          "displayName": "MyStorageAccount"

        },

        "properties": {

          "accountType": "Standard_LRS"

        }

      }

    ]

}

 

If you go and change the “displayName” tag value for something else or try to add a new tag, when you deploy the update I get the following deployment exception:

22:44:07 - [ERROR] New-AzureRmResourceGroupDeployment : 22:44:07 - Resource

22:44:07 - [ERROR] Microsoft.Storage/storageAccounts 'dnntest20160705' failed with message '{

22:44:07 - [ERROR]   "error": {

22:44:07 - [ERROR]     "code": "StorageAccountAlreadyExists",

22:44:07 - [ERROR]     "message": "The storage account named dnntest20160705 already exists under

22:44:07 - [ERROR] the subscription."

22:44:07 - [ERROR]   }

22:44:07 - [ERROR] }'

22:44:07 - [ERROR] At D:\temp\azureresourcegroup2\Scripts\Deploy-AzureResourceGroup.ps1:98 char:1

Workaround

Change the tag value through the portal/PowerShell, so new deployment updates work.

 

This sounds like a bug, that will probably be resolved in a future release.

sábado, 14 de mayo de 2016

Password is expired when using Visual Studio Release Management

Today I was investigating an issue on Visual Studio Online Release Management, getting deployment error related to the Azure credentials used for the deployment operation

Password is Expired summary

When going to the log details, the error happens on a resource manager task. The logs show that the password of the user account used to connect to Azure has expired.

Password is Expired

And here comes something to highlight, because the configuration of the service connection between VS Online and Azure has evolved in the latest months, to support both Azure Classic and Resource Manager models. Also note that the tasks you can configure on Visual Studio Release Management can work with one of these models or both. Let me show with an example.

Configuring Azure service connection on VS Online Release Management

To setup the Azure connection on Release Management, you need to click on the “Manage Project”

ManageProject

Once there, go the “Services” tab and when clicking on the “New Service Endpoint” you will see two ways to connect to Azure: Azure Classic and the new Azure Resource Manager. A few months back there was an only option to support Classic and RM scenarios, but this changed later. The main difference now is the way each connection authenticates with Azure

SNAGHTMLd1dcd0b

So a big difference here is the use of a service principal on Azure Resource Manager connections instead of using a user principal when using Azure Classic connections. This is important for our case, because the “Password is expired” error message we got refers to a user principal, not to a service principal where the “password” and “expiration” concepts are different.

Note that depending on the task used on Release Management, you can use one or other connection, or only the Classic connection. For example:

Fixing the “password is expired” issue

Once we understand these concepts, we have just to fix the password expiration issue. The solution has two steps:

  1. Change the password of the user principal and then update the Azure Classic connections with the new password. Note: You should use a long/very strong password for these user principals because of the second step; service principals come to play to stop using user principals in the future;
  2. To avoid this to happen again, change the password expiration policy for this account to don’t expire.

The first step can be easily done manually. For the second step, we need the help of Azure AD PowerShell module.

Install Azure AD PowerShell module

On this MSDN article you can find all the information related to managing Azure AD via PowerShell: https://msdn.microsoft.com/en-us/library/jj151815.aspx The Azure AD module is supported on the following Windows operating systems with the default version of Microsoft .NET Framework and Windows PowerShell: Windows 8.1, Windows 8, Windows 7, Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2. You need to install two utilities:

Connecting to Azure AD

Once you have installed both utilities, to start using all the Azure AD cmdlets just open a PowerShell command prompt.

$msolcred = get-credential
connect-msolservice -credential $msolcred

Obviously you need to introduce admin credentials if you want to use the administrative cmdlets later, like changing the password expiration policy.

Change the user principal password expiration policy

Once logged in, we can just change the password expiration policy for the user with this script:

# Gets the current policiy value
Get-MsolUser -UserPrincipalName "releasemanagement@mytenant.onmicrosoft.com" | select PasswordNeverExpires

# Changes the policy to never expire
Get-MsolUser -UserPrincipalName "releasemanagement@mytenant.onmicrosoft.com" | Set-MsolUser -PasswordNeverExpires $true

There is a good blog post about this at https://azure.microsoft.com/en-us/documentation/articles/active-directory-passwords-set-expiration-policy/

What happens with service principals? Passwords never expire?

Service principals works in a different way. When you create a service principal, you can specify the StartDate and EndDate for the security principal credential (by default, StartDate=Now; EndDate = Now + 1 Year). You can change the EndDate in a similar way (is not a boolean flag, you need to set the EndDate).

For more information, visit the MSDN article https://msdn.microsoft.com/en-us/library/dn194091.aspx

Related Posts Plugin for WordPress, Blogger...