Syntax Highlighter

viernes, 20 de noviembre de 2015

Si te perdiste Connect(); vente a ReConnect(); con TenerifeDev

ReConnectTenerifeDev

Los días 18 y 19 de noviembre hemos podido ver en vivo y en directo el evento Connect 2015, donde desde Nueva York se nos han presentado el presente y futuro de las herramientas y servicios de Microsoft para una nueva era de desarrolladores.

“El papel de los desarrolladores está cambiando dramáticamente en el mundo de hoy, y Microsoft también lo está haciendo. Hace un año comenzamos un viaje para un nuevo Microsoft para desarrolladores, al presentar el futuro de un .NET de código abierto en Linux y Mac, y Visual Studio gratis para apuntar a cualquier dispositivo y sistema operativo.”

Así rezaba la introducción de la KeyNote de Scott Guthrie, en un discurso lleno de anuncios y demostraciones, mostrando los siguientes pasos de la transformación de Microsoft con las herramientas y servicios que ayudan a los desarrolladores a tener éxito en esta nueva era.

ReConnect();

TenerideDev y otras comunidades técnicas a lo ancho y largo del territorio español, hemos querido acercarte la repetición de las jugadas más interesantes en un evento resumen llamado ReConnect(); siguiendo la idea del edición anterior. Para ello, hemos desplazado a enero la próxima charla que teníamos programada para hacerle hueco a este pedazo de evento donde veremos cosas como compilar .NET nativo para Linux desde Visual Studio. What?? Sí, lo que oyes, estos suecos se han vuelto locos.

Evento: ReConnect() 2015
Fecha: 17 de diciembre de 2015
Lugar: Salón de Grados de la Escuela Superior de Ingeniería y Tecnología (anteriormente ETSII)
Horario: 16:30 a 19:30 (con descanso incluido)
Speakers: Santiago Porras (@saintwukong, Windows Platform MVP), Cesar Abreu (@cesabreu, Azure MVP), David Rodriguez (@davidjrh, Azure MVP)

Inscripción: en el MeetUp de TenerifeDev 

¡Corred insensatos!

jueves, 8 de octubre de 2015

Rebuilding SQL Database indexes using Azure Automation

Some days back I had a discussion with an Azure SQL Database engineer about the need of rebuilding indexes on SQL Database. I thought that was a best practice but the engineer told me that the task was accomplished automatically as part of the managed service, in the same way you haven’t had to execute any file related task.

I remembered the thing today and found two interesting articles from Alexandre Brisebois just confirming my initial thoughts, that the indexing management is under your responsibility, and you need to pay attention to how fragmented they are.

There are three good blog posts from Alexandre on the matter I found interesting:

Running the following T-SQL on a SQL Database, you can get the index fragmentation on a specific table in percent:

SELECT name, avg_fragmentation_in_percent

FROM sys.dm_db_index_physical_stats (

       DB_ID(N'MyDatabaseName')

     , OBJECT_ID('MyTableName')

     , NULL

     , NULL

     , NULL) AS a

JOIN sys.indexes AS b

ON a.object_id = b.object_id AND a.index_id = b.index_id

If you want to get all the indexes in a database with more than a 30% of fragmentation, you can run this other one:

SELECT name, avg_fragmentation_in_percent

FROM sys.dm_db_index_physical_stats (

       DB_ID(N'MyDatabaseName')

     , NULL

     , NULL

     , NULL

     , NULL) AS a

JOIN sys.indexes AS b

ON a.object_id = b.object_id AND a.index_id = b.index_id

WHERE avg_fragmentation_in_percent > 30

image

And now don’t be scared when seeing the results. The good news is that you are going to get better performance after rebuilding the indexes without having to scale to another SQL Database tier. Alexandre itself commented something about the possibility of using Azure Automation to do the task.

Reindexing using Azure Automation

I’m in love with Azure Automation and all the small things that can be automated to do our daily job easier, mostly based on running a small script on a schedule. Curiously there is a PowerShell Workflow Runbook on the Automation Gallery that allows to fully automate the SQL Database reindexing. Let’s see how to configure it step by step:

1) Provision an Automation Account if you don’t have any, by going to https://portal.azure.com and select New > Management > Automation Account

image

2) After creating the Automation Account, open the details and now click on Runbooks > Browse Gallery

image

3) Type on the search box the word “indexes” and the runbook “Indexes tables in an Azure database if they have a high fragmentation” appears:

image

4) Note that the author of the runbook is the SC Automation Product Team at Microsoft. Click on Import:

image

5) After importing the runbook, now let’s add the database credentials to the assets. Click on Assets > Credentials and then on “Add a credential…” button.

image

6) Set a Credential name (that will be used later on the runbook), the database user name and password:

image

7) Now click again on Runbooks and then select the “Update-SQLIndexRunbook” from the list, and click on the “Edit…” button. You will be able to see the PowerShell script that will be executed:

image

8) If you want to test the script, just click on the “Test Pane” button, and the test window opens. Introduce the required parameters and click on Start to execute the index rebuild. If any error occurs, the error is logged on the results window. Note that depending on the database and the other parameters, this can take a long time to complete:

