It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
The convenience of System.IO (Richard Lander) - An interesting exercise. I like doing these when for a project you need to determine what is the best solution to implement in your context.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Programming
Should you use the .NET 8 Identity API endpoints? (Andrew Lock) - Things are changing in the upcoming .NET 8. Interesting post that shares thought about if those changes feels like moving forward or backward.
Azure Data Studio 1.46 and New Features (Erin Stellato) - I love that tool! Its fast, customizable, and its avalaible across platform meaning I don't have to use different tools depending on the computer I'm working from.
It's time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
What Are HTTP Headers? | Postman Blog (The Postman Team) - This is a great post about headers. Used by everyone known by developers involve in API, they are the key of a clear communication.
Introducing TypeChat (Anders Hejlsberg, Steve Lucco, Daniel Rosenwasser, Pierce Boggan, Umesh Madan, Mike Hopcroft, and Gayathri Chandrasekaran) - That looks like a pretty cool package to add to our apps!
How To Build Responsive Power Apps Forms From Scratch (Matthew Devaney) - Build an App quickly, that's nice. But make that App look great on any screen, now your talking! This is very detailed and complete example that helps us build our first responsive App.
Podcast
Who are the Ops Behind the DevRel Curtain? (Ep 80) (Community Pulse) - Interesting episode about DevRel and more particularly two who are doing less visible work. Helping those who are helping... And a tiny bit about bread! Yell done, David!
Blazor Basics: Data Binding in Blazor (Claudio Bernasconi) - Nice post that explains the little particularity of those bindings. It could save you a lot of time.
It's been five hundred weeks, this is more than nine years! Who knew I will keep doing that for so long...
If you are new around here, welcome, The Reading Notes 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.
If you think you may have interesting content, share it!
Cloud
Bicep Access policies and Managed Identity (Gregor Suttie) - This is a nice post that connects docs pages and different blog posts and information so we have the big picture.
Cloud-Native Application Security (Samir Behara) - This post is listing so many best practices, patterns, and anti-patterns, it is a must for any "cloud-native people".
Greg on The Genius of Routine (What's Essential) - Habits are very powerful tools in our toolbox for so many things... It's worth learning more about it.
Good Monday,
Already time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week.
Just for the of it, I did a little funny video to answer the question: Where really is cloud computing?
Comparison of Dependency Injection in .NET (Nickolas Fisher) - A very complete tutorial, with all the required code even the GitHub reference. The perfect example to get started.
291: GitHub Actions All The Things (Merge Conflict) - Sometimes building a CI-CD feels too cumbersome, but it's probably worth it. In this episode Frank and James share and they found their balance.
Greg on The Power Of The Graceful No (What's Essential) - It's so hard some time to say this simple word... But it is an important, nice episode.
Shaun Walker on Blazor and Oqtane - Episode 179 (Azure DevOps Podcast) - Nice discussion with the creator of DotNetNuke and more recently Oqtane, about .Net and Blazor for today's solution.
Game Console 2.0: A Photographic History with Evan Amos (Hanselminutes with Scott Hanselman) - Really interesting interview about... yes, photography. Scott is chatting with the photographer of those amazing images of the game consoles.
Already time to share new reading notes.
It is a habit I started a long time ago where I share a list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week.
You think you may have interesting content, share it!
CRUD operations on PostgreSQL using C# and Npgsql (Davide Bellone) - This post is a very good tutorial about how to make a simple query with all the code and explanation required for a great start.
How to get the optimal image size for web (Joel Hans) - So many options are possible. This post explains the impacts of different contexts and provides guidance on how we could improve, or what we should look at.
Podcasts
Ximena Vengoechea On How To Hear What Really Matters (What's Essential) - Very interesting conversation. Ximena is the author of the book Listen Like You Mean It. Well... It's just get added to my to-read list.
Languishing? Here’s How to Turn it Around (Modern Mentor) - There is a name for feeling "meh"! And there are also things we can do to feel better. Very captivating, and now I want to learn more about it.
My True Crime Episode with David Mittelman (A Bit of Optimism) - When I saw the title of the episode I was a bit confused... True Crime? WHat's the connection? But it was fascinating, so much passion!
Windows Terminal Preview 1.13 Release - Windows Command Line (Kayla Cinnamon) - Amazing post, yes we learn about the new features, but we also read about the learning and experimentation of this team and collaborators involvement. Great work.
It's Monday (the cyber one), 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!
Cloud
A Simpler Way to Azure (Rob Conery) - A very cool and interesting project. Even though I have never tried Heroku I think it's always good to push forward and make the user experience easier.
Optimize your cloud spend with Azure (Microsoft Azure) - This post lists many tools, more detailed posts, and videos to continue our journey feeling safe in the cloud.
What is an API? (Salma) - Wonderful post that explains so well API. I definetly think that could be the best post to get started about the topic.
Why do we need Dapr? (Mark Heath) - A very clear example that illustrates simple but frequent situations where Dapr would help us. Reference to a book also in.
Shannon Doherty on A Platform to Influence Happiness (What's Essential hosted by Greg McKeown) - A fun and interesting episode where a life-hack content cretor shares her reflection about how to find what will works and different hacks of course.
264: FOSS, Code Tours, & .NET MAUI Web with Ooui (Merge Conflict) - Tons of news in many different topics... Nice show, as usual, looking forward to learn more once both of them use more MAUI in their projects.
Create a Windows 10 development virtual machine (Thomas Maurer) - Great tutorial to create a dev environment.So useful when we need to create a specific context or use a different version to investigate client issues.
Visual Studio 2022 (Amanda Silver) - I'm always impressed by how new features are continuously added to VS. Such a great tool.
Miscellaneous
Why you should never quit too early ... (Donn Felker) - An inspiring post to help us persevere and time is hard. But also to try to step aside and have an open mindset.
Every Monday, I 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!
The suggestion of the week
How do I Navigate GitHub Code? (Brian Lagunas) - Two very simple tricks that make a huge difference when you browse a GitHub repo.Wow.
Highlights from Git 2.31 (Taylor Blau) - There definitely new features that I will use. And some that I didn't even know was possible that become better and faster.
Every Monday, I 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!
The suggestion of the week
Using Azure Key Vault to manage your secrets (Chris Noring) - Wow, this is a very complete post that explains with Azure Key vault is great and it also explains how to build a simple n\Node.js app to read a value from it.
How to fix Blazor WASM base path problems (Kristoffer Strube) - Interesting post that suggests a complete solution for a common issue. Could it be added to the framework and become native?
The Shorts -- Backyard Adventures (The Dirtbag Diaries) - One thing keep coming back to my head again and again as I was listening... Yeah, so true! I love it. Let's do small adventure.
227: Databases! (Merge Conflict) - So many great questions, a tons of answers, hypotheses, and laughs. Great show guys!
What a great book. I didn't know John Wooden before, but I am very impressed and inspired by both coach Wooden and the author. There is so much in this book and worth reading it again... But first, let's get prepare :)
Don't ever break a URL if you can help it (Scott Hanselman) - Wonderful post that explains and shows how to provide a great experience to our readers even if we modernize our website.
Talk Triggers: The Complete Guide to Creating Customers with Word of Mouth
Author: Jay Baer
A good book filled with good stories. I personally like it when they deconstruct like this winner journey or factor that makes those ideas, plans, actions different. The idea of a talk trigger is good and it was nice that the creation, lifetime, and death of a talk trigger was also cover in the book.
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!
Add Discord Notifications to ASP.NET Core Apps (Steve Smith) - Really nice post that shows us how to use GitHub actions and Csharp to push info into Discord. I need to try something like that someday....
Try gh, GitHub's new CLI (John Papa) - Oh, that's really nice I like that. I find it funny that t should like you just got a hit in the chest. However, it looks powerful enough to cut your breath... so it probably deserves it.
How to Succeed In Building Developer Tooling with Peter Pezaris (Software Engineering Unlocked) - Don't blink, don't even blink. Not sure if it really apply when you listen to podcast, but this episode was so packed of great content. I really like the open discussion. An awesome show.
0241 - Etienne Tremblay - GitHub Actions (Visual Studio Talk Show) - Great episode that compare, discuss, and speculate with GitHub Actions and Azure DevOps. It's in French. I miss you guys it's been too long... Great show.
How I Manage and Plan Tasks as a Remote Worker (Thomas Maurer) - It's very interesting to see how others are doing, and the kind of tools they are using..Even better when it's your colleague.
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.
Myself: It's not weird at all (Hanselminutes - Fresh Talk and Tech for Developers) - I nice episode much longer than the usual, but the guest is also special... It's Scott. During a Live Stream on Twitch it the Live Coders... People suggest making a podcast episode of the interview... I couldn't agree more.
The Power of Humor in Tech with Chloe Condon (Screaming in the Cloud) - Very refreshing episode with the awesome and very colorful Chloe. Nice show that goes to fast. Very interesting discussion about the non-traditional way to technical work, and its success.
Gather Your Community or Get Left Behind—Mighty Networks and More (The Smart Passive Income Online Business ) - Nice episode that talks about what comes after blogging... The alternative to Facebook community and different opportunities to answer our graving of community and feeling of appurtenance.
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.
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.
Improve your Dockerfile, best practices (Chris Noring) - A nice quick post about some really easy best practices. It's so simple why would you not follow them.
Introducing Windows Terminal (Kayla Cinnamon) - The awesome new terminal with a kickass look. Even more, it's an open source project!
Last week, it was the 25 edition of the MVP Summit. An event, where Microsoft invites all his MVP to get to Seattle and spend some time with the products teams and learn on the latest news and best practices.
This year was particularly inspiriting by the Microsoft roadmap, of course, but even more by all the amazing people a got the chance to meet and discuss with. I'm all pump-up, and I have tons of ideas and projects… more to come.
I already miss you…
Cloud
Deploy Docker containers fast to Microsoft Azure (Michelangelo van Dam) - This is an excellent tutorial to get started with Docker and also to see what's possible with Azure Container Instance service (ACI).