Cloud and Datacenter Management Blog

Microsoft Hybrid Cloud blogsite about Management


Leave a comment

Installing and Maintaining #Azure Kubernetes Cluster #AKS #ContainerInsights #AzureDevOps

Start Creating Azure Kubernetes Cluster for your Containers.

Managed Azure Kubernetes Service (AKS) makes deploying and managing containerized applications easy. It offers serverless Kubernetes, an integrated continuous integration and continuous delivery (CI/CD) experience, and enterprise-grade security and governance. As a hosted Kubernetes service, Azure handles critical tasks like health monitoring and maintenance for you. The Kubernetes masters are managed by Azure. You only manage and maintain the agent nodes. As a managed Kubernetes service, AKS is free – you only pay for the agent nodes within your clusters, not for the masters. In the following steps you can see the different ways for creating Azure Kubernetes Cluster via the Azure Portal, or via Azure Cloud Shell, or via Azure Resource Template. When the Microsoft Azure Kubernetes Cluster is running, then I will explain the different ways for deploying container workloads on AKS. When your workload is running on Azure Kubernetes Services, you also have to monitor your Container workloads with Azure Monitor Container Insights to keep in Controle. Let’s start with installing Azure Kubernetes Services (AKS)

Installing Azure Kubernetes Cluster via the Portal.

To begin you need of course a Microsoft Azure Subscription and you can start for free here

Basics information of the Azure Kubernetes Cluster

To Create the Azure Kubernetes Cluster, you have to follow these steps and type the right information in the Portal:

  1. Basics
  2. Scale
  3. Authentication
  4. Networking
  5. Monitoring
  6. Tags
  7. Review + Create

At the basics screen you select the right Azure Subscription and the Resource Group. You can create a New Resource Group or one you already made.
At Cluster details, you give your Cluster a name and select the Kubernetes version.

Here you select the Kubernetes Node size for your Container workload and the number of nodes.
You can start a Cluster already with One node, but choose to start with the right size for your workloads.
When you click on Change size, you can choose your nodes to do the job. 😉

Select the right Size node

Then we go to step 2 and that is Scale.

2. Scale options in Azure Kubernetes Cluster

Here you have two options :

  1. Virtual Nodes
  2. VM Scale sets (Preview)

To quickly deploy workloads in an Azure Kubernetes Service (AKS) cluster, you can use virtual nodes. With virtual nodes, you have fast provisioning of pods, and only pay per second for their execution time. In a scaling scenario, you don’t need to wait for the Kubernetes cluster autoscaler to deploy VM compute nodes to run the additional pods. Virtual nodes are only supported with Linux pods and nodes. More information here about Virtual Nodes

To create an AKS cluster that can use multiple node pools, first enable two feature flags on your subscription. Multi-node pool clusters use a virtual machine scale set (VMSS) to manage the deployment and configuration of the Kubernetes nodes. With this Preview feature you can run Linux Containers and Windows Containers on the same Cluster. More information here about VM Scale sets (Preview)

3, Authentication

The service principal is needed to dynamically create and manage other Azure resources such as an Azure load balancer or container registry (ACR). To interact with Azure APIs, an AKS cluster requires an Azure Active Directory (AD) service principal. More information about the Service Principal can be found here

Azure Kubernetes Service (AKS) can be configured to use Azure Active Directory (Azure AD) for user authentication. In this configuration, you can sign in to an AKS cluster by using your Azure AD authentication token.
Cluster administrators can configure Kubernetes role-based access control (RBAC) based on a user’s identity or directory group membership. More information about RBAC for AKS

4. Networking

Configuring the virtual Networks for your Azure Kubernetes Cluster is important for the right IP range but later on also for the Network Security Groups (NSG).

Here you see an example of the Kubernetes NSG which is connected to the Internet by Default after installation, you can deep dive into security but be careful which settings you do here because Microsoft resources must have access to service the Azure Kubernetes Cluster.

NSG created after installation is finished

NSG Rule set Inbound and outbound

In a container-based microservices approach to application development, application components must work together to process their tasks. Kubernetes provides various resources that enable this application communication. You can connect to and expose applications internally or externally. To build highly available applications, you can load balance your applications. More complex applications may require configuration of ingress traffic for SSL/TLS termination or routing of multiple components. For security reasons, you may also need to restrict the flow of network traffic into or between pods and nodes.

Best practices for network connectivity and security in Azure Kubernetes Service (AKS):

Here is more information about networking and Security for AKS

5. Monitoring