image

9) Now go back to the editor, and click on the “Publish” button enable the runbook. If we click on “Start”, a window appears asking for the parameters. But as we want to schedule this task, we will click on the “Schedule” button instead:

image

10) Click on the Schedule link to create a new Schedule for the runbook. I have specified once a week, but that will depend on your workload and how your indexes increase their fragmentation over time. You will need to tweak the schedule based on your needs and by executing the initial queries between executions:

image

11) Now introduce the parameters and run settings:

image

NOTE: you can play with having different schedules with different settings, i.e. having a specific schedule for a specific table.

With that, you have finished. Remember to change the Logging settings as desired:

image

Conclusion

Cool? SUPERCOOL!!

Un saludo y happy coding!

sábado, 12 de septiembre de 2015

Azure Web Apps: Kudu REST API is a box of surprises

VitorinoxAfter working with Azure Websites Web Apps for a long time, I have noticed that every day I use some tips and tricks that surprise people in some way. Normally the tips are nothing spectacullar, but when you use them your daily productivity is enhanced. I’m going to start posting some of these tips in order to have my own “notebook” to revisit when needed, but also to share and make easier small tasks like working with files, website management, getting alerts, etc.

So let’s start with a simple tip:

How to download the website contents of a site hosted on Azure Web Apps

There are many ways to answer this question coming to my mind: FTP, MS Deploy, uploading 7zip command line tool via Kudu, ...but is there something more simple than that just for downloading the content?

Answer is YES.

Azure Web Apps ZIP API

After spending some time working with Azure Web Apps, you have probably noticed that “behind” your website, there is a lot of tools being served by the SCM (Service Control Manager, also known as Kudu).

You can direclty access this service by simply browsing the “https://mywebsite.scm.azurewebsites.net” URL, where “mywebsite” is your site name, and then introducing your Azure credentials (using an Azure AD or Microsoft Account). You can also use Basic Authentication by browsing “https://mywebsite.scm.azurewebsites.net/basicauth” and then introduce the deployment credentials you can get from your website settings at the Azure Management portal.

Kudu offers you an user interface full of tools to manage and diagnostic your web app:

KuduUI

And if you dig into the Kudu documentation, you will notice that some REST APIs come out-of-the-box. One of these REST APIs is the ZIP, that allows downloading folders as zip files or expanding zip files into folders:

ZIPAPI

Download website contents using a simple URL in your browser

Enough! With just introducing this URL in your browser and typing your credentials, you can download your full website contents:

https://mywebsite.scm.azurewebsites.net/api/zip/site/wwwroot

If you want to download a subfolder of your website, you could use something like:

https://mywebsite.scm.azurewebsites.net/api/zip/site/wwwroot/subfolder1

Note that you can download anything inside the “D:\home” folder where the “/api/zip” is relative, so if for example, you want to download all your site log files, including IIS log files, you can use the following URL:

https://mywebsite.scm.azurewebsites.net/api/zip/LogFiles

NOTE: an equivalent one would be to use the “dump” API:

https://mywebsite.scm.azurewebsites.net/api/dump

Adding some Azure PowerShell sauce

Is quite normal to download these log files to your PC and then run your favourite log parsing tool like Log Parser and Log Parser Studio. It’s easy to manually download them from Kudu but it’s not funny when you have to do the same task almost every day over some hundreds of websites.

So why not to use PowerShell to automate the task?

After installing Azure PowerShell, you can run the following script to download the files and folders using the Kudu ZIP REST API. You can tweak it a little by iterating between all your websites, and also iterating all your subscriptions, so you could download the IIS logs of all the websites you own just with some lines of code.

In the following script, I’ve changed the folder to download to a specific one where DNN Platform stores their Log4Net daily logs, that BTW, you can then review on-premises using Log4View.

NOTE: I used PowerShell 5.0 available on Windows 10, with “wget” and “Invoke-RestMethod” support what simplifies the script.

# Input parameters

$subscriptionName = "MySubscriptionName"

$websiteName = "MyWebsitename"

$slotName = "Production"

$folderToDownload = "site/wwwroot/Portals/_default/logs/" # must end with / for folders or you will get a 401

$outputZipFile = "D:\Temp\LogFiles.zip"

 

# Ask for Azure credentials to obtain the publishing credentials

Add-AzureAccount

Select-AzureSubscription $subscriptionName

 

# Build the basic authentication header

$website = Get-AzureWebsite $websiteName -Slot $slotName

$publishingUsername = $website.PublishingUsername

$publishingPassword = $website.PublishingPassword

$base64AuthInfo = [System.Convert]::ToBase64String( `

                    [System.Text.Encoding]::ASCII.GetBytes(( `

                    "{0}:{1}" -f $publishingUsername, $publishingPassword)))

 

# Download the log files using wget or Invoke-RestMethod, available in Windows Powershell 5.0 :)

Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} `

                  -Uri "https://$websiteName.scm.azurewebsites.net/api/zip/$folderToDownload" `

                  -OutFile $outputZipFile

 

And don’t forget other Kudu APIs available!

