Cloud and Datacenter Management Blog

Microsoft Hybrid Cloud blogsite about Management


Leave a comment

Upgrading Azure #Kubernetes Cluster and Set #Azure monitor Alerts on #AKS


Current version of Kubernetes on Microsoft Azure.

Upgrading Microsoft Azure Kubernetes Services

Azure Kubernetes Service (AKS) makes it simple to deploy a managed Kubernetes cluster in Azure. AKS reduces the complexity and operational overhead of managing Kubernetes by offloading much of that responsibility to Azure. As a hosted Kubernetes service, Azure handles critical tasks like health monitoring and maintenance for you. In addition, the service is free, you only pay for the agent nodes within your clusters, not for the masters.

AKS clusters support Role-Based Access Control (RBAC). An AKS cluster can also be configured to integrate with Azure Active Directory. In this configuration, Kubernetes access can be configured based on Azure Active Directory identity and group membership.
For more information, see, Integrate Azure Active Directory with AKS.

From here I will do a step-by-step Upgrade of a Microsoft Azure Kubernetes Cluster to a newer version and set Azure Monitor alert rule active for the future to get an Alert notification when a colleague is upgrading the AKS Services.

Here you see all the newer versions of Kubernetes.

Upgrading to version 1.11.1 of Kubernetes.

IMPORTANT NOTE :

When upgrading an AKS cluster, Kubernetes minor versions cannot be skipped. For example, upgrades between 1.8.x -> 1.9.x or 1.9.x -> 1.10.x are allowed, however 1.8 -> 1.10 is not. To upgrade, from 1.8 -> 1.10, you need to upgrade first from 1.8 -> 1.9 and then another do another upgrade from 1.9 -> 1.10

KubeCluster Activity Log

At the green arrow on this picture you can download the activities into CSV file. At the Red arrow you see the User ID who initiated the Upgrade of the Kubernetes Cluster. This is important information for Azure Alert monitoring.

10 minutes later Kubernetes Cluster is Upgraded to version 1.11.1

Upgrade is done.

We now do a minor Upgrade of Kubernetes from version 1.11.1 to 1.11.2 to get the newest version on Azure.
Click on 1.11.2 version and hit Save.

 

Microsoft Azure Monitoring Alerts

When you click on the second activity of the Upgrade you see at arrow 2 that you can add an Activity Log Alert by Azure monitoring.

Creating Rule Alerts.

  1. Define Alert condition is already set. We want an Alert notification on Upgrading KubeCluster.
  2. Define Alert details, must be set.
  3. Define Action Group, must be set to create the Alert Rule.

2. Define the Alert Details.

3. Define Action Group : Click on + New Action Group

Click on OK

Created Action Group name AKSAdmins

An action group is a collection of notification preferences defined by the user. Azure Monitor and Service Health alerts are configured to use a specific action group when the alert is triggered. Various alerts may use the same action group or different action groups depending on the user’s requirements.

More information on Creating and managing action groups in the Azure portal can be found here

For information on how to use Azure Resource Manager templates to configure action groups, see Action group Resource Manager templates.

 

From here you can Create the Alert Rule and make it Active.

Azure Monitor Alerts with one rule Enabled.

Here is our Active KubeCluster Alert Rule.

Now we will get a notification when a Colleague is Upgrading our KubeCluster in the Future πŸ˜‰

KubeCluster is now running the latest available version of Kubernetes.

Kubernetes Cluster nodes are Healthy and running version 1.11.2

Here you see in the Kubernetes Dashboard the Node version of Kubernetes.

For Developers and DevOps it’s Great to work with Microsoft Visual Studio Code and the Azure Kubernetes Services (AKS) to work in a CI/CD Pipeline, to create continuous business applications in the Cloud.

Here is my Azure KubeCluster running in Visual Studio Code πŸ™‚

And at last, most important thing is that my Application is running on my Azure Kubernetes Cluster for the Business My Test Site.

Hope this blogpost is useful for you and your business to manage your AKS Cluster in the Microsoft Cloud.

