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.
CLI vs GitKraken Git GUI Speed Test (Jesus Murillo) - I love GitKraken, I still use the CLI and the integrated git in VSCode, but to really see things... It's the best, and wow it looks cool.
SPI 404: The 5 Dysfunctions of a Team with Patrick Lencioni (The Smart Passive Income) - I read The Five Dysfunctions of a Team a few years ago and loved it. It was really interesting to listen to the author talking sharing all that wisdom. A must! (book and episode).
Entity Framework Core 3 with Julie Lerman (.NET Rocks!) - What a great episode with Entity framework goddess in person. As I'm planning to use EF in a new project, this refresh was awesome!
#23: John Sonmez - Becoming a Finisher, Part 1 (The Solo Coder Podcast) - I know, read and follow Simpler Programmer. It was so great to heard all the work that was put in to arrive to the current status. So many of us think it's a night success... Looking forward to listening to part 2.
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.
How to Prepare for a Successful Cloud Migration (Aaron Woods) - This post list the questions we should ask ourselves before migrating. This will definitely help to reduce the bumps of a migration.
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.
Generating Images with Azure Functions (Aaron Powell) - Brilliant usage of Azure function and its the first one I see in F#! All the code is available in GitHub, definitely worth the detour.
Programming
A WebAssembly Powered Augmented Reality Sudoku Solver (Colin Eberhardt) - This is sick! I'm very impressed by all that work and of course by the result! A great post that explains all the steps to get that working.
Use MongoDB in Your C# ASP.NET Apps (Terje Kolderup) - This is a very complete tutorial the shows all the code and explains step by step how to add, configure and use MongoDB.
Podcasts
SPI 401: Jesse Cole—The Yellow Tux Guy (Jesse Cole) - Wow! Great show, if you don't feel pumped up and 200% motivated after listening to this show... We might be in Zombieland already.... 😜.
Miscellaneous
Is that position available for remote? (Mark Downie) - A very interesting post that, I think, explains well the 'behind the scene' of the response we can get when asking the remote question.
Every week, I publish my reading notes. Those are the articles, blog posts, podcast episodes, and books that catch my interest and that I found interesting. It's a mix of the actuality and what I was looking for.
SPI 402: Everyone Needs to Have a Podcast (Pat Flynn) - Very interesting episode that explains why... with numbers and examples... Guess what just popped on my project list...
Visualizing Your Work Schedule (Valentin Sawadski) - Interesting project.I'm always looking forward to the best way to track my time and see where I put my effort (aka time).
Every week, I publish my reading notes. Those are the articles, blog posts, podcast episodes, and books that catch my interest and that I found interesting. It's a mix of the actuality and what I was looking for. This one is the last of 2019!
Upgrading the Blazor HTML Table with FlexGrid ( Alvaro Rivoir) - This is a great tutorial that explains very clearly step by step how to replace the grid in the default Asp.Net Core project.
Miscellaneous
Advice to my 20 year old self (Scott Hanselman) - An Interesting post. But to be honest, the more I think about it the less I would spoil things. So as good or bad as it sounds, my advice would probably just be something like thrust yourself, you'll be fine.
You hear about that new GitHub Actions. Or maybe you didn't but would like to add a continuous integration, continuous deployment (CI-CD) to your web application. In this post, I will show you how to add a CI-CD to deploy automatically to Azure using the GitHub Actions.
What are GitHub Actions
GitHub Actions are automated workflows to do things. One of these could be a CI-CD. Using a workflow you could decide to compile and execute some unit tests at every push or pull request (PR). Another workflow could be that you deploy that application.
In this article, I will deploy a .Net Core application in Azure. However, you can use any languages you would like and deploy anywhere you like... I just needed to pick one :)
Now, let's get started.
Step 1 - The Code.
We need some code in a GitHub repo. Create a GitHub repo, clone it locally. And your app in it. I created mine with dotnet new blazorserver -n cloud5minsdemo -o src. Then commit and push.
Step 2 - Define the workflow
We got the code, now it's time to define our workflow. I will be providing all the code snippets required for the scenario cover in this post, but there is tons of template ready to be used available directly from your GitHub repository! Let's have a look. From your repository click on the Action tab, and voila!
When I wrote this post, a lot of available templates assumed the Azure resources already existed and you and adding a CI-CD to the mixt to automated your deployment. It's great but in my case, I was building a brand new web site so those didn't fit my needs. This is why I created my own template. The workflow I created was inspired by Azure/webapps-deploy. And there a lot of information also available on Deploy to App Service using GitHub Actions.
Let's add our template to our solution. GitHub will look in the folder .github/workflows/ from the root of the repository. Then create a file with the extension .yml
Here the code for my dotnet.yml, as any YAML file the secret is in the indentation as it is whitespace sensitive:
on: [push,pull_request]
env:
AZURE_WEBAPP_NAME: cloud5minsdemo # set this to your application's name
AZURE_GROUP_NAME: cloud5mins2
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.101
# dotnet build and publish
- name: Build with dotnet
run: dotnet build ./src --configuration Release
- name: dotnet publish
run: |
dotnet publish ./src -c Release -o myapp
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- run: |
az group create -n ${{ env.AZURE_GROUP_NAME }} -l eastus
az group deployment create -n ghaction -g ${{ env.AZURE_GROUP_NAME }} --template-file deployment/azuredepoy.json
# deploy web app using Azure credentials
- name: 'Azure webapp deploy'
uses: azure/webapps-deploy@v1
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: './myapp'
# Azure logout
- name: logout
run: |
az logout
The Agent
There is a lot in there let's start by the first line. The on: is to define the trigger, in this case, the workflow will be trigger at every push or PR.
The env: is where you can declare variables. It's totally optional, but I think it will help then templates are more complex or simply to reuse them easily.
Then comes the jobs: definition. In this case, we will use the latest version of Ubuntu as our build agent. Of course, in a production environment, you should be more specify and select the OS that matches your needs. This job will have multiples steps defined in the, you guess it, steps: section/
We specify a branch to work with and set up our agent by:
And it would be a better idea to set the version as an environment variable to be able to change it quickly.
The next two instructions are really .Net Core focus as they will build and package the application into a folder myapp. Of course, in the "section" you could execute some unit test or any other validation that you may find useful.
To have our GitHub Action to be able to create resources and deploy the code it needs to have access. The azure/login@v1 will let the Action login, using a Service Principal. In other words, we will create an authentication in the Azure Active Directory, with enough permission to do what we need.
This will create a Service Principal named "c5m-Frankdemo" with the role "contributor" on the subscription specified. The role contributor can do mostly anything except granting permission.
Because no resources already existed the GitHub Action will require more permission. If you create the Resource Group outside of the CI-CD, you could limit the access only to this specific resource group. Using this command instead:
The Azure CLI command will return a JSON. We will copy-paste this JSON into a GitHub secret. GitHub secrets encrypted secrets and allow you to store sensitive information, such as access tokens, in your repository. To access them go in the Settings of the repository and select Secrets from the left menu.
Click the Add a new secret button, and type AZURE_CREDENTIALS as the name. It could be anything, as long as you use that value in the YAML file describing the workflow. Put the JSON including the curly brackets in the Value textbox and click the save button.
Provisioning the Azure Resources
Now that the workflow has access we could execute some Azure CLI commands, but let's see what missing:
- run: |
az group create -n ${{ env.AZURE_GROUP_NAME }} -l eastus
az group deployment create -n ghaction -g ${{ env.AZURE_GROUP_NAME }} --template-file deployment/azuredepoy.json --parameters myWebAppName=${{ env.AZURE_WEBAPP_NAME }}
The first command will create an Azure Resource Group, where all the resources will be created. The second one will deploy the website using an Azure Resource Manager (ARM) template. The --template-file deployment/azuredepoy.json tells us the template is a file named azuredeploy.json located in the folder deployment. Notice that the application name is passed to a parameter myWebAppName, using the environment variable.
An ARM template is simply a flat file that a lot like a JSON document. Use can use any text editor, I like doing mine with Visual Studio Code and two extensions: Azure Resource Manager Snippets, and Azure Resource Manager (ARM) Tools With those tools I can build ARM template very efficiently. For this template, we need a service plane and a web App. Here what the template looks like.
This template is simple, it only contains the two required resources: a service plan, and a web app. To learn more about the ARM Template you can read my other post or check out this excellent introduction in the documentation.
Once the template is created and saved in its folder.
The deployment
There are only two last steps to the YAML file: the deployment and logout. Let's have a quick look at the deployment.
Now that we are sure the resources exist in Azure we can deploy the code. This will be done with azure/webapps-deploy@v1 that will take the package generated by dotnet into myapp. Since we are already authenticated there is no need to specify anything at this point.
Everything is ready for the deployment. You just need to commit and push (into master) and the GitHub Action will be triggered. You can follow the deployment by going into the Actions tab.
After a few minutes, the website should be available in Azure. This post only shows a very simple build and deployment, but you can do so many things with those GitHub Actions, like executing tasks or packaging a container... I would love to know how you use them. Leave a comment or reach out on social media.
Every week, I publish my reading notes. Those are the articles, blog posts, podcast episodes, and books that catch my interest and that I found interesting. It's a mix of the actuality and what I was looking for.
Cloud
Azure Mystery Mansion - Microsoft in Business Blogs (Em Lazer-Walker) - Very interesting post. As I'm writing myself a text-based adventure game(just for fun) it's interesting to see the different approaches and tools available.
Every week, I publish my reading notes. Those are the articles, blog posts, podcast episodes, and books that catch my interest and that I found interesting. It's a mix of the actuality and what I was looking for.
ASP.NET Core updates in .NET Core 3.1 (Sourabh Shirhatti) - I'm very excited about this 3.1 version.I'm not sure why maybe it's because it is the long-time support (LTS). Nevertheless, I will update all my projects.
Use Google Sheets to translate faster (Robin Kretzschmar) - Woo! That's pretty cool. Automatic translation is never the best but this is very convenient.
7 Dangers of Micromanagement ( Jack Wallen) - Nice post to help you give the best version of yourself. (Note it's now 6, but it was 7 when I read it)
Every week, I publish my reading notes. Those are the articles, blog posts, podcast episodes, and books that catch my interest and that I found interesting. It's a mix of the actuality and what I was looking for.
Cloud
Azure Functions with QueueTriggers and .NET Core – Configuration and Troubleshooting (Jeff) - Poor Jeff, I was there on his stream and he struggles so much to understand what was happening. And honestly me too! Despite the fact that I know and use Azure Function regularly I completely missed the missing instruction... The good news is since the documentation is open-source we can improve it...
Programming
A quick overview of ASP.NET Core with Rider (Rachel Appel) - I never used Rider in a real project. However, the quality of this code IDE is not in question. It looks awesome and this post shows how it supports the latest version of .Net Core.
Visual Studio Extensions: 8 You Should Check Out (Carlos Schults) - A nice post that shares useful extensions for developers. I also like the fact that in the title it's 8 and in the url it's 7 LOL...
I'm still balanced about this book. It was a good book, even if I found some chapters that were too long. I also got lost by moments. I had the impression that some thoughts or ideas were not developed correctly and more quickly wrapped. In counterpart, some were very well served and clear.
Azure DevOps Roadmap update for 2019 Q4 (Gloridel Morales) - Since the multi-stage pipeline launch in May, the team as been listening to his community. In this post learn more about what they have been working on and what is their roadmap.
Code Comments (Donn Felker) - Very smart idea! I'm staring using that rule right away.
Microservices Fundamentals (Mark Heath) - New course on Pluralsight about an indeed challenging topic. This post shares the plan of that Microservices course.
Stop Waiting! Start using Async and Await! (Simon Hawe) - Learn the power of async in this excellent post. The example may be in Python the idea is the same however language we are using.
What’s in my bag for Microsoft Ignite 2019 (Thomas Maurer) - As I'm packing my own bag, going to Ignite for the first time it's interesting to see what others bring... (Note to myself next time don't leave at home your network cable adapter)
I really like this book, and planning to read it again soon. I like the way things are simply explained. Like if you deconstructed a situation and then re-building it. It felt authentic and true. It's nothing transcending, but the way it is explained is great.
It's coming! I'm not talking about winter here but I'm about Microsoft Ignite. One of the biggest Microsoft events for the DevOps and Dev amount us. This 4 days long event is a fantastic opportunity to get up to date with your favorite technology, learn the best practices, get certified and meet tons of experts to talk about your projects!
This year it's very special for me because I have the great pleasure to be part of the adventure, I will be presenting two sessions that are part of the Learning Paths.
A Learning Path is a series of connected learning modules that include sessions, hands-on experiences, technical workshops, certifications, and expert connections. Learning Path’s work together to build upon what you’ve learned to provide a comprehensive set of skills to help you reach your goals.
Figuring out Azure Functions (AFUN95)
Tailwind Traders is curious about the concept behind “serverless” computing – the idea that they can run small pieces of code in the cloud, without having to worry about the underlying infrastructure. In this session, we cover the world of Azure Functions, starting with an explanation of the servers behind serverless, exploring the languages and integrations available, and ending with a demo of when to use Logic Apps and Microsoft Flow.
Options for building and running your app in the cloud (APPS10)
See how Tailwind Traders avoided a single point of failure using cloud services to deploy their company website to multiple regions. We cover all the options they considered, explain how and why they made their decisions, then dive into the components of their implementation. In this session, see how they used Microsoft technologies like Visual Studio Code, Azure Portal, and Azure CLI to build a secure application that runs and scales on Linux and Windows VMs and Azure Web Apps with a companion phone app.
But wait, there is more...
For the second time, after the Microsoft Ignite "the event", will starts another event a tour! This year, it is thirty (30) cities that Microsoft Ignite The Tour will visits! All continents, except for Antarctica (why?! 😉), will be visited. Check the complete list of the cities on the website and mark the dates on your calendar!
I will also be presenting many different sessions during this tour. While I'm not doing all of them, I'll be present on many occasions.
Looking forward to meeting you
So if you are planning to go to one of those events, and would like to meet to talk about your project, show some bugs, ask questions, or just to chat! Reach-out, It's ALWAYS a pleasure, and I'll bring some stickers and some special swag1 with me...
Setting expectations for open source participation (Brett Cannon) - Excellent post (also available in video) about open source, where based on his experience the author share with us great advice. Thanks, Aaron for that reading suggestion.
Nothing new here but it's clear and very well explained. Honestly it good to revisit those productivity/ focus habits... It helps to stay on our toes...
Serverless Deployment Best Practices (Fernando Medina Corey) - A nice post that shows some of the best practices for serverless and how AWS implements them.
Why jQuery is Obsolete and Time to Stop Using It (Chris Love) - Great post. I was a big user of jQuery, and these days I do less front end stuff, so it is nice to see how things have evolved and to understand the impact jQuery had.
New workflow editor for GitHub Actions (Chris Patterson) - Have you tested the new GitHub action? If yes you will be pleased with this new editor...Ending the research of that missing space somewhere.
Single Page Applications and ASP.NET Core 3.0 (Shawn Wildermuth) - A very interesting post that explains all the little configurations or twists required to have a great SPA experience with .Net Core.
Miscellaneous
What You Need for Effective Remote Work (William Gant) - This is a full chapter of an up coming book about remote workers... If you are new to this adventure and even more if you are fulltime remote, this read is a must.
I really enjoyed this book. I found very interesting the categorization of all those habits and comportment grouping. I like also the habits association to help to break some or creating new ones. It's obvious, but I didn't think about it before.
We all do it. We create resources in the cloud for a demo, or a presentation and forget about them. Then at the end of the month, we receive a bigger invoice then expected and it's the panic.
This is why I thought about AzSubscriptionCleaner. It's an open-source project that could be deployed in your subscription very easily. The goal is to have it deployed by one click directly from GitHub.
The tool can be deployed in two versions, using Azure Automation, or Azure Functions. Based on a schedule it will execute a query to search all resources with a tag expireOn with the value is older than now(), and delete them.
I wrote two blog posts, paired with a YouTube video that explain how to tools where built.
This is an open-source project github.com/FBoucher/AzSubcriptionCleaner, you are welcome to see the code, clone the repository, ask for more feature or do a pull request to add a new one!
How the .NET Team uses Azure Pipelines to produce Docker Images (Matt Thalman) - Woaaah! I knew there were many docker images, but I didn't think it was that much. It's Incredibly interesting to read everything that is in place to do all those images...automatically.
GitHub stars won’t pay your rent (Kitze) - What a great story! This is an awesome journey of a developers who worked hard, took some risk and... Got result. All developer should read this.
Blazor – on the server or on the client (Christian Nagel) - A great post about blazor that explains very well the current status of this very promising tool.
Andrew Connell's Blog (Andrew Connell) - This nice post is the second of a series of three. It explains how to do every step but also why the author decided to do that.
Highlights from Git 2.23 ( Taylor Blau) - This was the first time I notice an update of git... It is very intriguing to see such a powerful tool evolving and see some experimental feature. It's a long post, but totally worth it.
How to Use Github Professionally (Aaron Stannard) - This post is great! Tons of information and best practices (with an explanation of why its a best practice).
I really enjoyed this book. Yes it's light and funny, but don't get fool, there is a deeper message here. I think Jessy wins his challenge by going into a monastery so we don't have to. We all have what it takes to live a more purposeful life, we just need to pause. Showdown, to go faster, do less to do more... Embrace the silence.
How to write 90% cleaner code with Hooks 5535657251 (Amandeep Singh) - Okay. I don't know React, but it's really nice to see that framework continue to evolve like that with his community. A very interesting post.
Podcasts
Economics of Kubernetes, with Owen Rog (Craig and Adam) - Really interesting episode. Of course all the news about Kubernetes were interesting, but even more the economics of cloud computing with the guess of the week, Owen Rog.
How To Develop Apps Like PUBG (Apoorv Gehlot) - An interesting article that gives us an idea of how a game like pugs got that success, and who they manage that rapid growth.