I have some other tips I use in a daily basis I will be posting soon. Don’t forget to take a look to other APIs available, because they are a box of surprises:

  • api/vfs: allows you to execute files and folder operations
  • api/command: allows you to execute something (one of my favourites when combined with the previous one)
  • api/settings: allows you to change the site settings
  • api/dump, api/diagnostics, api/logs: for diagnostics, tracing, etc.
  • api/scm, api/deployments, api/sshkey: for repository and deployment management;
  • api/siteextensions: enable or diable other site extensions like Visual Studio Monaco. The available extensions grow in a monthly basis, don’t forget to revisit from time to time

Un saludo and Happy Coding!

miércoles, 9 de septiembre de 2015

Próximos eventos TenerifeDev

Después de un Agosto sofocante y aún con la resaca de la Tenerife LAN Party, ya estamos de vuelta! Y esta vez vamos a programar los eventos de los próximos cuatro meses en un flash, donde hablaremos de todo un poco: Xamarin, Machine Learning, Windows 10 IoT Core, Raspberry Pi, y hasta una sesión que nos pareció la mar de interesante dedicada íntegramente al personal branding.

¿Cuándo? ¿Dónde?

A continuación mostramos la lista de eventos y sus fechas, que en principio se desarrollarán en el Salón de Grados de la ETSII como viene siendo habitual. Lo más recomendable es que os registréis en http://www.meetup.com/es/tenerifedev/ para estar al tanto de cualquier modificación y del contenido de cada sesión:
  • Jueves 17 de septiembre de 18:00 a 19:30 - Xamarin Forms
  • Jueves 15 de octubre de 18:00 a 19:30 - Machine Learning
  • Jueves 19 de Noviembre de 18:00 a 19:30 - Automatizando la oficina con Raspberry Pi, Windows 10 y Azure
  • Jueves 17 de diciembre de 18:00 a 19:30 - Personal branding: Por qué y cómo convertirnos en marca
¡Corred insensatos!

miércoles, 8 de julio de 2015

[TenerifeDev] Se acerca TLP Innova con muchas novedades

LogoTenerifeDevQueda una semana para que comience TLP Innova, el espacio dedicado a la innovación tecnológica donde profesionales y estudiantes podremos compartir conocimientos y novedades en forma de charlas técnicas y talleres y así mejorar nuestras capacidades y poder aplicarlas a nuestro entorno laboral o de investigación.

Como ya os hemos adelantado, TenerifeDev participa este año más activamente que nunca colaborando para que Microsoft esté presente, con dos miembros del equipo de Microsoft DX que os informarán de todo lo que necesitéis y que además estarán apoyando a los ponentes que hablaremos sobre sus tecnologías, ahora más abiertas que nunca ya que .NET se ha declarado Open Source al igual que otros proyectos.

En cuanto a nuestra agenda, tendremos la oportunidad de contar con sesiones y talleres técnicos muy variados y de los que podréis sacar mucha experiencia y conocimiento y que serán impartidos por algunos de los profesionales más reconocidos en el territorio nacional e incluso algunos de talla internacional como Bruno Capuano, Alberto Díaz y Josué Yeray, todos MVP de Microsoft, Alejandro Campos Magencio miembro de Microsoft DX y otros ponentes de renombre a nivel nacional como Javier Suárez Ruiz y Santiago Porras también MVP de Microsoft, Vanessa Estorach fundadora de e-Growing, César Abreu y Javi Medina Azure Advisors.

 

Agenda

Miércoles:

11:00 – 14:00 | Taller: Microsoft Azure, la nube más potente al alcance de todos

Jueves

10:00 – 13:00 | Taller: Xamarin.Forms, un código para unirlos a todos!

16:00 – 19:00 | Taller: Desarrolla para todos los dispositivos Microsoft con Windows 10

Viernes

clip_image002

Este año viene cargado de sesiones que pueden tener interés para Startups y Apps multiplataforma, además de que en pocos días será el lanzamiento oficial de Windows 10 que viene con más novedades que nunca y sobre todo, abierto a nuevas plataformas como Xbox para las que se podrá desarrollar con aplicaciones universales. Este año, por encima de cualquier otro os interesará lo que podamos contaros.

Ni qué decir, que necesitamos que nos ayudes a correr la voz, así que si conoces a alguien interesado en asistir, no dudes en contárselo.

miércoles, 1 de julio de 2015

TLP-Innova 2015: las sesiones de TenerifeDev que no te puedes perder

highres_435020085Como todos sabéis, la Tenerife LAN Party 2015 está a la vuelta de la esquina. En menos de dos semanas, del 14 al 19 de Julio, podremos comenzar a disfrutar en el Recinto Ferial de Santa Cruz de Tenerife de uno de los mayores eventos en España relacionados con los eSports por no decir nada de cómo ha ido creciendo año tras año la sección Summer-Con.

Otra de las áreas que también ha ido creciendo es el área profesional denominada TLP-Innova, que desde la edición anterior se celebra en el Auditorio de Tenerife Adán Martín, a pocos metros de la TLP ofreciendo un ambiente algo más formal y facilitando el desplazamiento de los asistentes entre uno y otro evento.