More information About Azure Kubernetes Service (AKS) :

Β Upgrade an Azure Kubernetes Service (AKS) cluster via Azure CLI

Azure Kubernetes Service (AKS) Docs

Monitor Azure Kubernetes Service (AKS) container health (preview)

Microsoft Azure Kubernetes Services website Start Free here

Follow Containers in the Cloud Community Group on LinkedIn


Leave a comment

#Azure Cloud Shell editor with Visual Studio Code inside (Project Monaco) #VSC #IaC

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. But now with Project Monaco my favorite tool Visual Studio Code is integrated in Microsoft Azure Cloud Shell πŸ™‚ Awesome for Infrastructure as Code (IaC) like I did with TerraformΒ 

Just type Code . in Azure Cloud Shell

Command Palette VSC in Azure Cloud Shell

Just Cool in https://shell.azure.com

More information about Microsoft Azure Cloud Shell :

Azure Cloud Shell Overview docs

Here you find more information about the Monaco Editor

Your Microsoft-managed admin machine in Azure, for Azure


Leave a comment

Create #Azure Kubernetes Cluster and Manage in Visual Studio Code #VSC #Kubernetes #Cloud


In this Step-by-Step Guide we will Create a Microsoft Azure Kubernetes Cluster (AKS) and add it to Microsoft Visual Studio Code to manage and use it.

This time I have created the Kubernetes Cluster via the Azure Portal, when you don’t have an Azure Subscription you can start hereΒ 

Azure Kubernetes Service (AKS) makes it simple to deploy a managed Kubernetes cluster in Azure. AKS reduces the complexity and operational overhead of managing Kubernetes by offloading much of that responsibility to Azure. As a hosted Kubernetes service, Azure handles critical tasks like health monitoring and maintenance for you. In addition, the service is free, you only pay for the agent nodes within your clusters, not for the masters.

You can of course also Create your Azure Kubernetes Cluster via Azure CLI in Cloudshell.

Here you see the steps from the Azure Portal to Create your Azure Kubernetes Cluster :

Fill in the Basics and Click on Authentication tab

Here you have your SPN and you can manage RBAC.
go to Networking TAB.

Network Settings, keep http application routing on yes.

Click on Monitoring TAB.

Azure Monitoring settings.

Review + Create will Validate your Configuration.

Click on Create.

It’s Deploying the Azure Kubernetes Cluster.

Here you find the Overview of your AKS Cluster in the Azure Portal.

Your Microsoft Azure Kubernetes Cluster is now running by Default with Azure monitoring enabled, and I like to have it in Microsoft Visual Studio Code.

Install the latest Azure CLI 2.0 version
(You need version 2.0.27 or higher)

my version of Azure CLI is 2.0.41

In the Next Visual Studio Code steps I’m already logged-in my Azure Subscription.

When you have Microsoft Visual Studio Code installed with the Kubernetes Extension you can Create or add Existing Cluster to VSC.

Choose Cluster type Azure Kubernetes Service

Choose the right Azure Subscription.

Here you will see your Azure Kubernetes Cluster
KubeCluster in my Azure Subscription

Now you Azure Kubernetes Cluster (AKS) is added to VSC πŸ˜‰

When you right click on your Kubernetes Cluster you can open Dashboard.

Here you see my two-nodes in Kubernetes Dashboard.

Status of one Kubernetes node.

Here you see the pods (Containers) and also the Azure Monitoring Agent.

Now you can install or Build your solution on your Azure Kubernetes Cluster (AKS).

Monitoring and managing your AKS solution is important to see what is going on. That’s why the Azure Monitoring Agent is on by Default.

Here you see my Container Monitoring Solution for all my Containers.
( Azure AKS and Docker containers on-premises )

What is NEW and AWESOME is Azure Monitoring – Container Health Services.

Health Overview of your AKS Cluster

Health overview of your AKS Nodes

Health Overview of your AKS Controllers

For Troubleshooting you can use the Azure logs of your solution and query what is wrong.

And Scaling your AKS Cluster is Never been Easier then this πŸ™‚

