211: Failure To Launch (Merge Conflict) - Interesting conversation about when it's time to stop adding features and deploy. Finding a comfortable point could be difficult sometime.
Stop Pushing Down Your Emotions (Developer Tea) - I think a lot of people are doing that, me included. Very interesting podcast about a real situation.
How the OBS Project changed video forever with lead Hugh Bailey (Hanselminutes with Scott Hanselman) - I was trilled to listen to this podcast. I'm a regular user of OBS and it was wonderful to learn more about this project. I will definitely be lurking on the GitHub side...
Episode 219: Remote crickets and Manager Careering (Soft Skills Engineering) - A really nice episode. Great topics answering diverse questions. One that kept my attention was about the magic manager and the time management...
How to Improve Time Management with Angela Proffitt (Influencer Entrepreneurs with Jenny Melrose) - A few great tips to improve our efficiency at managing time. It's always good to have new ideas and ear how others are doing.
Every Friday, I will share a recap of the week and at the same time a summary of my streams. Those videos are at least two hour longs, so I thought a short summary to know if topic interest you could be useful.
This is some basic, sample markdown.
Every Friday, starting now, I will share a recap of the week and at the same time a summary of my streams. Those videos are at least two hour longs, so I thought a short summary to know if topic interest you could be useful.
Useful Links:
Learning how to use a Blazor WebAssembly with Azure AD Token c5m.ca/stream-ep109
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!
All Things Azure with Dwayne Monroe (Screaming in the Cloud) - People asked me those questions very often: Why Azure? How did you start? Dwayne's answer is excellent... Great podcast honest and true.
15 Statistics You Should Know About A Career In UX Design (Ben Aston) - Interesting post that does the tour of the UX job. I wished I had that kind of information on all types of jobs back in the day. If you are considering UX its a must.
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!
How to Think Like a Boss with Kate Crocco (Influencer Entrepreneurs with Jenny Melrose) - Creating, building feeling good in a business while being a parent is hard.
I took me about one year to read that book. Way longer then it should. It was a good book and it is really easy to read. Maybe it's the fact that it was a "real" book and not in my kindle? But I think it was the format. This book look like a comic book with a director cut. There those little story bubbles and there is the text. The content is amazing, but I felt like I was always losing the vibe while transitioning to the text, or the bubbles.
Remote Debugging .NET Containers (Karol Deland) - A nice tutorial that explains clearly first the difference between remote and local debugging and then explains how to do it.
Screen Sharing with an Ultrawide Monitor (Kenny Lowe) - Really interesting post.As I think about getting a new screen and heard bad experiences sharing ultrawide screens this look like a nice solution.
An interesting book that shares the best practices about making videos today. How to plan, record, edit... What to do and not do. A quick, direct to the point and complete tutorial to get started. This book was done like today's videos.
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!
Unit Testing in ASP .NET Core 3.1 (Shahed C) - A nice post that shows how to get started with xUnit the voted most popular test framework.
Miscellaneous
APIs in the 2020s Panel (.NET Rocks!) - A virtual panel of awesome speakers that talked about API, REST, GraphQL, oData and so more. Lovely episode.
471: How to Say No Without Saying No, with Lois Frankel (Coaching for Leaders) - Saying No... being open. Really interesting topic. I put Lois Frankel: Nice Girls Don’t Speak Up or Stand Out in my to read list, that book maybe written for women in mind, but I think it is really interesting.
Leveraging Our Emotional Goals (Developer Tea) - An interesting episode that talk about goals and what we need to do (or not) to achieved them.
203: Updating Open Source Projects (https://castbox.fm/episode/203%3A-Updating-Open-Source-Projects-id2117504-id267802246) - As I just create my first version in one of my open-source project I found the topic more than interesting... Thank you, great show.
How to Stop Windows 10 Updates (5 Methods) (Mohammed Siddiqui) - I think you should only prevent auto-update when you really know what you are doing. Updates are easy to forget and therefore your PC could be at risk. That said, sometime it could really be a must.5misc.windows.update]
An incredible adventure yes around the globe, but more important over the personal limits. I found this book very inspiring. I felt following him across the Antarctica... In the blizzard or in those deep moment. Great memoir, great adventure.
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. As you will quickly see This week is heavily tinted by the Microsoft Build event. I still have tons of videos to watch since I was was busy monitoring the chat during most of the performances.
You think you may have interesting content, share it!
Chocolatey with Rob Reynolds (.NET Rocks!) - Awesome episode talking about all the good and the great of Chocolatey that awesome package manager.
A path to technical leadership with Keavy McMinn (Hanselminutes with Scott Hanselman) - Because the most interesting path are more then often not the straight one... Great talk about the choice we make in our lives...
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!
Git Branching Strategies (Chris Ayers) - Nice post that describes 3 popular solutions base on your teams' skills and experience.
Podcasts
Making Docker lovely for Developers with Simon Ferquel (Hanselminutes with Scott Hanselman) - Incredibly interesting podcast episode where they discuss about Docker on Windows. How it was working before and how it works with WSL2. A must.
5 Reasons It's Better to Be A Small Streamer - Twitch Tips (Stream Coach: Twitch Stream Tips | Partner Interviews | Pro Advice) - A nice episode that list some advantages of being a smaller streamer. I've been streaming for one year now, I'm pretty happy with my journey, learned a lot, and still learn so much. I don't feel disadvantaged, but that's maybe just because I don't really focus on growth.
469: See What Really Matters, with Greg McKeown (Coaching for Leaders) - Nice episode that talks about the essential, how to find it, how to not pass over it. Very interesting. The book, Essentialism, from seems interesting too... And hop! On the to-read list.
Miscellaneous
Whiteboarding for Developers: Yes, You Have To ( Chris Gustafson) - An excellent post that will help you to remember why whiteboarding is important. It will also provide nice guidance to restart doing it efficiently.
Visual Studio Codespaces (Nik Molnar) - I really like the new name I think it says more about what it is. And seriously how can I not like the new price! Less than 2$/day for a machine!
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. You think you may have an interesting post, share it!
My office is in the basement... so I didn't conplained.
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!
Azure Free Account? Is it really free? ( Michael Crump) - Ooh yeah! I still remember that moment where I created my first service.... Get started free is free.
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.
What are Azure CLI Extensions? (Michael Crump) - An interesting first article of a series. This one introduces us to the extension... Hmmm. I think I have an idea.
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.
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.
Visual Studio Code January 2020 (VSCode Team) - How this team manages to pack so many goodies in every new version is a mystery. Wonderful.
Podcasts
Influencer Marketing EXPLAINED (by an influencer) (That Creative Life) - What a great episode! She can't barely contain herself... that's how Sara is passionate and honest! I love the show, great episode!
Colin O'Brady - First to Ever Cross Antarctica COMPLETELY Unassisted (That Creative Life) - I have been waiting for someone to write a book like that forever! Thank you to let me discover Colin O'Brady. I already order the book... looking forward to reading it. Life IS the ultimate adventure, a mandatory listening for all of us!
#25: Shayne Boyer - Social Coder (The Solo Coder Podcast) - Once again a very nice episode. It was wonderful to discover my colleague to this interview. Well done.
Making Gatsby easy to understand with Laurie Barth (Software Engineering Unlocked) - That how you do an interview! Great conversation, Lauria is fantastic. I didn't know her but now I'm following, and waiting for the next "question".
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.
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.