Skip to main content

azure

At last: Network Policies in AKS with kube-router
·433 words·3 mins
kubernetes azure network policies
For ages I’ve been waiting for a way to enforce netwok policies on AKS, so last weekend while I was googling around, I found this hidden gem posted by Marcus Robinson: Enforcing Network Policies using kube-router on AKS and had to test the proposed solution. Prerequisites: Azure Kubernetes Service (AKS) deployed with HTTP application routing enabled. kubectl installed Create a service exposed throuh your AKS DNS Zone # Let’s start by deploying the following service to your Kubernetes cluster, by saving the following content to a file named dni-function.yaml and replacing [YOUR_DNS__ZONE_NAME] with the corresponding value of your service:
Accepting Azure Marketplace Terms with Azure CLI
·136 words·1 min
azure devops azure cli
When you try to deploy a VM from the Marketplace using an ARM (json) template you’ll get an error like the one below in the case when you’ve not previously accepted the Legal terms for the image: [{"Legal terms have not been accepted for this item on this subscription. To accept terms using Powershell..."}] Accepting the Legal terms is something you have to do once per subscription for each provider offer you want to use. So how can you accept the terms using the Azure CLI (version 2.0.26 or higher)?
Running Ansible Azure playbook in Azure Cloud Shell
·150 words·1 min
azure devops ansible cloud shell
NOTE: The issue described in this post was fixed!!! (ansible 2.5.2 and Azure CLI 2.0.34) # Last week I tried to run this simple Ansible playbook in Azure Cloud Shell: # resource_group.yml # Create test resource group in west europe - name: Create a Resource Group hosts: localhost connection: local gather_facts: no tasks: - name: Create Resource Group azure_rm_resourcegroup: location: westeurope name: test state: present The first attempt to run the playbook with:
Secure your Kubernetes services with NGINX ingress controller, tls and more.
·994 words·5 mins
kubernetes azure nginx ingress conroller
Disclaimer: samples provided in this post were tested both in Azure Container Services (AKS) and Kubernetes provided by Docker for Windows. In previous posts I showed you how to Run a Precompiled .NET Core Azure Function in a Container and how to Deploy your first Service to Azure Container Services (AKS). By now you should be able to run your own services in Kubernetes and starting to wonder about how can you give answers to questions such as:
Microsoft MVP Global Summit 2018 Experience
·375 words·2 mins
azure dotnet mvp
Disclaimer: For those of you who are expecting to learn or read about new technical information and cool new product features or roadmaps I have bad news: almost everything that Microsoft shares with MVPs during the Summit is under an NDA (Non-Disclosure Agreement) which means that what I’ve learned in Redmond stays with me, inside my head.
Consuming Azure Event Hubs Events With Kafka Connect
·315 words·2 mins
azure kafka kafka connect eventhubs
So last week I was in a rush to find a fast and easy way to consume events from Azure Event Hubs and send them to a Kafka topic. After googling a bit I found this project: Kafka Connect Azure IoT Hub. Yes the name of the project can be misleading, but since IoT Hub is a service which relies on Event Hubs and also taking a close look to the code showed that it uses the Event Hubs client for java, I decided to give it a try.
Run a Durable Azure Function in a Container
·830 words·4 mins
azure dotnet docker azure functions serverless
Greetings readers! Hope you all a Happy New Year! Last post I was about running a Precompiled .NET Core Azure Function in a Container. This time let’s go one step further and Run a Durable Azure Function in a Container Prerequisites: Docker installed and basic knowledge. .NET Core Azure Storage Account Azure Durable Functions Knowledge Create a .NET Core lib project # Create a .NET Core lib project.
Run a Precompiled .NET Core Azure Function in a Container
·651 words·4 mins
azure dotnet docker azure functions serverless
So this morning I found my self browsing through the images Microsoft has published in the Docker Hub and then I saw this one: microsoft/azure-functions-runtime and decided to Run a Precompiled .NET Core Azure Function in a Container. Prerequisites: Docker installed and basic knowledge. .NET Core Create a .NET Core lib project # Create a .NET Core lib project.
Deploy your first Service to Azure Container Services (AKS)
·550 words·3 mins
azure kubernetes docker aks
In this post I’ll show you how to Deploy your first Service to Azure Container Services (AKS). Prerequisites: Azure CLI installed and basic knowledge experience. Docker installed and basic knowledge. Azure Subscription Kubernetes experience. Create a resource group: # Firt create a Resource Group. Be aware that at the time of writing AKS is not available in all Azure regions.
Use PowerShell to enable Azure Storage Account Firewall Rules
·157 words·1 min
azure devops storage account powershell
In this post I’ll show you how to Use PowerShell to enable Azure Storage Account Firewall Rules. Be sure to be have AzureRM PowerShell 4.4.1 module installed. Login to your Azure Account # Launch Powershell and start by Login to your Azure Account.
Use PowerShell to Enable and Automate Azure Analysis Services Backup
·605 words·3 mins
azure devops analysis services backup powershell
In this post I’ll show you how to Use PowerShell to Enable and Automate Azure Analysis Backup. Enable Azure Analysis Service Backup # Enable-AzureRmAnalysisServicesBackup is a small powershell script that uses the the Set-AzureRmResource cmdlet to enable backup location to an Azure Analysis Service instance.
Use PowerShell to Enable Azure Analysis Services Firewall
·315 words·2 mins
azure analysis services powershell
Last week, firewall support was added to Azure Analysis Service (https://azure.microsoft.com/en-us/blog/azure-analysis-services-adds-firewall-support/). The thing is that, at the time of writing, there is no AzureRM cmdlet available to Use PowerShell to Enable Azure Analysis Services Firewall So, with the help of Resource Explorer I found which properties must be added to the service (resource) in order to enable the firewall:
Step by step: .Net Core and Azure Search
·813 words·4 mins
azure dotnet azure search
Step by step: .Net Core and Azure Search is small introduction on how to connect to Azure Search, create and delete indexes, models, add documents and perform basic queries. Let’s go for it: Create an Azure Search service # Create an Azure Search service in your Azure subscription, and get the Azure Search name and primary Read-Write key.
Read Azure Service Health Activity Logs with .NET Core
·520 words·3 mins
azure dotnet azure monitor log analytics
This week there was a small outage within the Azure Data Lake Store service and as consequence I wondered how could I Read Azure Service Health Activity Logs with .NET Core. Let’s go for it: Create a folder for your new project # Open a command promt an run:
Create a Service Principal and write required parameters to a .azureauth file
·513 words·3 mins
azure devops azure active directory powershell
This week I had to repeat the process of creating a Service Principal in order to use the Microsoft.Azure.Management.Fluent lib with .NET Core so I decided it was time to script the process. With the following script you can Create a Service Principal and write required parameters to a .azureauth file.
HDInsight: Scale Horizontally
·300 words·2 mins
azure devops hdinsight powershell
HDInsight: Scale Horizontally with Scale-HDInsightClusterNodes.ps1 a PowerShell workflow that will help you automate the process of scaling your cluster. The script receives 4 parameters: ResourceGroupName: The name of the resource group where the cluster resides ClusterName: The name of your HDInsight cluster Nodes: The number of nodes you want for the cluster ConnectionName: The name of your automation connection account and requires the following PowerShell modules: AzureRM.Profile, AzureRM.HDInsight
Step by step: .NET Core and Azure Cosmos DB
·444 words·3 mins
azure dotnet cosmos db
Step by step: .NET Core and Azure Cosmos DB is a short post on how to connect to Cosmos DB, save a document and then query to find it. Let’s start: Create a Cosmos DB account # Create a Cosmos DB account in your Azure subscription. Once created get the URI and the primary Read-write key from the Keys section.
Use PowerShell to Enable Logging for Azure RM Web Apps
·671 words·4 mins
azure devops powershell
Recently I client ask me to enable application and http logging for more than 20 AzureRM Web Apps. Furthermore the client wanted the logs to be stored in a Storage Account. Issues started when I decided to Use PowerShell to Enable Logging for Azure RM Web Apps, because there is no equivalent to the ASM Enable-AzureWebsiteApplicationDiagnostic cmdlet for ARM resources.
Use Azure Media Services to Find Filler Words
·177 words·1 min
azure azure media services
On April 22 I had the great opportunity to give a talk on Azure Functions in the Global Azure Bootcamp hosted in Madrid. I had a great time, but weeks later when the video was published I realised that I was using a filler word way to much through my presentation.
Docker Machine with an existing Azure VNET
·106 words·1 min
azure docker
Last week I had to provision a Docker host and I tried out the docker-machine command. The resulting host would have to use an existing Azure subnet from another resource group and I also needed to be able to reach the machine using it’s private IP. After reading the docs and playing for some minutes I came up with the correct command to use Docker Machine with an existing Azure VNET: