Post-Event Azure Academy Timisoara

Today marks the end of the Azure Academy pilot. I had fun talking with students about Azure, Automation, PowerShell and DevOPS.

For those that do not know what Azure Academy is. It’s the school for training students and people that want a chance to start a new chapter in their professional career using Azure as there starting point.

My involvement in Azure Academy is to teach IaaS, Networking, best practices in Azure, infrastructure design patterns, automation with ARM and PowerShell and doing infrastructure as code with CI/CD pipelines.

This was an amazing experience for me because I got to see first-hand what passionate people look like and see what determination and the will to change and evolve looks like.

It was also a pleasure to see how people are able to change their mindsets in order to understand what it means to be in the Azure world and work hard to get to the point of actually changing there lives.

Running Linux web apps in Azure App Service

If we look at the statistics of Azure, we will see that most of the Virtual Machines that are deployed are running Linux. There’s a good reason as to why to run Linux applications, and I’m not going to cover that in this blog article. Today I will be talking about running Linux Web Applications in Azure’s App Services offering.

You may or may not know that Azure App Services run on IIS so in a nutshell, when you spin up an App Service and deploy a Web Application, you’re deploying that code using the same worker process with one application pool per website. So you’re not provisioning a single virtual machine to host your Web App instead you’re receiving space on an existing VM to host your application.

The main problem with App Services was that you could only host applications on IIS thus limiting your options. You have the possibility of running PHP or Java applications on IIS, but they wouldn’t be as performant as you would expect. Microsoft solved the problem by introducing Containers for Web Apps. You spin up a Linux App Service, and from there you deploy your application on an Apache solution (prebuilt) or a container built by you.

Why containers you might say?

Containers have been around for a long time, and they allow you to consistently run your application in any environment you want without having to say “It works on my machine”. API that was chosen to create, deploy, run containers is Docker. Most people call those containers as Docker Containers, but in reality, Docker is just the API that allows you to create/manage those containers. The main idea is that if you create a container that runs your web application without problems, then you can just take that container and deploy it anywhere because the code and all your dependencies are held in that image.

So how publish/pushh / push my container in a Linux App Service?

Taking your image and pushing it in a Linux App Service is very simple. You first have to have your container image pushed in a public/private repository like Azure Container Registry or Docker Hub then you just create a Web App for Containers and reference your image.

How do I deploy my code in a consistent manner?

Creating images in a centralized consistent manner is quite different than working alone on your laptop. Web App for Container has integration with most of the thing that you would use to deploy your code in a regular Windows App Service.

There are a couple of ways of pushing your code to the Linux App Service:

1. You can create your container image and push it to a repository like Azure Container Registry or Docker Hub.
2. You can use a CI/CD engine like VSTS to create your image and push it to the registry.
3. You just upload your files via FTP and be done with it 🙂

Down below is a demo flow of how you would push an image to the Web App for Containers service

Now if you’re used to App Services running IIS, there are some limitations that you should be aware of.

1. Containers are stateless by nature – If you need persistence you need to leverage blob storage or use another service like Redis Cache or you can leverage a feature to mount the /home directory to an Azure Files share. The latter will downgrade your performance a lot so tread carefully.
2. You only get ports 80/443 so if you need a custom port for your web application then App Services will not allow it.
3. You don’t have Web Jobs
4. You cannot do VNET integration
5. You cannot do Authorization with Azure AD

This is just a number of limitations that you should be aware of. Some features that you get from a regular App Service will eventually pop up in the Linux ones but until then, you need to work with what you have 🙂

That being said, take a look at Web Apps in Containers, play around with them and see what you can come up with.

Post-Event ITCamp 2017

ITCamp

Another year another ITCamp. This year was the 7th edition of ITCamp, and it get’s better each year. This year we had 5 tracks, 40 speakers, over 40 sessions and 500+ participants!

I’ve had fun with the conference staff and as a speaker. It’s always challenging to do technical and logistical work at a conference that you’re also speaking at.