Keep Azure Monitoring Enabled and Connect to your Log Analytics workspace or create a new workspace for Container monitoring of your Azure Kubernetes Cluster.

Azure Monitor for containers is a feature designed to monitor the performance of container workloads deployed to either Azure Container Instances or managed Kubernetes clusters hosted on Azure Kubernetes Service (AKS). Monitoring your containers is critical, especially when you’re running a production cluster, at scale, with multiple applications.

Azure Monitor for containers gives you performance visibility by collecting memory and processor metrics from controllers, nodes, and containers that are available in Kubernetes through the Metrics API. Container logs are also collected. After you enable monitoring from Kubernetes clusters, metrics and logs are automatically collected for you through a containerized version of the Log Analytics agent for Linux. Metrics are written to the metrics store and log data is written to the logs store associated with your Log Analytics workspace.

6. Tags

When you build more Azure Kubernetes Clusters for different departments or teams you can TAG your Clusters for organizing your billing and security for example. Here you find more information about tagging.

After this you click on the last step Review and Create
The Azure portal will do a validation of your Azure Kubernetes Cluster settings, and when it’s validated you hit Create. But when you want more Automation, you can download the JSON ARM template first and use that.

Installing Azure Kubernetes Cluster via Cloud Shell

Azure Cloud Shell AKS CLI

Azure hosts Azure Cloud Shell, an interactive shell environment that you can use through your browser. Cloud Shell lets you use either bash or PowerShell to work with Azure services. You can use the Cloud Shell pre-installed commands to run the code in this article without having to install anything on your local environment.

Here you see an Example of AKS CLI with Auto Scaler with max count of nodes 😉

Installing Azure Kubernetes Cluster via Template

Create Azure Kubernetes Cluster via Template in the Portal

Here you find an Example at GitHub for a Template deployment

Now you have your Microsoft Azure Kubernetes Cluster (AKS) running in the Cloud, you want to deploy your Container workloads on the Cluster. In the following steps you see different deployments.

Deploy Container workload with Azure DevOps Project

Deployment Center

First you select your repository where your source code is of your workload.

Set the information right and click Next.

Simple example Click Next

Create a Container Registry.

Building Pipeline with Azure DevOps.

Here you see the Building in Microsoft Azure DevOps.

Build, test, and deploy in any language, to any cloud—or on-premises. Run in parallel on Linux, macOS, and Windows, and deploy containers to individual hosts or Kubernetes.

Here you find all the information about Microsoft Azure DevOps for your workloads, code and Deployments.

Deploying Container workload completed with Azure DevOps.

 

Deploy Container Workloads via Visual Studio Code

When you download and install Visual Studio Code on your computer, you can install the Azure Kubernetes extension for VSCode.

Install Kubernetes extension for VSCode

VSCode with Kubernetes Extension

Here you see Microsoft Visual Studio Code connected with my Azure subscription where my Azure Kubernetes Cluster is running. With the standard Helm Repository packages for deployment to your AKS Cluster. Here you see a WordPress yaml file which I deployed to the Kubernetes Cluster on Azure.

Just Select your Package and Install on Azure Kubernetes.

From here you can into the Container and read the logs.

I’m using Visual Studio Code a lot for Azure Kubernetes but also for Docker Containers and images.
Making Azure ARM JSON templates and this great for Infrastructure as Code.

 

Azure Monitoring with Container Insights

In One Dashboard you can see the Status of all your Clusters

 

Azure Monitor Container Insights Live View

Because we installed Azure Monitor for Containers on the Microsoft Azure Kubernetes Cluster, we can live see what is happening inside the Kubernetes Cluster with the containers. This is a great feature when you have a issue with a Container for troubleshooting fast and see what is happening.

Conclusion

Microsoft Azure Kubernetes Cluster is fast and easy to manage. You can upgrade your Cluster without downtime of your Container workload. With Azure Monitor for Containers you can see what’s happening inside the container and you can set alerts when something went wrong. This keeps you in Controle of the solution. With Deployment center alias Azure DevOps Projects you can deploy your workload via Azure DevOps Pipeline and work on versioning, testplans, Azure DevOps repo and work together with a Team on the following releases. Working with Azure Kubernetes Multi node pools with Linux and Windows on the same Cluster is possible. Try it yourself and start with a Proof of Concept for your Business.

JOIN Containers in the Cloud Community Group on LinkedIn


Leave a comment

Microsoft #Azure CloudShell for Management tasks #Bash #Powershell #CLI #KubeCtl #Terraform

https://shell.azure.com

