While working on a side project, someone asked me how to scan for viruses in a cloud native and serverless landscape. That made me think about a project I did a couple of years back. During that project we used ClamAV that was installed on a VM. We scanned files that end-users uploaded within an ASP.NET application, and everything was hosted on datacenter VMs somewhere in the Netherlands.
ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.
In this blogpost I will show a proof of concept using a Docker image and Azure Functions to create a simple automated virusscanner for Azure Blob storage.
Continue reading “Scanning Blob storage for viruses with Azure Functions and Docker”
Azure LogicApps are incredibly powerful and I believe it should be in every developers toolbox. Enterprise integrations, ready-to-use connectors and all of this with almost no code and serverless!
Alas monitoring and debugging are more complex. In this blog I will explain how to add LogicApps to Log Analytics, and even track custom properties for filtering and alerting. Keep on reading for the exciting stuff!
Continue reading “LogicApps monitoring with Log Analytics”
In my previous post I showed how easy it is to start or deallocate machines using C# and Azure Functions.
Azure VirtualMachines can be handy but very costly if you forget to turn them off∗ and leaving them running for 24/7.
But, what if you have dozens of existing VMs and are looking for a quick way to schedule the on/off times for those machines to save money?
In this post I will show a very simple script to use with Azure Automation that enables you to get this up and running, literally within the hour.
Note: I would advise to use Azure DevTest labs if you have development virtual machines. That will give you the opportunity to reuse, claim or share VMs within a group of users.
* In this blogpost I will use the word Stop in code and comments, but in fact that will Deallocate the machines, and will stop incurring costs.
Continue reading “Cost optimization in Azure”
Managing VirtualMachines is often done using Azure Automation or PowerShell. But what if you want to do this using C#, in an Azure Function? This post shows a very simple example on how to implement this in a .Net Core 2 Azure Function.
This post contains my slides of my talk ‘ARM and Cloud Infra – The Secret Life of a Developer in a Infra World’ at devNetNoord.
Click here to download
In my current project I’ve stumbled upon a problem. We have many ARM templates and need to add tags to all resources. Doing this within templates can be cumbersome, so I’ve created a small VSTS extension that adds tags to all resources within a specific resource group.
The extension can be installed from https://marketplace.visualstudio.com/items?itemName=PeterRombouts.autotagging-extension
The working is pretty simple; enter the values for your subscription, and resourcegroup, and then add the tags.
The tag pairs should be entered, one pair per line, comma separated. The extension will add these tags to all resources in the given resource group, and will not do anything to the existing tags.
Remarks? Please do give feedback! The project is available on Github if you want to contribute!
In my work as Cloud Solution Architect I often find teams struggling with the exact same problem. In this blogpost I will highlight one of those problems; passing on ARM output variables within a VSTS pipeline.
Many developers have Powershell or other scripts in place, that fix this problem, but I want to highlight an extension, which is freely available and does this for you, for free!
This extension enables you to use the ARM Deployment outputs in your VSTS environment.
This step will use the last successful deployment within the selected resource group. If this deployment has outputs, all of them are copied to VSTS variables by the ARM Output key.
These outputs can then be used by default VSTS ways:
Usually this task is ran directly after the ‘Azure Resource Group Deployment’ task.
So my pro-tip; Stop using your own scripts and implement this handy extension!
PS: On a sidenote, Kees is also a great guy, give him a tweet after you install this in your project 😉
Link to Marketplace: https://marketplace.visualstudio.com/items?itemName=keesschollaart.arm-outputs
Kees on Twitter: https://twitter.com/keesschollaart
Azure Cosmos DB is a globally distributed, multimodel database service designed to help you achieve fast, predictable performance. It scales seamlessly along with your application as it grows.
This blog explains exactly how it works and what to do in some scenarios. But in my work as Cloud Architect I sometimes need to dig deeper and figure out if my solution scales for a particular case.
For example, a ‘partition’ has a maximum size of 10GB, so it is really, really important to understand how this works, and how you can figure out your partition size over the time.
This blog will explain, using a recent real-world scenario, how you can determine your partition key and scaling.
Please note that your scenario can differ hugely, but there are some takeways in this blog that could help you when designing your solution.
When trying to put your LogicApp code in a CICD pipeline, it is always problematic getting your code into a proper template.
Obviously switching to ‘LogicApp Code View’ is an option, but there is a better solution to this problem.
LogicAppTemplate is a PowerShell commandlet that makes is very easy to get the content (even automatically) of the app and save it to disk.
The usage is very simple, open up a PowerShell window and execute the next command:
Check out this gist
Big thanks to Jeff Hollan who authored this!
Recently my team and I were building and debugging LogicApps. At one point we seemed to have disappearing code within our code of these apps.
Obviously something is wrong when we were editing these apps.
Please note that we’ve got many LogicApps with custom code and mappings that we code using the code view, because not all properties can be set using the designer.
The problem arises when you are in ‘Logic App Code View’, and switch to ‘Logic App Designer’.
When switching back, the following popup arises:
In this case, we did not change anything, just switched to designer and back.
But, this is actually what triggers this problem.
Thanks to ‘Versions’ you can quickly see and use WinMerge (or any other tool) to compare the files:
In this sample, the ‘queueType’ magically disappeared, but in other cases other mappings of JSON object were deleted.
Always check, when the designer asks you to ‘Save changes’, if you actually made any changes.
I hope this helps someone out, it gave me and my team a real headache finding this out.