When it comes to the logistical part, it was a challenge and a pleasure to make sure that everything is OK for the speakers and our participants. Recording the sessions was a challenge like any year and having all the speakers leave with a smile on there faces at the end and promising to come back the next year with even more exciting information, was the best feeling in the world when it comes to IT Camp.

To give you an idea about the technical part, my presentation at ITCamp was about Testing your PowerShell Code with Pester where I showed how useful Pester is to test your PowerShell code.

My Sessions Description:
Infrastructure as Code is growing more popular, system administrators and devs started writing more and more sophisticated systems code and scripts.

Testing code is something that devs have been doing for a long time while system administrators just started adopting the idea. With the growing popularity of PowerShell, more and more system administrators and devs began to write PowerShell code for provisioning and configuring infrastructure either on-premises or in the cloud, but the biggest problem was that there was no useful framework to test that code when a breaking change occurred.

This is the concept of “I ran it, and it worked,” did it now?

Enter Pester.

Pester is a unit testing framework for PowerShell. It provides a few simple-to-use keywords that let you create tests for your scripts. Pester implements a test drive to isolate your test files, and it can replace almost any command in PowerShell with your implementation. This makes it an excellent framework for both Black-box and White-box testing.

In this presentation, you will learn what Pester is, how you can use pester as your daily driver when you’re writing scripts and how you can use Pester to make your life better when change happens.

We also spoke about one of my favourite testing phases: “Stupidity testing”. We all know that as much as we want there will be that one person that will not go through the process the way we intend them to and they will find a different path that will break whatever it is what we have built. For these people, there is a process that I propose we all use, and that is the stupidity test. Why make your life hard when you can know that everything will go as intended?

Let me know if you want to know more about this, and I hope to see you at next years, IT Camp. I will not be missing the fun and the opportunity to meet such great minds and learn from them.

Speaking at Azure Global Bootcamp in Cluj

