Azure: What Is It and What Should We Know About Cloud Computing?
During a talk with friends, we started talking about the change of paradigm of a client we are developing a big system for. This client changed its whole infrastructure from its own datacenter to Azure. One of my friends asked me: Azure?! What is that? I heard about it but I have no clue.

After that conversation, I kept thinking about the fact that lots of people in the IT industry don’t know about Azure or how to use Cloud Computing, and that will segment many positions they can apply for in the future since, in the coming years, it will be essential to know about Cloud Computing to be able to develop systems or support them.

When we talk about Cloud Computing, we refer to a business model through the internet, which is booming right now since the computing paradigm we knew up until a few years ago has changed, and it is based on cloud services; one of the most popular ones being Microsoft Azure.

A Brief Introduction to Azure

With the boom of the “.com” domains, more software was developed and that continued to increase during the following years. In order for software to be able to run, we need hardware, and the thing is that hardware has a cost.

Before Azure, the size had to be measured in order to calculate how much hardware was necessary to run certain software. The problem was that it was calculated regarding maximum levels, and hardware was bought to meet that demand. But what happened if those stipulated levels weren’t reached, or if there were moments in which the application wasn’t used? That money spent on hardware was not amortized. It was actually wasted. Not to mention how quickly the teams fell short and the companies had to invest again to upgrade them.

With that in mind, Microsoft Azure was launched in 2008, with the aim of having dynamic data centers in the cloud. The problems due to power outages or Internet interruptions at data centers were left behind. On top of that, due to geographical redundancy, if a data center crashes, Azure automatically starts working in another region. And, most importantly, hardware turns into a service. This means that we can add or remove hardware from our virtual machines on-demand, according to use.

Thus, the following 3 concepts emerge:

Azure as PaaS

Windows Azure was born as PaaS. That is to say, as platform as a service. This area is in charge of the servers and hosting management of websites (up to 10 shared machines). It is also where software is deployed.

Azure as IaaS

Infrastructure as a service (IaaS) allows us to create virtual machines with the operating system of our choice. On the other hand, it is also possible to choose the number of processing cores, the size of the RAM, and to import virtual disks. Moreover, through the PowerShell tools, we can execute complex scripts.

Azure as SaaS

Software as a service is Azure’s most popular aspect. This is where we can find, for example, Office 365 or Microsoft Dynamics 365.

These 3 concepts provide the dynamism that allows us to create hardware we’ll later use in our developments, and thus, to be able to scale or remove resources when necessary, which results in money saving when the peak usage levels are lower.

Now, going back to the main topic: why is it necessary to know about Azure in order to develop software?

Developing software entails 3 main aspects: the code, the compiler, and the database. Before Azure, those three aspects had to be available within the company. Azure provides PaaS and IaaS making it available for any device from anywhere in the world, which means that we can have our task force distributed without great hardware and communication efforts.This changed the trends and development paradigm.

One of its innovations is the use of DOCKER (which comprises the storage of everything necessary for the developed application to run autonomously within a container). Using Docker usually entails many things. Initially, a Docker image repository, which is where we store the container so that it can be used. For that purpose, Azure offers Azure Container Registry, a private repository that allows us to store images that will be deployed in the infrastructure. We’ll also need an infrastructure that reads Docker and uses that image to make the application within available. In that regard, we have Azure Kubernetes Service (AKS), which mounts Docker images and makes them available through a service or ingress, so that we can access it through an IP or a public DNS.

As Linus Torvalds would say: “Show me the code”. Here’s a Kubernetes (K8s) implementation:

In order to do the trick, we have to create a YAML file, which will tell K8s what to create, and it is divided into 2 parts:

1.- A deployment, which is where the referenced Docker code is, in what repository it is stored, under which conditions Docker will run, and on which port it will listen to requests.

2.- A service, which is in charge of telling the world how to access the pod. A pod is a group of one or more containers (such as Docker containers) with a shared storage/network and some specifications on how to execute those containers.

Let’s take a look at the YAML code:

Deployment

Service

However, this wouldn’t be complete without a data backup. Azure allows us to create different kinds of storage media for many languages, such as SQL Server, MongoDB, MySQL or Oracle, without having to buy servers for each one of them (great advantage regarding costs and performance).

With a clear idea of the development part, the following question comes up:

How can we implement a Docker application to Azure?

The answer is Azure DevOps.

Azure DevOps is a Microsoft platform that allows us to perform all kinds of actions within a DevOps flow, from ALM (Application Lifecycle Management), continuous integration, package management with Azure Artifacts, to deployment on different environments, repository management with Azure Repos, and the creation of test plans. It is divided into projects, the user management is complete (by roles) and, according to its groups, it has different privileges. It works with Github and many other repositories.

Azure DevOps main screen.

What can we do with Azure DevOps?

We can automate our deployments and through the dashboard, we can track our projects, their sprints, and more.

Due to the complexity of projects that a solution involves, it’s essential to have a deployment administrator in order to control everything that is developed and deployed. And if this seems too good, the best part is that it’s for free: we can use Azure DevOps to manage our projects (of course, with some constraints). Azure has a pay-as-you-go subscription model, which allows up to 5 users to work with Azure DevOps for free.

So, let’s get to it…

We create a pipeline, which will be in charge of compiling Docker images according to the DockerFile file (which is used to create the Docker images), and then it will execute the UnitTest to check that those changes haven’t generated other bugs in the existing code.

This will generate an artifact, which we’ll read from the release module to later implement it in K8s.

Once we’ve concluded this process, we’ll have our application implemented in K8s with its corresponding services.

The implementation of a Cloud Computing solution would look like this:
['Demian Sclausero']
['Kubernetes', 'Docker', 'Technology', 'Cloud Computing', 'Azure']