Preventing Developer Burnout in the Age of Rapid Software Delivery (James Brotsos) - This post is definitely interesting as it talks about a real health problem. at the same time there that mix with DevOps and security thing... Could be just me, interesting nevertheless.
Cake 1.0 with Mattias Karlsson (.NET Rocks!) - I'm a fan of Cake and of the team working on this project for a long time. Great show with our glorious Carl and Richard.
#399: The Practice of Shipping Creative Work with Seth Godin (The EntreLeadership Podcast) - I knew who Seth Godin was, and read one of his books recently (Tribes). And honestly, I feel like I will read another one soon. Great mind, I like how clear is the example... Great episode.
What ever you are on running on Linux, Mac or Windows that you are on the road or in the comfort of your office there is many different ways to manage your Azure resources. In this video I will show you five ways to do it and explain the pros and cons of each:
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!
Des fonctions courtes, qui font une chose (Les Semi-Colons) - First time for me listening to this podcast, third time for them. A very interesting podcast in "Canadian French". They are passing through the book Clean Code of Robert C. Martin. This episode was about chapter 3.
vygl - Le balado Ep.17 (vygl) - Great podcast in French. It was my first try and I really liked it. We can ear the experience of the speaker in their voice but also by the quality of this audio.
An Update on the MSDN and TechNet Migration to docs.microsoft.com (Jeff Sandquist) - It was looking mostly like an impossible mission, but with a lot of work, it is really incredible the things that can be achieved. This post shares the status of the migration of each section.
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.
Presentation Tips for Technical Talks (Tanya Janca) - This post is filled with great and simple tips that will for sure improve the experience of your attendees and ours.
Nice book. There is always a good story to make a correlation with his current point. Then it could go in a different direction with another story. All the stories are complementary and are adding layer by layer to the more complex message that is delivered to us. Easy to read, enjoyable from the beginning until the last word.
Enjoy some DOS Games this Christmas with DOSBox (Scott Hanselman) - With DOSBox and Retropie... We should be good for the holidays... If you don't have a Raspberry Pie this post is perfect for you since it focuses on DOSBox.
Books
How to Be a Bawse A Guide to Conquering Life
Lilly Singh
Not only the message is strong, but the way she delivers it is awesome. Many times I laugh and nod of the head... Definitely a great book to read at the end of the year when resolution time is not far...
Your Must-Have PowerShell Aliases for Docker (Elton Stoneman) - This post is gold! Seriously, it has a lot of really good code snippet ready to use and if gave me so many ideas...
Sandbox Azure pour tout le monde (Wilfried Woivré) - A nice French post that describes a tool to build sandbox resources and that offer nice options about security and availability of those resources.
The First 20 Hours: How to Learn Anything...Fast (Josh Kaufman) - That was a very interesting book. I devoured it much faster than I thought! As I was reading it, I was thinking... hey as a developer/programmer I already do a lot of those things... Things change so fast, technology changes... And a few pages later, the author was saying the same thing. :) It looks like we can adapt to many deferent situations. The author share with us a few journeys as he was learning new stuff. While I may not be interested to learn how to play to Go, I found all part of the book very interesting as those journeys a pact with tons of information.
ISBN: 1591845556 (ISBN13: 9781591845553)
Installing Azure Data Studio (Steve Jones ) - A quick review of the tool. Personally, I love it, but I don't spend as much time in it as I use too when working with MSMS.
Windows Virtual Desktop (null) - This week Microsoft announced what looks like a very simple way to get powerful environments without all the trouble to maintain them. More to come.
Most of the time when we use an Azure Devtest Lab it to Test our own application. This means that will need to install them on the virtual machines, every time. To do that, we need to create a custom artifact and add it to our formulas or to our claimable VMs. Lucky for us, creating a custom artifact is much easier than you may think. In fact, this post I will show you how easy it can be.
Goal
I want to create an artifact available from a private repository (Git from dev.azure.com in this case) that will set the timezone inside the VM.
Getting started
First, let's use a section in the Azure portal that is very useful; the Get Started section. In the portal navigate to your DevTest Lab (1), and select the Getting Started option from the left menu bar (2). In this new bar scroll down to the Lear more area and select Sample artifacts and scripts (3).
That will open the DevTestLab artifacts, scripts and samples project from Azure on Github. Open the folder Artifact, to see the list of all the usual artifacts you find in the public repo that is available by default in the portal.
Notice how all artifacts are in their own folder. When you create a new artifact, you can always come here and pick something similar to what you are trying to do. This way, you won't start from scratch. Let's open windows-vsts-download-and-run-script. An artifact is defined in the file Artifactfile.json. This file is mandatory and cannot be renamed. You can put scripts, images, or anything else you need inside this folder.
Open the Artifactfile.json file and have a look.
As you can see it's a simple JSON file. In the section (A) you will define the title, description, publisher, OS and the Icon. Note that the Icon must be accessible publicly, it could be on github, a blob storage or on a website. Section (B) is to define all the parameters you may need to install your artifact on the VM. Finally In (C) it's the command to execute.
Create the Artifact
Here is the JSON for our windows-Set-TimeZone artifact. A made it very static by not passing any parameter, but in a reel situation, a timezone parameter would be better.
Artifactfile.json
{
"$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2016-11-28/dtlArtifacts.json",
"title": "Set TimeZone to Eastern Standard Time",
"description": "Execute tzutil command on the VM set set the Time Zone",
"publisher": "FBoucher",
"tags": [
"PowerShell"
],
"iconUri": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/Artifacts/windows-run-powershell/powershell.png",
"targetOsType": "Windows",
"parameters": { },
"runCommand": {
"commandToExecute": "tzutil.exe /s \"Eastern Standard Time\""
}
}
Create an artifact repository
For this post, I'm using Git from Azure Devops (dev.azure.com) previously named VSTS, but any private repository should works. If it's not already done create a project and go to the Repos section. Create a root folder named Artifacts or something else if you prefer. Then add a new folder for your artifact. To follow the best practices you should start with the name of your artifact by the name of the targeted OS; in my case windows-Set-TimeZone. Now add the file Artifactfile.json defined previously.
Note the url of the repository, it should be easy to get it by click on the Clone button that is on the top right of the screen.
Add repository to DevTest Lab
Now we need to add this repository to our Devtest Labs. From the portal.azure.com, open the blade of your lab. From the left panel, click on Repository, then click the Add button.
It's time to use the information noted previously. This is about the Repository, not the artifact.
Use the Artifact
The only thing left is to use our artifact. You can find it while creating a VM or a formula. When you have parameters define in your Artifactfile.json, the parameters will be listed in a form completly a the left.
And if you try it, you will see that the time match the desired timezone. Here my PC is set to display with a format of 24H put it's the same... yep I'm in Eastern Standard Time.
Add it to an ARM template
Doing it with the nice interface is good when you are learning. However, we all know that no DevOps will do that manually every time. So let's add our Repository to our ARM template. If you need more detail on the deployment method, I explain it in a previous post How to be efficient with our Azure Devtest Lab deployments.
When you don't know the type or the structure of a resource, you can always go in the Resource Explorer (resources.azure.com) there will be able to find your resource and see how it's defined.
So for this post our artifactsources will look like this:
An artifactsources goes in the Resources list inside the Devtest Labs.
In an ARM template you have the main node Resources (A), then you will have the Lab node (B). Inside this node, you should see second resources list (C), where the Virtual Network is defined. The artifactsources should go there.
Then when you declare your formula, you just need to reference this repository, exactly like the public one.
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.
How I choose which services to use in Azure (Barry Luijbregts, Scott Hanselman) - Oh wow! Very interesting video, presenting a nice and structured way to pick our cloud services.
The Subtle Art of Not Giving a F*ck (Mark Manson) -Damn it's good! The title of the book let's me thought it will be very negative. Not giving a fu#*... But it's really not. Quite the opposite in fact. I really like the book and I'm planning to read/listen it another time in... One year. To see what changed.
The Modern Dev Team (Rob Conery) - What a great post. Maybe it's only me getting old ;) but I think we all have these thoughts one day or the other.
Cloud
A great developer experience for Ansible (Corey Sanders) - This post announces the integration of Austin in the cloud shell and visual studio. It somewhere we can learn more about it. I didn't know about it, but I really want t use in my next DevOps tasks.
Azure Functions Proxies (Eric Williams) - Azure Functions are a very useful thing to have in your toolbox. With the addition of Proxies, it becomes a must read a few ways to use them in this post.
Jenkins on Azure: from zero to hero (Pui Chee Chan) - Jenkins is an extremely popular build server. This post list all the features pre-package for you when you deploy it in Azure in a few click.Pretty awesome.
My Favorite SQL Prompt Features (MarlonRibunal) - If you never try SqlPrompt and you write SQL in your day to day, stop read this, and go downloading it, or at least read this post that gives you a glimpse of it's feature.
Virtual machines (VM) are used in most solutions nowadays as a [ProcessName] server, temporary machine to run tests or make demos, and sometimes even as a development machine. One of the great benefits of the cloud is that you only pay for what you use. So unlike the old server, that you keep paying for, you won pay virtual machine's CPU for when you turned off! In this post, I explain how to do it with your existing machines and also what to do with all the future one that you will be creating.
From the Azure portal (portal.azure.com), select the Virtual Machine (VM) that you which to edit. Then look at the option panel, on the left, for Auto-Shutdown in the Operations section. You should have something that looks like this:
At any time you can enable and disable that functionality, it won’t affect the running VM.
Now, to activate it click on the Enabled. Then Select the time you would like to see the VM shutdown. Be sure to select the good time zone, by default it’s UTC. You can adjust the at for UTC of change the time zone, both options are valid.
Now you could decide to enable the notification. That could be useful if you may want to postpone the shutdown for one or two hours, or integrate the shutdown to another process like backup, cleaning…
To activate the notification option just click on the enabled, and enter the email address. If you want to attach the shutdown to a Logic App or an Azure Functions use the webhook. Here an example of notification email, see the Postpone options link.
What if you have many VMs running
Let's say you have already twenty (or more) VMs running, you could have executed a PowerShell script like:
Update - 2018-03-14 Well, today this is only possible for VM part of a DevTest Labs. Not for "regular" VM. However, I'm sure that day will come pretty quick.Does that mean that you need to go in all your VMs and set it manually? No. You can use an Azure Automation that will stop a list of VM on a regular schedule. A big advantage of this solution is that you can be more creative since it offers a lot more flexibility. You could identify the VM to shutdown base on some TAGS, you could have a different schedule base on the week vs weekend. You could even have a task to start VMs in the morning... More to come on that topic in a future post... If you want to read about how to get started to Azure Automation click here.
Multiple VMs that already exist, no problem
Obviously, if you have multiple virtual machines that already exist it is not very efficient to change their configuration one by one via the portal. Here is a small script to change the configuration of a large amount of VM in one shot.
The variable $selectedVMs contains all the VMS that we wish to edit. In this sample, I only get VMs contained in the RessourceGroup cloud5mins, but there are no limits to what you can do. You could select all VMs with a specific OS, tags, location, name, etc.
The variable $ScheduledShutdownResourceId will be the identity for the configuration for the auto-shutdown we wish to inject. Note that the provider is microsoft.devtestlab.
Next, we create a collection of properties in $Properties. status the one that active or deactivate the auto-shutdonw. targetResourceId is the resourceID of the VM we target.
The only things left is to specify the time and timezone.
If you prefer, I also have a video version that explains all the steps.
How to shutdown automatically all your existing VMs
End Update
Let's create a VM with the auto-shutdown pre-configured with ARM
Of course, a much more efficient way to set the auto-shutdown is at the creation time by adding a new resource of type Microsoft.DevTestLab/schedules to your template. This option was previously only accessible for DevTestLab, but recently was made available to any VMs.
Here an example of the variables that could be added to your template.
And here an example of Microsoft.DevTestLab/schedules resource. One of these should be added for every VM you wish to auto-shutdown. Because your script is for one server, however, only one instance is required.