Azure Cloud Shell is an interactive, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work. Linux users can opt for a Bash experience, while Windows users can opt for PowerShell.

In this quick overview you will see the possibilities of Microsoft Azure Cloudshell functionalities and tools.

Azure Cloudshell Editor

Azure Cloud Shell includes an integrated file editor built from the open-source Monaco Editor. The Cloud Shell editor supports features such as language highlighting, the command palette, and a file explorer.
This can be handy with JSON and YAML files.

 

When you have your App YAML file for your Azure Kubernetes Cluster on your Cloud drive, you can edit the file online with your browser and save it in the Azure Cloud. I like this editor in the Cloudshell, especially when you are not behind your own laptop or pc and you have to make a quick change.

I have a Kubernetes Cluster installed on Azure and with this editor I can explore my Azure logs, Cache, and config files for the information I need to work with in Bash, Powershell to do my CLI commands for example 😉

For the Powershell Gurus 

Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. Learn here more about Azure Powershell

Azure Kubernetes CLI Kubectl

Kubectl is a command line interface for running commands against Kubernetes clusters. kubectl looks for a file named config in the $HOME/.kube directory. You can specify other kubeconfig files by setting the KUBECONFIG environment variable or by setting the –kubeconfig flag.
Read here more about Kubectl

Terraform CLI is Available

What is Terraform?
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.
Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.
The infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.

The key features of Terraform are:

Infrastructure as Code
Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.

Execution Plans
Terraform has a “planning” step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.

Resource Graph
Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.

Change Automation
Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors.

More information on Terraform

It’s really easy to Upload or Download your Files.

AzCopy is a command-line utility designed for copying data to/from Microsoft Azure Blob, File, and Table storage, using simple commands designed for optimal performance. You can copy data between a file system and a storage account, or between storage accounts.

More information about Features & tools for Azure Cloud Shell here

Conclusion :

Microsoft Azure Cloudshell is very powerful to work with, creating your infrastructure from the Command Line Interface (CLI) or with JSON / YAML scripts. Some features or commands are not available in the Azure portal and that’s where Azure Cloudshell can help you out. Try the different Azure Cloudshell Tools and look what you like most to use for your work. From here you can work on any device with a browser and do your work. #MVPBuzz


Leave a comment

#Microsoft SQL Always-On Cluster vs #SQL Managed Instance in #Azure

SQL Always-On Cluster in Azure

Before we start with building this SQL Always-On Cluster we already have some Azure SDK Components Active in the Azure Subscription to work with:

  • Virtual Network VNET-001 is already installed
  • Subnet-SQL and Subnet-Domaincontrollers
  • Network Security Groups (NSG) with the right rules active
  • Two domain controllers
  • Azure Keyvault ( for disk Encryption)

We deployed three Virtual Machines in an Availability Set :

  • Primary SQL Node VM01
  • Secondary SQL Node VM02
  • Witness Server

The deployment was with ARM Template :

VM Deployment

Copy and paste the JSON in your template editor like Visual Studio Code for Example or in the Azure Portal Template builder.

Visual Studio Code

Azure Portal Template

Read more how to deploy ARM Templates via Microsoft Azure Portal here

You also can create a Private or Public Repository on GitHub and store your ARM Templates there in a Library.

GitHub Learning Lab
Learn new skills by completing fun, realistic projects in your very own GitHub repository. Get advice and helpful feedback from our friendly Learning Lab bot.

Create a SQL Server 2014 Always On Availability Group in an existing Azure VNET and an existing Active Directory instance via GitHub :

https://github.com/Azure/azure-quickstart-templates/tree/master/sql-server-2014-alwayson-existing-vnet-and-ad

Configure Always On Availability Group in Azure VM manually :

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-portal-sql-availability-group-tutorial

Important Tip :

Don’t forget to get the right connectivity between Azure Load Balancer and the SQL Always-On Listener :