Hope this Step-by-Step Guide is useful for you and your Business to start with Containerize your Apps in the Cloud

JOIN Containers in the Cloud Community Group

 


Leave a comment

Creating VM Cluster on Azure #Cloud with Terraform #IaC #Azure #Terraform #Linux #Winserv

Type az and you should see this Azure CLI

Type Terraform and you should see the terraform commands

 

Install and configure Terraform to provision VMs and other infrastructure into Azure

Before you begin with Terraform and deploying your solution to Microsoft Azure you have to install Azure CLI and Terraform for your OS.

In the following step-by-step guide we will deploy a VM Cluster with Terraform into Microsoft Azure Cloud Services.

First we open Powershell in Administrator mode :

You should have your Terraform script ready.

It’s great to edit your Terraform script in Visual Studio Code

Create a Terraform configuration file
In this section, you create a file that contains resource definitions for your infrastructure.
Create a new file named main.tf.
Copy following sample resource definitions into the newly created main.tf file:


resource “azurerm_resource_group” “test” {
name = “acctestrg”
location = “West US 2”
}

resource “azurerm_virtual_network” “test” {
name = “acctvn”
address_space = [“10.0.0.0/16”]
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”
}

resource “azurerm_subnet” “test” {
name = “acctsub”
resource_group_name = “${azurerm_resource_group.test.name}”
virtual_network_name = “${azurerm_virtual_network.test.name}”
address_prefix = “10.0.2.0/24”
}

resource “azurerm_public_ip” “test” {
name = “publicIPForLB”
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”
public_ip_address_allocation = “static”
}

resource “azurerm_lb” “test” {
name = “loadBalancer”
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”

frontend_ip_configuration {
name = “publicIPAddress”
public_ip_address_id = “${azurerm_public_ip.test.id}”
}
}

resource “azurerm_lb_backend_address_pool” “test” {
resource_group_name = “${azurerm_resource_group.test.name}”
loadbalancer_id = “${azurerm_lb.test.id}”
name = “BackEndAddressPool”
}

resource “azurerm_network_interface” “test” {
count = 2
name = “acctni${count.index}”
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”

ip_configuration {
name = “testConfiguration”
subnet_id = “${azurerm_subnet.test.id}”
private_ip_address_allocation = “dynamic”
load_balancer_backend_address_pools_ids = [“${azurerm_lb_backend_address_pool.test.id}”]
}
}

resource “azurerm_managed_disk” “test” {
count = 2
name = “datadisk_existing_${count.index}”
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”
storage_account_type = “Standard_LRS”
create_option = “Empty”
disk_size_gb = “1023”
}

resource “azurerm_availability_set” “avset” {
name = “avset”
location = “${azurerm_resource_group.test.location}”
resource_group_name = “${azurerm_resource_group.test.name}”
platform_fault_domain_count = 2
platform_update_domain_count = 2
managed = true
}

resource “azurerm_virtual_machine” “test” {
count = 2
name = “acctvm${count.index}”
location = “${azurerm_resource_group.test.location}”
availability_set_id = “${azurerm_availability_set.avset.id}”
resource_group_name = “${azurerm_resource_group.test.name}”
network_interface_ids = [“${element(azurerm_network_interface.test.*.id, count.index)}”]
vm_size = “Standard_DS1_v2”

# Uncomment this line to delete the OS disk automatically when deleting the VM
# delete_os_disk_on_termination = true

# Uncomment this line to delete the data disks automatically when deleting the VM
# delete_data_disks_on_termination = true

storage_image_reference {
publisher = “Canonical”
offer = “UbuntuServer”
sku = “16.04-LTS”
version = “latest”
}

storage_os_disk {
name = “myosdisk${count.index}”
caching = “ReadWrite”
create_option = “FromImage”
managed_disk_type = “Standard_LRS”
}

# Optional data disks
storage_data_disk {
name = “datadisk_new_${count.index}”
managed_disk_type = “Standard_LRS”
create_option = “Empty”
lun = 0
disk_size_gb = “1023”
}

storage_data_disk {
name = “${element(azurerm_managed_disk.test.*.name, count.index)}”
managed_disk_id = “${element(azurerm_managed_disk.test.*.id, count.index)}”
create_option = “Attach”
lun = 1
disk_size_gb = “${element(azurerm_managed_disk.test.*.disk_size_gb, count.index)}”
}

os_profile {
computer_name = “hostname”
admin_username = “testadmin”
admin_password = “Password1234!”
}

os_profile_linux_config {
disable_password_authentication = false
}

tags {
environment = “staging”
}
}


