Code virtual network configuration in Azure using ARM templates, Visual Studio and Git

Infrastructure as code and configuration as code both fall into the category of configuration management, and both relate to defining or scripting for environments.

Infrastructure as code is more specifically defined as:

Defining your environments to include networks, servers, and other compute resources as a text file (script or definition) that is checked into version control and used as the base source for creating or updating those environments. For instance, adding a new server should be done by editing a text file and running the release pipeline, not by remoting into the environment and spinning one up manually.

When designing scripts or definitions for infrastructure as code, it’s important to make sure that the code and tools are set up to be idempotent, or able to run multiple times without error and with consistency. Continue reading “Code virtual network configuration in Azure using ARM templates, Visual Studio and Git”

Create a kubernetes cluster on CentOS

What is Kubernetes?

Kubernetes, or k8s or “kube”, if you’re into brevity, is an open source platform that automates Linux container operations. It eliminates many of the manual processes involved in deploying and scaling containerized applications. In other words, you can cluster together groups of hosts running Linux containers, and Kubernetes helps you easily and efficiently manage those clusters. These clusters can span hosts across public, private, or hybrid clouds.

Kubernetes was originally developed and designed by engineers at Google. Google was one of the early contributors to Linux container technology and has talked publicly about how everything at Google runs in containers. (This is the technology behind Google’s cloud services.)
Continue reading “Create a kubernetes cluster on CentOS”

Create Azure App Service using Azure ARM and deploy using Visual Studio

In few of the previous blog posts, we discussed on what Azure ARM is and how it helps in the DevOps philosophy of Infrastructure-as-a-Code (IaaC). So we’ll build further on that knowledge. In this blog post, we’ll discuss how to create an Azure App service using ARM template.

We’ll be using Visual Studio 2017 for this post’s purpose. It is not necessary to use this, you can use just Visual Studio code and appropriate extension for ARM or you can use a simple notepad (as all ARM templates are JSON files in the end of the day) or any other editor of your choice. However, using Visual Studio 2017 further simplifies it.  Continue reading “Create Azure App Service using Azure ARM and deploy using Visual Studio”

Become root user on Linux servers in Azure

root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser. The root account is the most privileged on the system and has absolute power over it (i.e., complete access to all files and commands). Among root’s powers are the ability to modify the system in any way desired and to grant and revoke access permissions (i.e., the ability to read, modify and execute specific files and directories) for other users, including any of those that are by default reserved for root.

It is therefore, many times, you need to login as root in order to perform certain administrative actions. Continue reading “Become root user on Linux servers in Azure”

Error: IIS Website not listening on 0.0.0.0:443

We had this situation other day with one of the IIS websites. We were troubleshooting SSL on the site, and after that we were able to resolve that SSL issue. However, we found that the site only works from within the server. But from outside, we were getting connection refused. We checked and re-checked certificates, certificate trust store, windows firewall rules, event logs and firewall logs, SNI, bindings but still same issue.

While checking ports, we observed that port 443 is in listening state only for IP address 127.0.0.1 but not for 0.0.0.0 (Note that 0.0.0.0 means all possible IP address,  only ipv4). So it would require to be listening on the same, so that clients can connect to it. Continue reading “Error: IIS Website not listening on 0.0.0.0:443”

Install PowerShell Modules on hosted agent in VSTS (Visual Studio Team Services)

Visual Studio Team Services (VSTS) is popular tool of choice for various purposes where product is heavily dependent on Microsoft technologies like .NET, Azure, etc. It does lot of work such as Source code management, Building CI/CD pipelines, Package Management, Agile Issue tracking, etc. It is a cloud hosted service offering from Microsoft.

Hosted agent is a build agent that is provided by Microsoft for build and continuous integration purposes. However, you don’t have much control over the configuration of the hosted agent. It comes with most of tools you would normally require for building your source code. Now, when building PowerShell, it will come with latest version of PowerShell, so you can use built in package management cmdlets like Install-Module. Occasionally, you would need to install custom PowerShell modules such as SqlServer (Formerly known as SQLPS). Continue reading “Install PowerShell Modules on hosted agent in VSTS (Visual Studio Team Services)”

Understand Syntax of Azure Resource Manager (or ARM) Templates

The infrastructure for an application generally consists of many components. It consists of an application code itself, a server somewhere to run that code (typically a virtual machine), a storage to hold the data, a database and a network. You may also want to have integration with 3rd party services. So in order for your application to work, either you want to have all this in place, or none at all. Same is true whenever you would want to deploy your application in Microsoft Azure. Azure Resource Manager or ARM is a way to manage all interdependent parts as one resource group. You can deploy, update or delete all the resources required for your application to work.

With Azure Resource Manager, you can create a template that defines all the interdependent parts required for your application. This template is defined using JSON format. See more details on ARM templates here and about JSON here. In this blog post, we’ll understand the syntax to create ARM templates. Continue reading “Understand Syntax of Azure Resource Manager (or ARM) Templates”