## Get the Cluster Resource Information:
Clear-Host
Get-ClusterResource `
| Where-Object {$_.ResourceType.Name -like “IP Address”} `
| Get-ClusterParameter `
| Where-Object {($_.Name -like “Network”) -or ($_.Name -like “Address”) -or ($_.Name -like “ProbePort”) -or ($_.Name -like “SubnetMask”)}

#############################################################

## Set Cluster Parameters:
$ClusterNetworkName = “Cluster Network 1” # the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
$IPResourceName = “IPlistener” # the IP Address resource name
$ListenerILBIP = “10.x.x.x” # the IP Address of the Internal Load Balancer (ILB). This is the static IP address for the load balancer you configured in the Azure portal.
[int]$ListenerProbePort = 80

Import-Module FailoverClusters

Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{“Address”=”$ListenerILBIP”;”ProbePort”=$ListenerProbePort;”SubnetMask”=”255.255.255.255″;”Network”=”$ClusterNetworkName”;”EnableDhcp”=0}

############################################################

Before you start with your SQL workloads from On-premises Datacenter on Microsoft Azure, have a look if PaaS Azure SQL Managed Instances is something for your Organization with all the benefits.

What is Microsoft Azure SQL Managed Instance?

Managed instance is a new deployment option of Azure SQL Database, providing near 100% compatibility with the latest SQL Server on-premises (Enterprise Edition) Database Engine, providing a native virtual network (VNet) implementation that addresses common security concerns, and a business model favorable for on-premises SQL Server customers. The managed instance deployment model allows existing SQL Server customers to lift and shift their on-premises applications to the cloud with minimal application and database changes. At the same time, the managed instance deployment option preserves all PaaS capabilities (automatic patching and version updates, automated backups, high-availability ), that drastically reduces management overhead and TCO.

Read here more on Microsoft Docs about Azure SQL Services

Conclusion :

When you have a lot of SQL workloads and want to go to Microsoft Azure Cloud Services, analyze your existing workloads well and have a look first at Microsoft Azure SQL Managed Instances. With this Azure PaaS Service, you don’t have to manage the Complete Infrastructure like in a SQL Always-On Cluster (IaaS).

Have a good look at the requirements and Microsoft Data Migration Services can help you out.

SQL Server instance migration to Azure SQL Database managed instance

 


Leave a comment

Build your hybrid strategy with #AzureStack and Azure Stack HCI #HybridCloud #DevOps

Azure Stack HCI solutions are available for customers who want to run virtualized applications on modern hyperconverged infrastructure (HCI) to lower costs and improve performance. Azure Stack HCI solutions feature the same software-defined compute, storage, and networking software as Azure Stack, and can integrate with Azure for hybrid capabilities such as cloud-based backup, site recovery, monitoring, and more.
Adopting hybrid cloud is a journey and it is important to have a strategy that takes into account different workloads, skillsets, and tools. Microsoft is the only leading cloud vendor that delivers a comprehensive set of hybrid cloud solutions, so customers can use the right tool for the job without compromise.

Microsoft Announcing Azure Stack HCI: A new member of the Azure Stack family


Leave a comment

Inside Azure Management (Preview) Free E-Book #Azure #Cloud #Management #MVPBuzz

Inside Azure Management

This Awesome Inside Azure Management E-book is a must have with Great content !

Chapter 1 – Intro
Chapter 2 – Implementing Governance in Azure
Chapter 3 – Migrating Workloads to Azure
Chapter 4 – Configuring Data Sources for Azure Log Analytics
Chapter 5 – Monitoring Applications
Chapter 6 – Monitoring Infrastructure
Chapter 7 – Configuring Alerting and notification
Chapter 8 – Monitor Databases
Chapter 9 – Monitoring Containers
Chapter 10 – Implementing Process Automation
Chapter 11 – Configuration Management
Chapter 12 – Monitoring Security-related Configuration
Chapter 13 – Data Backup for Azure Workloads
Chapter 14 – Implementing a Disaster Recovery Strategy
Chapter 15 – Update Management for VMs
Chapter 16 – Conclusion

It’s all about Azure Management in the Cloud written by Great Microsoft MVP’s.
Download the Free Inside Azure Management E-book here

 

Follow the Authors here :  Tao Yang, Stanislav Zhelyazkov, Pete Zerger, and Kevin Greene, along with Anders Bengtsson, CSA for Microsoft.

Thank you for all the work guys and Congrats on this Awesome E-Book ! 😉


Leave a comment

Learn Azure in a Month of Lunches Free E-book #Azure #Cloud #Education

Learn Azure in a Month of Lunches breaks down the most important Azure concepts into bite-sized lessons with exercises and labs—along with project files available in GitHub—to reinforce your skills. Learn how to:
Use core Azure infrastructure and platform services—including how to choose which service for which task.
Plan appropriately for availability, scale, and security while considering cost and performance.
Integrate key technologies, including containers and Kubernetes, artificial intelligence and machine learning, and the Internet of Things.

You can download the Free Learn Azure in a Month of Lunches E-book here


Leave a comment

#Azure IoT Pipeline with Microsoft #AzureDevOps Project #IoT #Code #Apps #SmartCities

Azure IoT Edge – Hub with Azure DevOps Pipeline

Configure continuous integration (CI) and continuous delivery (CD) for your IoT Edge application with DevOps Projects. DevOps Projects simplifies the initial configuration of a build and release pipeline in Azure Pipelines.

In the following steps you can see how easy it is to build your Continuous integration and continuous deployment to Azure IoT Edge with DevOps Project :

Select Simple IoT

Click on Next.

From here you set your Azure DevOps organization to your Azure IoT Hub. Click on additional settings

In additional settings you can set :

  • Azure Resource Group
  • Location ( region)
  • Container Registry
  • Container Registry name
  • Container registry SKU
  • Container Location
  • IoT Hub of Edge Devices
  • IoT Hub Location

Select Container Registry Plan

Azure Container Registry allows you to store images for all types of container deployments including DC/OS, Docker Swarm, Kubernetes, and Azure services such as App Service, Batch, Service Fabric, and others. Your DevOps team can manage the configuration of apps isolated from the configuration of the hosting environment.
More information about Azure Container Registry and pricing

Azure DevOps Project will do the rest of the deployment.

Of course Infrastructure as Code (IaC) is possible by ARM JSON Template.

Save the template for later.

here you got your ARM Templates.

Later you will see when you complete the deployment, that your JSON ARM template is in Azure DevOps Repo.
You can connect your Azure DevOps Repo via the portal but also via Visual Studio and Visual Studio Code.

The resources coming into myiotpipeline-rg

MyIOTPipeline-IoTHub is created.

MyIOTPipelineACR Container Registry is created.

MyIOTPipeline with Azure DevOps is created 🙂

Your Continuous integration and continuous deployment to Azure IoT Edge is deployed and active. Now you have your Azure Pipeline in place to continuously update your IoT Device App. From here you can go to Azure DevOps Project Homepage.

Via Agent phase you can see all the jobs of the deployment.

Azure DevOps Pipeline Release

here we have Azure DevOps Repos

Azure DevOps Services includes free unlimited private Git repos, so Azure Repos is easy to try out. Git is the most commonly used version control system today and is quickly becoming the standard for version control. Git is a distributed version control system, meaning that your local copy of code is a complete version control repository. These fully functional local repositories make it easy to work offline or remotely. You commit your work locally, and then sync your copy of the repository with the copy on the server.
Git in Azure Repos is standard Git. You can use the clients and tools of your choice, such as Git for Windows, Mac, partners’ Git services, and tools such as Visual Studio and Visual Studio Code.

All the Azure Resources for the IoT Edge Pipeline with Azure DevOps.

When you have your Azure DevOps Pipeline with IoT Edge devices running, you can monitor your pipeline with Analytics inside Azure DevOps.

Click Next.

Click on Install Analytics.

Select the right Azure DevOps Organization for your IoT Edge Pipeline.

Done !

 

Analytics is now active, you can make automated test plans in Azure DevOps and see the results via Analytics.

Azure DevOps Overview Dashboard.

There are a lot of predefined Analytics Views for you shared.

An Analytics view provides a simplified way to specify the filter criteria for a Power BI report based on the Analytics Service data store. The Analytics Service provides the reporting platform for Azure DevOps.
More information about Analytics in Azure DevOps here

Easy to start with Powerbi and Azure DevOps Connector.

Planned manual testing
Plan, execute, and track scripted tests with actionable defects and end-to-end traceability. Assess quality throughout the development lifecycle by testing your desktop or web applications.

More information about making your testplan for your IoT Edge Devices Azure DevOps Pipeline

Conclusion :

When you connect Microsoft Azure IoT Edge – HUB with your Internet of Things Devices and combine it with Microsoft Azure DevOps Team to develop your Azure IoT Pipeline, then you are in fully control of Continuous integration and continuous deployment to Azure IoT Edge. From here you can make your innovations and Intelligent Cloud & Edge with Artificial Intelligence and Machine Learning to your Devices. You will see that this combination will be Awesome for HealthCare, Smart Cities, Smart Buildings, Infrastructure, and the Tech Industry.

In this Microsoft article, you learn how to use the built-in Azure IoT Edge tasks for Azure Pipelines to create two pipelines for your IoT Edge solution. The first takes your code and builds the solution, pushing your module images to your container registry and creating a deployment manifest. The second deploys your modules to targeted IoT Edge devices.

Join the Azure DevOps Community on LinkedIn

Join Containers in the Cloud Community on LinkedIn

Join Microsoft Azure Monitor & Security for Hybrid IT Community on LinkedIn