Type : terraform init

You should see this screen.

Type : az login

We now logging into Microsoft Azure subscription.

https://microsoft.com/devicelogin

Insert the code from your Powershell screen.

Now we have the Terraform INIT running and we are connected to our Azure Subscription πŸ˜‰

Type : terraform plan

It will refreshing the state and getting ready for deployment.

Type : terraform apply

and then type :Β yes <enter>

Terraform is now creating the azure resources

Azure resource group acctestrg is made

Terraform deployment VM Cluster on Azure is Ready πŸ˜‰

Azure VM Cluster is running.

When you want to remove the complete Azure VM Cluster with terraform, it’s really easy :

Type : terraform destroy

and then type : yes <enter>

Azure resources are being deleted via terraform script

Terraform destroyed the Azure VM Cluster


All Azure Resources of the VM Cluster are removed.

Hope this step-by-step guide deploying infrastructure as Code with terraform will help you with your own Cloud solutions in Microsoft azure.

Ps. don’t forget to install Visual Studio Code Azure Terraform extension and play !

#MVPbuzz



Leave a comment

I Love #Microsoft Azure CloudShell in Visual Studio Code #VSC #Azure #Cloud

Azure Cloud Shell in VSC

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

Here you find the Installation of Azure Cloud Shell in Visual Studio Code

As Easy as this πŸ˜‰

More Technical information about Azure Cloud Shell on Microsoft Docs


Leave a comment

#Microsoft Build 2018 Sessions and Content Overview #Azure #AzureStack #MSBuild2018

Microsoft Build 2018 – Technology Keynote: Microsoft Azure

With Scott Guthrie @scottgu


Inside Azure Datacenter Architecture

with Mark Russinovich @markrussinovich


Architecting and Building Hybrid Cloud Apps for Azure and Azure Stack.
With Filippo Seracini @pipposera and Ricardo Mendes @rifmendes from the AzureStack Team

Container DevOps in Azure
With Jessica Deen @jldeen and Steven Murawski @stevenmurawski


Best Practices with Azure & Kubernetes

FollowΒ @rimmanehme

Microsoft Azure CosmosDB @ Build 2018 The Catalyst for next Generation Apps


From Zero to Azure with Python & VSC


Secure the intelligent edge with Azure Sphere


Satya Nadella – Vision Keynote

Here you can find all the Microsoft Build 2018 Sessions and content.


Leave a comment

Deploy #Azure WebApp with Visual Studio Code and Play with #Kudu and App Service Editor and #VSC

When you have installed Microsoft Visual Studio Code which is Free and Open Source with Git integration, Debugging and lot of Extensions available,
You activate the Microsoft Azure App Service extension in VSC.

Azure App Service Extension

You can install really easy more Azure Extensions here.

On the Left you will see your Azure Subscription and by pushing the + you will create a new Azure WebApp.

Enter the name of the Resource Group

Select your OS Windows or Linux

Add the Name of the New App Service Plan

Choose a App Service plan See more information here

Select Azure Region

After this it will install your Microsoft Azure Web App in the Cloud in a couple of seconds πŸ™‚

 

When you open the Azure Portal you will see your App Service plan running.

From here you can configure your Azure Web App for Continues Delivery, and use different tools like VSC, Kudu or Azure App Service Editor.

Azure Web Apps enables you to build and host web applications in the programming language of your choice without managing infrastructure. It offers auto-scaling and high availability, supports both Windows and Linux, and enables automated deployments from GitHub, Visual Studio Team Services, or any Git repo.