For the 5th year in a row, ITCamp Community is organising Global Azure Boot Camp (https://global.azurebootcamp.net/).

This is a global event that takes place in over 159 locations around the world. Like last year, Cluj-Napoca is hosting a GABC and appears on the Azure map.

On April 22nd, you are invited to join this event which will have three 90 minute workshops which will be part theoretical and part practical, so we advise you to bring a laptop 🙂

I will be speaking at the event, and my workshop is about ARM templates 🙂

The event will start at 9:00 AM and will finish at around 2:00 PM.

Here are the event workshops:

Azure Functions (Radu Vunvulea)

What are Azure Functions? AWS Lambda from Azure. This is the fastest way how we can present Azure Functions. During this workshop, we will have a challenge to create a system that can process and analyze data without VMs or other computation units. We will use only Azure Functions for it. Sounds interesting, then let’s meet from 09:30 and find out how you can do this.

Machine learning for mere mortals with Azure ML (Silviu Niculita)

Machine learning has been leveraged to radically change many industry verticals. The problem is the learning curve has always been very steep. Exotic languages, complex tools, little or no documentation.But innovative cloud-based ML platforms are changing that and democratizing access. During this session, you will learn the basics of machine learning, and you will see a demo of how you can build a prediction model using real-world data, evaluate several different algorithms and modeling strategies, then deploy the finished model as a scalable RESTful API within minutes.

ARM Templates, how to create them, and use them in your CD pipeline (Florin Loghiade)

Azure has an excellent API that permits the user to automate the creation of every complex environment, using one single JSON document. Those documents are called ARM Templates, and they can be used to create, manage and even refresh any type of resource available in Azure. Using ARM templates and PowerShell combined with a CI/CD tool like VSTS, TeamCity, Jenkins, you can automate the build and deployment of the most complex application out there. In this hands-on lab, you will learn about the benefits of using Azure Resource Manager templates, when and how to use PowerShell in the CI/CD pipeline, and what it takes to create ARM Templates.

Here is the meetup link and I hope to see you at the next Global Azure BootCamp!

Global Azure Bootcamp 2017 powered by ITCamp

Saturday, Apr 22, 2017, 9:00 AM

Endava Office (ISDC)
Avram Iancu 506-508 407280 | Florești Cluj-Napoca, RO

13 ITCamp-ers Went

Acesta este al cincilea an când ITCamp community organizează Global Azure Boot Camp. Acesta este un eveniment la nivel global care are loc în peste 159 de locații. Ca și anul trecut, Clujul nu se lasă mai prejos și apare pe harta Azure. Pe data de 22 Aprilie vă invităm pe toți la acest eveniment din Cluj-Napoca, care va conține 3 workshop-uri.Part…

Check out this Meetup →

Converting existing VM deployment ARM templates to use Managed Disks

In my last blog post, I talked about why we should stop using regular storage accounts for our IaaS VMs and why should we use Managed Disks. In today’s blog post I will talk about how you can modify your existing ARM templates that deploy your VMS to use Managed Disks from now on.

Let’s take a look at a regular storage account based ARM Template:

We have a resources block where we specify a storage account, and we use that resource to create an OS Disk and a Data Disk for the particular VM.

If we want to add more disks then we copy paste the what’s between the dataDisks array a couple of times, modify the LUN and name and we’re happy.

Converting the template to a managed disk format is pretty easy. You first need to reference in the template the API Compute (do note that we’re not modifying storage API) version 2016-04-30-preview or a later version (never use -preview in your production templates!)

You change the storage profile to reference managed disks as shown the code snip below:

Hard? I don’t think so, MS made it very easy to convert existing templates to use Managed Disks. You basically remove some code from the template 🙂

This sample is for single VMs;

If you have multiple VMs in an Availability set, you need to add a “managed” property to the Availability Set block like shown below:

Hope this was usefull, if you have any comments, write them down below 🙂

Have a good one!

NSG in ARM Template – Little nugget to be careful of

A friend of mine was having issues connecting to a couple of VMs that he provisioned using an ARM template. The template worked perfectly until he added the JSON block to add an NSG.

Every time he started a deployment with the NSG block in the ARM template, he wouldn’t be able to connect to the VMs in any way. The fun fact was that even deleting the NSG didn’t solve the issue, so he had to recreate the whole environment from scratch and trust me that took a while 🙂

So what was the problem, you may ask?

He was using a source TAG Internet which for some reason (I still haven’t figured this one out), killed the connectivity on the VMs on both sides (Private and Public IPs) and funnily enough, the logs didn’t show anything.

If you encounter a problem like this one, double check your NSG blocks to not have sourceAddressPrefix: Internet but sourceAddressPrefix: *

Problematic example:

Working example:

So far I haven’t been able to reproduce it, and I’m still looking into what’s causing the issue for that particular ARM template but if you encounter something similar, give it a try and let me know your findings 🙂

Have a good one!

Microsoft Azure MVP 2017

Happy New Year!

For me this is a great start of the year as I’ve just received an e-mail from Microsoft, announcing me that I’ve been awarded the Microsoft Most Valuable Professional award in the Microsoft Azure category!

With this occasion, I would like to thank my good friends and colleagues, Tudor Damian and Mihai Tataran for supporting me to achieve this goal.

Great start of a year, hope the next one comes with the same awesome news 😀

With that being said, happy new year again, and as always have a great one!

LE: Added pics!

Migrating to Exchange Online Office 365 using IMAP Connector – Field notes

I’ve been working on migrating customers on-premise e-mail solution to Office 365, so they could benefit from all the goodness that Office 365 offers, we encountered some issues that we couldn’t find in the official documentation. By reading the migration documentation – IMAP Migration Documentation – we thought that we planned every black scenario that could happen, but Murphy’s law happened and we faced some dreadful issues.

In this blog post, I will write about what I encountered during an IMAP migration of a Zimbra on-premise e-mail solution and what you guys should consider if you ever do an IMAP migration of a non-documented e-mail solution.
(more…)

Pin It on Pinterest