highres_435020106 highres_435020071

TenerifeDev, desde que comenzó su andadura hace 5 años atrás, no ha querido perderse este evento participando con charlas y talleres relacionados con tecnologías Microsoft, y este año nos hemos estado dejando la piel para poder ofrecer las mejores sesiones y talleres de la mano de los mejores cracks del mundillo. Por cierto, no te pierdas la entrevista a Santiago Porras para Conéctate al Día que tuvo lugar el pasado viernes 26 de junio (el programa completo lo podréis escuchar aquí).

Microsoft is in da house! Everybody is in da house!

¿Qué sesiones y talleres? Si bien a través de la propia web de la TLP podréis acceder a una agenda que ahora mismo está en construcción, desde YA podéis ver en https://tlpinnova.eventday.com/ las sesiones que os estamos preparando desde TenerifeDev para el viernes 17 de Julio. Atentos a los talleres, actualización en breve para indicar el día, lugar y hora.

highres_435020069 highres_435020089

Dentro de estas sesiones podréis ver la cantidad de cracks que tenemos este año en cartel: Bruno Capuano, Josue Yeray Julián Ferreiro, Javier Suárez, Alberto Díaz, Santiago Porras, César Abreu, Javi Medina, Vanessa Estorach, Andreas Wendl, …y además, contamos con la presencia de su majestad don Alejandro Campos Magencio de Microsoft, con el que también pasamos un buen rato en el pasado Web & Cloud tour hace unos meses.