Learn how to use Azure Web Apps with Microsoft quickstarts, tutorials, and samples.

Configure Continues Deployment from the Azure Portal.

Or
Continuous Deployment to Azure App Service

Developer tools from the Azure Portal with App Service Editor.

 

Azure App Services Editor

From here you can open Kudu to manage your Azure Web App and Debug via Console :

Kudu Debug console in CMD

Or Kudu Debug Console in Powershell πŸ˜‰

Kudu Process Explorer

Here you find more information about Kudu for your Azure Web App on GitHub

And to come back at Microsoft Visual Studio Code, you can manage and Build your Azure Web App from here too :

Azure Web App Services in VSC

Hope this first step by step Guide is useful for you to start with Microsoft Azure Web App and Visual Studio Code to make your Pipeline.
More Information at Visual Studio Code

Azure Web Apps Overview


Leave a comment

Use the Azure Cosmos DB Emulator for local development and testing #Azure #CosmosDB #DevOps #Docker

The Azure Cosmos DB Emulator provides a local environment that emulates the Azure Cosmos DB service for development purposes. Using the Azure Cosmos DB Emulator, you can develop and test your application locally, without creating an Azure subscription or incurring any costs. When you’re satisfied with how your application is working in the Azure Cosmos DB Emulator, you can switch to using an Azure Cosmos DB account in the cloud.

The Azure Cosmos DB Emulator for DevOps is easy to install :

Download de MSI

Docker Hub

GitHub

 

You can Attach Azure CosmosDB Emulator in Visual Studio Code πŸ˜‰

When your development and testing in Azure CosmosDB Emulator is Done and Ready
for the Cloud, you can Move it to CosmosDB in Azure.

More information on Microsoft Azure CosmosDB Emulator on Docs.

Here you see What’s New in Azure Cosmos DB Video :

Lot of Success with Azure CosmosDB !


Leave a comment

#Microsoft Azure CloudShell Bash in Visual Studio Code #Azure #VSC #DevOps

 

When you don’t have Microsoft Visual Studio Code, It’s a Awesome Open Source Free tool for DevOps and ITPro.

https://code.visualstudio.com/download

When you installed VSC you can add Extensions to your Visual Studio Code and one of them is Called Azure Account.
When you Add this extension you can connect to Microsoft Azure Cloud Shell in Visual Studio Code.
But before we can use this Extension to connect to Azure CloudShell we need NodeJS version 6 or higher installed on your OS.

Go to NodeJS and Download

Click Next.

Accept the Terms and click Next.

Click Next

Click Next

It will also install a Shortcut for the online documentation of this version of NodeJS v9.6.1

Click on Install

Click Finish

With Ctrl+Shift+PΒ you will see all the Commands. (1)
Choose for Azure: Open Bash in CloudShell (2)

When you do this it will make a Microsoft Azure Device Login first to Connect to your Azure Subscription like this :

Type the code which is in VSC here

Azure will see that you connect with Visual Studio Code.
Click on Continue.

Login with your Azure Account of your Subscription.

The Connection with VSC and Azure is made.

Now when you choose Azure: Bash in CloudShell again it will show the Azure Cloud Shell in your VSC.

Your are Online with Azure Cloud Shell.

Just Awesome πŸ˜‰
Cheers James


Leave a comment

JOIN #Microsoft Ignite 2017 Event and Download the Mobile App #Ignite #Ignite2017 @MS_Ignite

The Microsoft Ignite 2017 App s available

You can download the Microsoft Ignite 2017 App for your Mobile here

Don’t miss this Great Microsoft Ignite 2017 Event in Orlando Florida September 25-29, 2017 and Register for the last passes here

Have a look at the session Catalog and Choose your favorite topics at Microsoft Ignite 2017 here

Have lot’s of Fun and Great sessions to LEARN from with Awesome new Microsoft Technology !
#MVPbuzz

Follow Microsoft Ignite on Twitter => @MS_Ignite