It's Monday, time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
Every Monday, I share my "reading notes". Those are the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting.
It's a mix of the actuality and what I consumed. Enjoy!
Cloud
ASP.NET Core Apps Observability (Francisco) - A great post that shares, and explains how to implement logs, traces, and metrics in modern application.
Durable Functions Upgrade Strategies (Mark Heath) - A real gold mine of information about best practices when migrating. Of course great when migrating durable functions, but also true for any services.
Starting a profitable business in six weeks with Courtland Allen (Software Engineering Unlocked) - A really interesting discussion about success in tech. All the work that it required, but also the timing, and the people you keep around you in the journey.
#361: The Generosity of Scars with Scott Mann (The EntreLeadership Podcast) - First when I eared the guess was a military I thought it will be full of war references... But no! This episode is all about human. Our self, are we feel alone and strangely the fact that we are not. Great episode and I really liked Scott Mann verbs.
How to Start and Grow A Podcast That Gets Listeners - Twitch Advice (Stream Coach: Twitch Stream Tips) - I like how Ashley treats her topics. She does it in a different way. In my journey to learn about how to provide great streaming content, this episode was a nice complement.
I really enjoyed this book. This book gave me vocabulary. It was putting words on ideas, explaining clearly some feelings that I wasn't able to express. Like when you know something is good or bad, but that you can explain why. It's less impressive than Start with Why, but definitely, something to read.
It's time for you to install Windows Terminal (Scott Hanselman) - Definitely an incredible tool this Windows Terminal. Try it you will see. And the thing I like is it never stops to amaze me with new features.
Reading RSS Feeds With .NET Core (Nong Vang) - I don't know why I always thought it was complicated to parse an RSS feed. A very nice quick tutorial.
VS Code Integration with GitHub and Azure (Robert Green, Aaron Powell) - A fantastic 10 minutes video that shows the most frequent scenarios of developers using GitHub and how easy it is with VSCode.
Ghost Contact Form with Azure Functions (Tom Faltesek) - Being myself a user of both Ghost and Azure function I'm very excited about this new series of posts.
Building offline Blazor application (Gunnar Peipman) - A very interesting post about an experience done with Blazor. It's usually during those that I learn the most.
Introducing the Cake.Discord Addin (Gary Ewan Park) - A few weeks ago I used cake to deploy in Azure and I was very impressed by cake. Its great to see this project continues to evolve and get new addin is very cool.
Marking up the Web with ASP.NET Core and Markdown (Rick Strahl) - So many great ideas and cool projects in this article. If you use Markdown it's a must. If you are not using markdown, hmmm... what?!
Fast Focus (Damon Zahariades) - Great short book. Not like the other of his kind, this book goes right to the point and offers actionable item. It's very practical and accessible to everyone. At the end of the book, you know what to do to get started and improve your focus.
Introducing Azure Functions 2.0 (Eduardo Laureano) - Wow, the Azure Functions has evolved so much since the beginning. It's time to upgrade our old functions.
Microsoft Ignite Aftermath ( Chris Pietschmann, Dan Patrick) - If you are like me and need to catch up on what append to Ignite, this post is a really good place to start as it contains a list of all the links we need.
Power BI and Sudoku – Yes Please (Mike Carlo) - Awesome! I really like when people think outside of the box. This post gives you link to the game and to a more detailed post.
Azure functions are great. I used to do a lot of "csx" version (C# scripted version) but more recently I switched to the compile version, and I definitely loved it! However, I was looking for a way to keep my deployment short and sweet, because sometimes I don't have time to setup a "big" CI/CD or simply because sometimes I'm not the one doing the deployment... In those cases, I need a simple script that will deploy everything! In this post, I will share with you how you can deploy everything with one easy script.
The Context
In this demo, I will deploy a simple C# (full .Net framework) Azure functions. I will create the Azure Function App and storage using an Azure Resource Manager (ARM template) and deploy with a method named Zip push or ZipDeploy. All the code, script, a template is available on my Github.
The Azure Functions Code
The Azure Function doesn't have to be special, and it can be any language supported by Azure Functions. Simply to show you everything, here the code of my function.
namespace AzFunctionZipDeploy
{
public static class Function1
{
[FunctionName("GetTopRunner")]
public static async Task Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log)
{
log.Info("C# HTTP trigger function processed a request.");
string top = req.GetQueryNameValuePairs()
.FirstOrDefault(q => string.Compare(q.Key, "top", true) == 0)
.Value;
if (top == null)
{
dynamic data = await req.Content.ReadAsAsync< object>();
top = data?.top;
}
return top == null
? req.CreateResponse(HttpStatusCode.BadRequest, "Please pass a number to get your top x runner on the query string or in the request body")
: req.CreateResponse(HttpStatusCode.OK, new { message = $"Hello, here is your Top {top} runners", runners = A.ListOf(int.Parse(top)) });
}
}
class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
}
}
It's a really simple function that will return a list of Person generated on the fly. The list will contain as many person as the number passed in parameter. I'm using the very useful GenFu library, from my buddies: ASP.NET Monsters.
The only thing we need to do is to create our compress file (Zip or Rar) that contains everything our project required.
In this case, it's the project file (AzFunction-ZipDeploy.csproj), the function's code (Function1.cs) the host (host.json) and local settings of our function (local.settings.json).
The ARM template
For this demo, we need one Azure Function App. I will use a template that is part of the Azure Quickstart Templates. A quick look to the azuredeploy.parameters.json file and we see that the only parameter we really need to set is the name of our application.
To be able to ZipDeploy, we need to add one Application Setting to let the Kudu interface we need its help to compile our code. To do that let's open the azuredeploy.json and go to the appSettings section. We need to add a new variable named: SCM_DO_BUILD_DURING_DEPLOYMENT and set it to true. After adding the setting it should look like this (see the last one... that's our new one):
Now that all the pieces are ready it's time to put it together one script. In fact, only the two last commands are required; everything else is just stuff to make it easier to re-use it. Check out my previous post 5 Simple Steps to Get a Clean ARM Template, to learn more about the best practices related to ARM template. So let's see that script, it's pretty simple.
# script to Create an Azure Gramophone-PoC Solution
resourceGroupName=$1
resourceGroupLocation=$2
templateFilePath="./arm/azuredeploy.json"
parameterFilePath="./arm/azuredeploy.parameters.json"
dateToken=`date '+%Y%m%d%H%M'`
deploymentName="FrankDemo"$dateToken
# az login
# You can select a specific subscription if you do not want to use the default
# az account set -s SUBSCRIPTION_ID
if !( $(az group exists -g $resourceGroupName) ) then
echo "---> Creating the Resourcegroup: " $resourceGroupName
az group create -g $resourceGroupName -l $resourceGroupLocation
else
echo "---> Resourcegroup:" $resourceGroupName "already exists."
fi
az group deployment create --name $deploymentName --resource-group $resourceGroupName --template-file $templateFilePath --parameters $parameterFilePath --verbose
echo "---> Deploying Function Code"
az functionapp deployment source config-zip -g $resourceGroupName -n zipdeploydemo --src "./zip/AzFunction-ZipDeploy.zip"
echo "---> done <--- code="">--->
The only "new" thing is the last command functionapp deployment source config-zip. That where we specify to the Azure Function App to look to --src to get our source. Because I'm running it locally, the path is pointing to a local folder. However, you could execute this command also in the CloudShell, and that would become a URI... to an Azure Blob Storage by example.
Deploy and Test
If you didn't notice yet, I did my script in bash and Azure CLI. That because I want my script to be compatible with all platforms. Of course, you could have done it in PowerShell or anything else that would call the REST API.
To deploy, just execute the script passing the ResourceGroup name, and its location.
./Deploy-AZ-Gramophone.sh cloud5mins eastus
To get to Function URL, go to the Azure portal (portal.azure.com) and click on the Function App that we just deploy. Click on the function GetTopRunner in this case, and click on the </> Getfunction URL button.
Use that URL in postman and pass another parameter top to see we the deployment ws successful.
In Video Please
If you prefer, I also have a video version of this post.
New Updates for Azure Development in Visual Studio (Visual Studio Team) - Great update to the tooling that makes our life easier... Or at least that reduce (a lot) the pain when starting and deploying a project.
Styling Social Media Icon Lists in CSS (Mark Heath) - Yeah right, we can read CSS and probably hack some stuff... But it's excellent to learn how to do simple things the good way. And this post shows exactly that.
Power BI Desktop January Feature Summary (Amanda Cofsky) - It looks like some team did not take a lot of time-off during the Holidays... So many great new functionalities; it's a fantastic way to start the year.
Take a Break with Azure Functions (Justin Clareburt (MSFT)) (Justin Clareburt) - I know the Holidays are passed, but it's always time to learn Azure Function. Do yourself a favor the next rainy or super cold weekend... Follow this "program".
What part of your job can you automate? (Kevin Bah) - With time, all developers accumulate "tools" and these days with all those scripts and API capabilities... It's not a question of how can we do something, but more: where to do it...
How to handle BLANK in DAX measures (Marco Russo) - This great post will helps us to think about if blanks could by part of our data and how to manage them.
Is jQuery still relevant? (Remy Sharp) - I've really appreciated this post that brings numbers to sustain his answer.
Azure Application Architecture Guide (Mike Wasson) - A free book (pdf only) with all the best of the AzureCAT team? You really don't want to miss that opportunity.
Understanding Azure Event Grid ( Jason Roberts) - Nice little post that introduces event grid, differentiate it from the service bus, and quickly go over the pricing.
Azure SQL Databases Disaster Recovery 101 (Xiaochen Wu) - One of the best posts a read on the topic. I'm not sure if I can sale the alien part to a client, but other than that very clear. lol
7 Hidden Gems in Visual Studio 2017 (Visual Studio Team) - This post shares not the usual tips. Seriously, how many you already knew before reading the article?
Social Presentations with Mark Rendle (Carl and Richard) - That look like a very promising tool... except for the name that I continually forget... (but that's probably just me). I will definitely have a to the Github repo.
What is a Cloud Developer Advocate? (Jeremy Likness) - Great article. A few of my friends joined that team, and even though I already had this talk with them, now I have a better picture.
Microsoft Azure Stack is ready to order now (Mike Neil) - It worth the time we wait, now hybrid solutions will be so much more simple to create. And I will definitely try that ASDK (dev version)
Nested Virtualization in Azure (Joy Fan) - A VM in a VM, it does sound like the movie Inception, but it's, in fact, very powerful.
Push your images to Azure CDN on publish with gulp (Shayne Boyer) - We all understand that CDN could seriously help our web application. Well, this post will show you that it could be really easy to implement and integrate to your CI/CD.
Migrating to Azure SQL Database (Gavin Payne) - Very interesting and complete post that regroups references and gives details about some of the alternatives when it's migration time.
Microsoft Connect(); 2016 Recap (Joseph Hill) - Three full day of great content. However, if you are like me, you didn't that much free time. Fortunately, all the presentations are available in video on demand. You need a summary because even if the keynote was really good... it is still 2h30, this post is the place to start.
Cloud
.NET Web Development and Tools Blog (Jeffrey T. Fritz) - Really cool tutorial with Visual studio, Docker, and Azure that repeat the Connect keynote demo.
Five Days of Azure Functions (James Chambers) - Nice post to know more about these Azure functions that everyone is talking about.