Y aparte de pasar un buen rato con los ponentes (aquí más de uno parece sacado del club de la comedia), pues qué mejor si además se va a hablar de temas tan variados, desde desarrollo de aplicaciones multiplataforma hasta los entresijos del Machine Learning y el Proyecto Oxford (sí, eso que usaste en https://how-old.net/ para vacilar a sobre la edad que aparentabas tener por una foto), sin dejar atrás temas de actualidad como monetización, engagement y el despliegue de servicios en Azure. Incluso hay alguna sesión para los más geeks como el despliegue de un servidor de Minecraft en la nube o cómo montar la web de una guild. Aunque para geek, la sesión de Coding4Fun de Bruno Capuano con la que todos acabaréis encantados.

highres_435020081

Importante: ¡¡regístrate!!

El tema importante: regístrate para el evento en este enlace:

https://tlpinnova.eventday.com/

Simplemente tenéis que pulsar el botón de la página principal y rellenar los campos solicitados. Esto nos facilitará la gestión de este y próximos eventos.

 

Por supuesto muchas gracias a los sponsors de estas sesiones, sin los que no sería posible el desarrollo de las mismas. Colaboran:

 

Encamina_250  intelequia  LogoDevsDNA

microsoft250

martes, 16 de junio de 2015

[Released] DNN Azure Active Directory provider

DNNADHi all! Since long time ago I was trying to implement an Azure Active Directory provider for DNN Platform, and you know what? This weekend I got time for it, mostly because a pull request brought to my attention a change on the platform (thanks to Evan Smith for it! https://github.com/dnnsoftware/Dnn.Platform/pull/250).

So after spending some time coding and configuring the applications on Azure, I have built the first release of a DNN Azure Authentication provider that I have made available at Github.

Download and Code:

https://github.com/davidjrh/dnn.azureadprovider

Here all the configuration and installation steps at glance.

DNN Azure Active Directory provider

The DNN Azure Active Directory Provider is an Authentication provider for DNN Platform that uses Azure Active Directory OAuth2 authentication to authenticate users.

alt text

alt text

alt text

Requirements:

Installation and configuration guide

The installation and configuration guide has two parts: one referred to the Azure Active Directory setup; and a second one where we install the authorization provider on our DNN deployment and setup the AD parameters we created before.

Following the guide before, you will give access to all your Azure AD users to register and sign-in into your DNN application. You can go later and harden your security settings like only allow to access the DNN Web Application to certain users on the Azure Management portal. Also note that depending on you have "Public" or "Private" user account registration on your DNN portal, you will need to approve the registered user before allowing him to access the site.

Azure Active Directory setup
  1. Go to https://manage.windowsazure.com to setup the required applications on your Azure Active Directory. You need to use the user credentials of an user having at least "Service Admin" role.
  2. From the Azure Active Directory list, select the Directory you are going to setup
  3. Select the applications tab to create the two needed applications. On the scenario we are going to deploy we have a client application (the DNN web application) that will make requests to a Web API (the "resource" on the OAuth webflow). First of all we will setup the Web API app with permissions to read the AD, and then setup the second DNN Web app that has permissions to access the first app.
    1. Click on "Add" button from the bottom bar to start the application setup wizard
    2. Click on "Add an application my organization is developing"
    3. Set the "name" of your Web API application. This can be any name you want and is simply how you will identify the application in your Azure Active Directory (i.e. "My Contoso WebAPI").
    4. Set the type of application to "Web application and/or Web API" (notice that Web Applications and Web API’s are considered the same type of application as far as Azure AD is concerned), and click Next.
    5. Set the "Sign-on URL". This is the URL where users will access your application. There is no verification of this URL so even if the application hasn’t been developed yet the portal will still let you add it. (i.e. "https://mycontoso.com/login")
    6. Set the "App Id URI". Notice this is a URI and not a URL. This is what Azure AD will use to identify your application when authentication users requesting access to it. It can be practically anything you want as long as it is unique in your directory and a valid URI. (i.e. "https://mycontoso.com/mywebapi"). Click Finish to create the application.
    7. Ensure that on the "Configure" tab, under the "permissions to other applications", at least "Windows Azure Active Directory>Delegated Permissions>Enable sign-on and read users' profiles" is checked.
  4. Now create the DNN Client Web App on Active Directory following the next steps:
    1. Again, from the "Applications" tab, click on "Add" button at the bottom bar to start the application setup wizard
    2. Click on "Add an application my organization is developing"
    3. Set the "name" of your Web API application. (i.e. "My Contoso Web App")
    4. Set the "Sign-on URL". (i.e. "https://mycontoso.com/login")
    5. Set the "App Id URI". (i.e. "https://mycontoso.com/mywebapp"). Click Finish to create the application.
    6. Now on the "Configure" tab, under the "keys" section, create a new key with the desired expiration (currently 1 or 2 years). Click on Save and then copy the key to a secure location. IMPORTANT: you won't be able to copy this key later, so copy it now or generate a new one when needed.
    7. Under the "single sign-on" section, fill the "Reply URL" textbox with the REAL and valid URL you are using in your DNN portal. Note that you can specify more than one if you have different login pages. (i.e. https://azuread.dnndev.me/Login)
    8. Now let's go and give permissions to the DNN Client Web App to access the Web API application we created before:
    9. Under the "permissions to other applications", click on the "Add Application" button
    10. On the "Show" dropdown list, select "All Apps" and then type on the "Starting with" textbox the name you specified when creating the Web API application (i.e. "My Contoso WebAPI"), and click on the search button
    11. Select the "My Contoso WebAPI" from the list below by clicking on the "+" icon and then click on the Finish button
    12. On the "My Contoso WebAPI" permissions row, check "Access MyContosoWebAPI" from the delegated permissions dropdown list.
    13. Click Save to finish.
DNN provider installation and configuration

It's important to remember that you need a DNN deployment with version 7.4.1 or later to continue.

  1. Download the DNN Azure AD provider from the Releases folder (i.e. AzureADProvider_01.00.00_Install.resources)https://github.com/davidjrh/dnn.azureadprovider/tree/master/Releases
  2. Login into your DNN Platform website as a host user and install the provider from the "Host > Extensions" page
  3. Use the "Install Extension Wizard" to upload and install the file you downloaded on step 1. Once installed, you will see the auth provider listed under the "Authentication Systems" section.
  4. To setup the Azure AD provider for the current portal, go to "Admin > Extensions", and under the "Authentication Systems" click on the "Edit" module. A popup dialog opens to specify all the needed parameters:
    1. Go to the Azure Management portal, and selecting the My Contoso Web App, click on the "View Endpoints" on the bottom bar to view the app endpoints.alt text alt text
    2. TokenEndpoint: copy and paste the "OAuth 2.0 Token Endpoint"
    3. AuthorizationEndpoint: copy and paste the "OAuth 2.0 Authorization Endpoint"
    4. GraphEndpoint: copy and paste the "Windows Azure AD Graph API Endpoint" (this is not in use yet on this version, but will be used on new provider versions)
  5. Now fill the other fields:
    1. APIKey: from the DNN Web Application you created on Azure, copy and paste the Client ID field that s under the "Configuration" section
    2. APISecret: from the same DNN Web Application, copy and paste the key secret that you wrote down on a secure place. If you didn't, you can generate another one, remember that are only shown once
    3. AppIdUri: copy and paste your WebAPI App ID Uri (IMPORTANT: this is not the WebApp ID Uri, is the WebAPI ID Uri you created before. On this example, ishttps://mycontoso.com/mywebapi). It's the unique parameter you need to specify from the first WebAPI you created, all the other ones are from the DNN Web App application.
    4. Enable: check to enable the provider

alt text

References:

sábado, 18 de abril de 2015

Global Azure Bootcamp: el evento que no debes perderte

MinionRace2015

Falta ya menos de una semana para el Global Azure Bootcamp 2015, el mayor evento global organizado por miembros de la comunidad: MVPs, Insiders, geeks y demás adictos al autoescalado y al Big Data. Se trata de la tercera edición de un evento que no hace más que crecer en cifras edición tras edición, con algunas que son para dejar la boca abierta, como los 27.000 servidores que se crearon en un solo día para participar en una investigación colaborativa para la detección temprana de la diabetes Tipo 2.

¿Cómo es el formato de este evento?

El evento se desarrollará durante el sábado 25 de Abril de 2015, en 190 localizaciones alrededor del globo. Desde hace algunos meses, el que tuviera ganas de participar en este evento global simplemente tenía que proponer su localización para montar una “sede” del evento, cumpliendo con algunos requerimientos mínimos para asegurar el éxito del evento: una sala acondicionada para la ocasión, agua, etc.

Como se puede observar en el mapa inferior, el evento al final tendrá una duración real de más de 24h al cubrir casi todos los usos horarios del planeta.

WorldWideLocations

Luego el formato dentro de cada localización podría adaptarse según la capacidad o intereses de los asistentes, yendo desde charlas técnicas a hands-on labs, pero sobretodo sintiendo que se forma parte de un evento global a través de un “Global Lab” en el que todos los asistentes de todas las ubicaciones participan a la vez, sacando a relucir lo que es capaz de ofrecer una plataforma de nube pública como Azure y obtener todo su jugo.

El Global Lab como eje central del evento

En el año 2013, en la primera edición del evento, este lab global consistía en el procesamiento y renderizado de imágenes a través de una super-granja de servidores: cada participante podía desplegar un Azure Cloud Service que descargaba los datos a procesar y una vez generada la imagen resultante la almacenaba en una ubicación temporal; otro proceso finalmente se encargaba de unir cada una de las imágenes para componer la película final.

El resultado en números fue espectacular: sobre 9.000 servidores desplegados en diversos centros de datos de Azure durante el mismo día, procesando alrededor de 725K imágenes, lo que casi viene a ser como generar una película de animación en tiempo real. 

2013GlobalLab

Si bien el resultado dejó bien claro la capacidad de la plataforma de Azure con esta prueba de concepto, en la edición de 2014 se quiso llegar algo más lejos y no desaprovechar la capacidad de procesamiento desplegada durante ese día, así que se optó por buscar algún campo de investigación real y que beneficiara finalmente a toda la humanidad.

Después de un proceso de selección entre varias investigaciones en curso alrededor del planeta, se llegó a la conclusión que una de las más interesantes era la investigación que estaba haciendo un Instituto de Investigación de California para la detección temprana de la diabetes Tipo 2. Los resultados de este trabajo no sólo ayudarían a entender el estado de la diabetes en humanos a nivel molecular sino que también redundarían en su detección en estados iniciales. Para más información sobre este lab, visita este enlace.

HF-and-Diabetes-Glycosylation-150.small_

El resultado de ese día: más de 27.000 servidores desplegados alrededor de 136 localizaciones a nivel global, procesando datos en un sólo día que equivalían a 3 años. Todo un avance del que todos pudimos salir orgullosos de haber puesto nuestro granito de arena en este esfuerzo titánico.

El Lab Global de 2015: dos por uno

Si bien esta participación en el lab global de ediciones anteriores, daba esa sensación de la globalidad e importancia del evento, en esta edición de 2015, se ha querido incrementar esa sensación de pertenencia al planeta Tierra escalando el número de labs globales a dos!

De este modo los asistentes al evento podrán participar, además de las otras actividades llevadas a cabo en cada sede (ver más abajo), en dos labs:

GlobalLab2015

  • Science Lab: de una forma muy similar al que se llevó a cabo en la edición anterior, se desarrollará una investigación global alrededor del cáncer de mama. Los asistentes al evento podrán desplegar máquinas virtuales en Azure para ayudar a analizar los datos necesarios para esta investigación, ayudando a conocer cómo la respuesta de la enfermedad es alterada basándose en las moléculas presentes en las células afectadas por el cáncer. Los resultados de este trabajo podrían llevar a nuevas terapias para atacar directamente diversas formas de cáncer con el mínimo de efectos colaterales. Puedes encontrar más detalles científicos sobre esta investigación en la web global del evento.
    HanselmanNote
  • Racing Game Lab: el segundo de estos labs, y para añadir algo de diversión una vez que hemos echado a andar nuestros “minions” en el Science Lab, es sobre la participación activa en un juego de carreras en el que podrás poner a prueba tanto tus habilidades al volante como las de programación, ya que no sólo podrás divertirte consiguiendo logros como la vuelta rápida para tu país o picándote a entrar en el podio global, sino que también aprenderás cómo está implementado este juego en Azure explotando en tiempo real los datos de tiempos y telemetría de cada uno de los participantes. De hecho, se anima a que a cada 4 horas, todos participemos a la vez en el denominado “Hammer Time!”, para estresar y poner a prueba la capacidad de Azure con 10.000 jugadores a la vez alrededor del globo.
    Game3D

IMPORTANTE: Recuerda que si quieres participar en estos labs tienes que tener habilitada tu propia suscripción de Azure. Tienes disponible una prueba gratuita de 30 días que tiene 150€ de crédito que es ideal para el día del evento. Aunque no es obligatorio, llevar pre-instalado Visual Studio facilitará las tareas la parte de desarrollo del hands-on lab del Racing Game. Siempre quedará el Notepad.exe para los más valientes.

Crear prueba gratuita de Azure  de 30 días

Lo que te vas a encontrar en Madrid

Debido al rotundo éxito de la edición anterior, este año hemos tenido la cosa complicada para componer la agenda de entre más de 50 sesiones propuestas.

Finalmente, contaremos con 2 tracks (uno orientado a Dev y otro a IT) con 7 sesiones cada uno, más el tercer track sobre los Global Lab. En la preparación del desarrollo han participado de un modo u otro más de 30 profesionales del sector. Creo que en ninguna otra parte del globo se juntarán más de 20 MVPs con los que podrás aprender los últimos detalles de la plataforma Azure: Machine Learning, App Service, y mucho más!

Global Azure Bootcamp Madrid 2014

Ah! Y regalos para todos los asistentes!!!

Por supuesto, todo esto no sería posible sin la inestimable ayuda de nuestros patrocinadores, a los que agradecemos todo su esfuerzo e implicación en que este tipo de eventos, que recordemos que está siendo organizado por la comunidad, salga adelante.

LocalSponsors

Así que ya sabes, si aún no te has registrado al evento, no puedes dejar pasar esta oportunidad. Va a ser algo grande, muy grande, y queremos que formes parte.

Registro Global Azure Bootcamp 2015 – Madrid

P.D. ¿No he hablado de minions aún? ¡Pues te vas a hartar! Sonrisa

domingo, 8 de marzo de 2015

El Web & Cloud Tour pasa por Tenerife

WebCloudTour1

¡Muy buenas! ¿Sabías que Microsoft está preparando para finales de este mes de marzo una gira por toda España visitando varias comunidades técnicas en un evento de día completo? Un evento donde tendrás la posibilidad de conocer de primera mano las últimas novedades en desarrollo Web y Cloud de Microsoft. Aprenderás a desarrollar sitios web modernos, interactivos y rápidos con ASP.NET y Webtools de Visual Studio 2013 para después desplegarlos e implementarlos con Microsoft Azure. Descubrirás las nuevas características y los servicios que incluye como Microsoft Azure Virtual Machines, Websites y Visual Studio 2013 para construir y mover una gran variedad de aplicaciones al Cloud.

¡Esta jornada es un buen lugar para empezar a construir tu proyecto!

¿Cuándo?

En Tenerife, el evento será el miércoles 25 de marzo, tanto por la mañana como por la tarde. ¡Ojo, si quieres asistir a mañana y tarde debes registrarte a ambos eventos!

¿Dónde?

En el caso de Tenerife, el evento se desarrollará en el Aula Magna de la Facultad de Física de la Universidad de La Laguna

WebCloudTour2

¿Qué es lo que voy a aprender?

Este evento se compone de uno de mañana, relacionado a todo sobre la nube, y otro de tarde donde nos centraremos en el desarrollo web.

Horario - Sesión Cloud

09:00 - 09:30 - Registro

09:30 - 10:30 - Introducción a Microsoft Azure

10:30 - 11:30 - Soluciones PaaS con servicios en el Cloud y Azure WebSites

11:30 - 12:00 - Descanso

12:00 - 13:00 - Datos, SQL Azure y Azure Storage

13:00 - 14:00 - Gestión masiva de datos en la era IoT

Horario - Sesión Web

15:00 - 16:00 - Introducción a ASP.NET y Visual Studio Web Tooling

16:00 - 17:00 - Construyendo aplicaciones web con ASP.NET MVC

17:00 - 17:30 - Descanso

17:30 - 18:30 - Creación de API REST con WebAPI

18:30 - 19:30 - Aplicaciones en tiempo real con SignalR

 

¡Qué levante la mano quien quiera ir!

DSC_0107

jueves, 15 de enero de 2015

Using the Azure Websites Migration Assistant to migrate a DNN website

Last October the Azure Websites team released a new tool to run the migration of local websites to Azure in a super-super-easy way: just following an assistant that analyzes and migrates your website to the cloud, including local database dependencies, all in a few clicks.

Using Apurva’s words:

Now you can easily migrate to Azure Websites from your existing websites that run on Internet Information Service (IIS) 6 or later. Azure Websites Migration Assistant can analyze your IIS server installation, identify which sites can be migrated to Azure Websites, highlight any elements that cannot be migrated or are unsupported on the platform, and then migrate your websites and associated databases to Azure with just a few clicks.

So what came immediately to my mind was if the assistant would work correctly when trying to migrate a DNN website to Azure and how would be the experience. Two months later, finally I got time to run a test, and has been amazing!!

Let’s summarize the steps to follow in the case you want to move your website as well. Check the Tips and Tricks section before running the assistant for lessons learned, so perhaps you can avoid to fall into some known errors. Note that this tool is also open source and the code is available at CodePlex, so fixes and improvements are welcome!

 

Moving your DNN site to the cloud in 3 steps

To start the process, you will need to browse https://www.movemetothecloud.net and follow the instructions. The migration process has 3 steps:

1. Install the Migration Assistant tool (available at https://www.movemetothecloud.net/)

2. Run the readiness assessment

3. Migrate your site(s) (hey! You can move more than one site at time!)

The website I used for this test was a DNN Platform 7.3.4 default installation. Before starting the assistant I double checked that the site was working fine (see tips and tricks section to save time on known issues).

clip_image002

So after downloading the assistant the first screen appears to ask for the onpremise IIS server hosting the website to migrate. Since mine was my own laptop, I used the default option:

clip_image004

So after clicking next, the assistant contacts the IIS server and looks for possible candidates to migrate. I selected only the website I wanted to migrate unchecking all the others. You need to do it one by one, no unselect all option, but remember that you can contribute to the project!

clip_image006

The next step shows a readiness report where the verification results are shown. My report was not showing anything scary so I simply continued with the following step by clicking on the Upload button.

clip_image008

And now started the cool part, because all the website provisioning, SQL Database server, database, etc. it’s automatically created during by the assistant just by clicking some buttons. This remembered me the DNN Azure Accelerator project that does the same but deploying on Azure by using the Cloud Services flavor.

clip_image010

So when clicking on the “Begin Migration” button, the Azure AAD/Micosoft Account login page was shown to introduce my Azure subscription credentials:

clip_image012

After signing in, I selected the subscription I wanted to use and the datacenter location. I’m not sure if there is a bug on the tool or the datacenter location is not fully populated with all the options, but I could only deploy on Central US, no other option appeared. As this was a migration test was OK for me, but I would need to revisit this in the future when migrating other websites so I can choose the desired datacenter location.

clip_image014

In the next step you can select the SQL Server settings, so can choose between an existent one or just create a new one what is the default option. I also left the database name setting as default as well, but I manually set the website name to avoid portal alias issues after deploying on Azure (check Tip #2 under the Tips and Tricks section at the end of the post).

clip_image016

By clicking on the Customize settings link, you can also choose the website mode, the worker size, the web hosting plan (server farm) as well as the database edition. You can just use the defaults, but by my experience I would recommend at least a S1 database edition for performance reasons.

clip_image018

After clicking on the Create Website button, the migration process started by provisioning the needed resources, all smooth:

clip_image020

So once created, we start with the publish process by clicking on the Begin Publish button in order to start the website content upload as well as the database migration. By the logs being shown in this process and without confirming seeing the code at CodePlex, I suspect that this process is executed on two parallel threads, one uploading the content via webdeploy and the second by exporting/importing a .bacpac. It’s interesting because I’m very familiar running this type of migrations using just the same technique (note for myself: satisfy my curiosity spending a while reviewing the code at CodePlex).

Depending on the size of your site and the available bandwidth, this can take a long time. It is just a good moment for taking that cup of coffee.

clip_image022

And just after the long wait, the site apparently finished without issues!

clip_image024

Browsing the Azure Website for the first time brought the website fully migrated to Azure. The assistant did the corresponding modifications in the web.config to target the new database (curiously, the change was done directly on the web.config file and not using the website connection string settings).

clip_image026

Who wants more?

 

Tips and tricks

Tip #1: check your local database for SQL Database incompatibilities

The wizard runs really smooth and it’s awesome to see it working just by specifying some settings, but be aware that the assistant has its limitations and probably does not analyze all what your website needs. The list of elements verified during the analysis are listed at http://azure.microsoft.com/en-us/documentation/articles/web-sites-migration-from-iis-server and while the checks done are awesome, seems that is not running any check on the database, so when I tried to migrate a website that I knew that had SQL Database incompatibility issues, the problem arose very late, just when all the website was migrated and the data was being inserted (this was after an hour of data transfer).

NOTE: SQL Database Update V12 (Preview) has been announced which provides nearly complete compatibility with the Microsoft SQL Server engine, so the mentioned below does not apply by the time you are reading this post.

clip_image028

After a few minutes more the process stopped and gave a full error report, but no helpful info on the error or how to solve it.

clip_image030

So before running the Azure Websites Migration assistant, if you are going to move a website that has a database dependency like DNN, I strongly recommend to you to verify that the database is SQL Database compatible. There are several ways to accomplish that objective, here some suggestions:

1) Use the SSMS database migration wizard targeting a SQL Database as destination. I believe a similar process is used under the covers (export/import a .bacpac), so the same errors appears without having to wait for the last step

2) Use the always free SQL Azure Migration wizard available at CodePlex (https://sqlazuremw.codeplex.com/)

3) Use RedGate’s SQL Compare, my favorite! Check here for a free trial (http://www.red-gate.com/products/sql-development/sql-compare/)

Tip #2: Adding a cloud portal alias before the migration

After migrating your DNN website to Azure you can get a 404 error if you have more than one portal in your local install or you have set the “Add Automatic Portal Alias” to false. I have wrote more info about the issue at https://serverfault.com/questions/655441/iis-website-works-on-only-one-port-in-localhost-settings/657915#657915

To avoid the issue, just add a portal alias BEFORE running the migration wizard, so it’s already configured when migrated to the cloud. If you are going to use a website name “MyDNNWebsite” on the wizard, just add the portal alias “MyDNNWebsite.azurewebsites.net”

 

Conclusions

Other problems can arise, but I have to say that for DNN projects the assistant works like a charm. Congratulations to the Azure Websites team for this jewel, I’m excited with the promised improvements coming in the future.

Hope this helps!

Related Posts Plugin for WordPress, Blogger...