.NET DevOps for Azure

I’ve been working hard to bring together all that I have learned over the past years into my new book: .NET DevOps for Azure.

It is a culmination of a long-time vision, some key leadership, and a confluence of industry events.

Almost fifteen years ago, the I gained a passion for helping .Net DevOps engineers and DevOps services companies succeed, for making the complex simple, and for finding rules of thumb that would work for 80% of situations. With too many options in the software world and too many answers of “it depends”, the industry has been starved for the ability to do something “by the book.”

This book presents a scenario where a .NET developer can say “I’m doing Azure and .Net DevOps by the book.” In this manner, one would know what models and patterns were in play and what to expect from said environment.

The examples largely use Visual Studio 2019 preview edition. However, the code and the Azure DevOps Services pipeline function with .NET Core 2.2 and can be used to implement applications.

The example configuration used throughout this book can be leveraged through a public project and source code repository online.

Visit Amazon to order. [Click Here]

Or email me jeffrey@clear-measure.com to get a free eCopy of Chapter 3: The Professional-Grade DevOps Environment!

.NET DevOps Bootcamp

Architect + Lead Engineer Hands-On 2-Day Immersion hosted by ME! Jeffrey Palermo!

Is simplifying your software development and processes something that you’d like to see happen in your organization?
If so, this class was made with you and your team in mind!   

Join me!
  .NET DevOps Bootcamp: Architect & Lead Engineer Hands-On Immersion 
Hosted by Jeffrey Palermo
January 16th-17th
Austin, TX

I’m excited to be able to offer this 2-Day training. Walking you through the simple 7 key steps to simplify your .NET DevOps world where I simplify the development and deployment process – making it applicable to your every day.   

Attendees will learn concepts, apply the learning and also implement the latest DevOps tools for Microsoft-based applications, including Azure DevOps Services, Git, Azure Pipelines, Azure PaaS environments, and Octopus Deploy.  

You’ll also get:

My current favorite private build script

I do pull in the Exec function from psake just because it was coded very well.  This build script is just powershell and is geared for .Net Core

. .\BuildFunctions.ps1

 

$projectName = “OnionDevOpsArchitecture”

$base_dir = resolve-path
.\

$source_dir =
$base_dir
\src”

$unitTestProjectPath =
$source_dir
\UnitTests”

$integrationTestProjectPath =
$source_dir
\IntegrationTests”

$uiProjectPath =
$source_dir
\UI”

$databaseProjectPath =
$source_dir
\Database”

$projectConfig = $env:BuildConfiguration

$version = $env:Version

$verbosity = “q”

 

$build_dir =
$base_dir
\build”

$test_dir =
$build_dir
\test”

 

$aliaSql =
$source_dir
\Database\scripts\AliaSql.exe”

$databaseAction = $env:DatabaseAction

if
([string]::IsNullOrEmpty($databaseAction))
{ $databaseAction = “Rebuild”}

$databaseName = $env:DatabaseName

if
([string]::IsNullOrEmpty($databaseName))
{ $databaseName =
$projectName}

$databaseServer = $env:DatabaseServer

if
([string]::IsNullOrEmpty($databaseServer))
{ $databaseServer =
“localhost\SQL2017”}

$databaseScripts =
$source_dir
\Database\scripts”

   

if
([string]::IsNullOrEmpty($version))
{ $version = “9.9.9”}

if
([string]::IsNullOrEmpty($projectConfig))
{$projectConfig = “Release”}

 

Function Init {

    rd
$build_dir -recurse -force  -ErrorAction
Ignore

       md $build_dir
>
$null

 

       exec {

              &
dotnet clean
$source_dir\$projectName.sln
-nologo -v
$verbosity

              }

       exec {

              &
dotnet restore
$source_dir\$projectName.sln
-nologo –interactive -v
$verbosity
 

              }

   

 

    #Write-Host
$projectConfig

    #Write-Host
$version

}

 

 

Function Compile{

       exec {

              &
dotnet build
$source_dir\$projectName.sln
-nologo –no-restore -v
$verbosity -maxcpucount –configuration
$projectConfig –no-incremental
/p:Version=$version /p:Authors=”Clear
Measure”
/p:Product=”Onion
DevOps Architecture”

       }

}

 

Function UnitTests{

       Push-Location -Path
$unitTestProjectPath

 

       try {

              exec {

                     &
dotnet test -nologo -v
$verbosity –logger:trx
–results-directory $test_dir –no-build
–no-restore –configuration
$projectConfig

              }

       }

       finally {

              Pop-Location

       }

}

 

Function IntegrationTest{

       Push-Location -Path
$integrationTestProjectPath

 

       try {

              exec {

                     &
dotnet test -nologo -v
$verbosity –logger:trx
–results-directory $test_dir –no-build
–no-restore –configuration
$projectConfig

              }

       }

       finally {

              Pop-Location

       }

}

 

Function MigrateDatabaseLocal {

       exec{

              &
$aliaSql $databaseAction $databaseServer
$databaseName
$databaseScripts

       }

}

 

Function MigrateDatabaseRemote{

       $appConfig =
$integrationTestProjectPath
\app.config”

    $injectedConnectionString =
“Server=tcp:$databaseServer,1433;Initial
Catalog=
$databaseName;Persist Security
Info=False;User
ID=
$env:DatabaseUser;Password=$env:DatabasePassword
;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection
Timeout=30;”

   

       write-host “Using connection string:
$injectedConnectionString

    if (
Test-Path $appConfig )
{

        poke-xml
$appConfig “//add[@key=’ConnectionString’]/@value”
$injectedConnectionString

    }

 

       exec {

              &
$aliaSql $databaseAction $databaseServer
$databaseName $databaseScripts
$env:DatabaseUser
$env:DatabasePassword

       }

}

 

Function Pack{

       Write-Output “Packaging
nuget packages”

       exec{

              &
.\tools\octopack\Octo.exe pack –id
$projectName.UI” –version
$version –basePath $uiProjectPath
–outFolder
$build_dir

       }

       exec{

              &
.\tools\octopack\Octo.exe pack –id
$projectName.Database”
–version $version –basePath
$databaseProjectPath –outFolder
$build_dir

       }

       exec{

              &
.\tools\octopack\Octo.exe pack –id
$projectName.IntegrationTests”
–version $version –basePath
$integrationTestProjectPath –outFolder
$build_dir

       }

}

 

Function PrivateBuild{

       Init

       Compile

       UnitTests

       MigrateDatabaseLocal

       IntegrationTest

}

 

Function CIBuild{

       Init

       MigrateDatabaseRemote

       Compile

       UnitTests

       IntegrationTest

       Pack

}

 

 

Palermo Pamphlet 003 – Unboxing of the Azure Sphere IoT System on a Chip board

[iframe style=”border: none” src=”//html5-player.libsyn.com/embed/episode/id/7326800/height/300/theme/custom/autoplay/no/autonext/no/thumbnail/yes/preload/no/no_addthis/no/direction/backward/render-playlist/no/custom-color/0072be/” height=”300″ width=”100%” scrolling=”no” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen]

Lori Lamkin, Microsoft’s Director of PM on Shifting to Azure DevOps – Episode 007

[iframe style=”border:none” src=”//html5-player.libsyn.com/embed/episode/id/7254929/height/100/width//thumbnail/yes/render-playlist/no/theme/custom/tdest_id/800580/custom-color/0072be” height=”100″ width=”100%” scrolling=”no” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen]

In this episode, Jeffrey speaks with Lori Lamkin, Microsoft’s Director of Program Management. She has been leading the Visual Studio Team Services program management since the conception of Team Foundation Server in 2002 that’s 16 years in the space of better shipping software using Microsoft technologies! She led the transition of the team to Agile methodologies, to open source reuse, to Cloud services, and Azure.

 

Lori and Jeffrey discuss what’s next for Lori in and of her role as Director of PM, her strategy behind leading the big shift from VSTS to Azure DevOps, the current roles and duties within Microsoft Azure DevOps, what she sees as the biggest shift in progressing from Agile and adopting DevOps, and how DevOps has become more and more efficient.

 

Topics of Discussion:

[:51] About today’s guest, Lori Lamkin!

[1:18] Jeffrey welcomes Lori to the podcast.

[3:22] Lori speaks about the strategy behind leading the big shift from VSTS to Azure DevOps.

[5:42] What’s next for Lori in and out of her role as Director of PM? What has she been up to?

[8:18] Lori gives some background on Azure DevOps history.

[15:37] Lori talks about the current roles and duties within Microsoft Azure DevOps.

[18:08] A word from Azure DevOps sponsor: Clear Measure.

[18:34] How the organization for Azure DevOps is structured much differently than many other organizations.

[20:38] What Lori thinks is the biggest shift in progressing from Agile and adopting DevOps.

[23:34] Why everyone in Lori’s team is a Software Development Engineer.

[25:08] Did Lori’s team used to have Systems Engineers (otherwise known as IT Pros)?

[27:18] The broad set of skills that is required of the developers to operate the components of Azure DevOps that the Azure Data Center is running on.

[28:55] The change in business with DevOps and how it has become more efficient.

[31:21] Lori’s take on the culture change CEO Satya Nadella is driving as well as his 1ES (one engineering system) plan.

[35:26] Is there no software Git can’t handle?

[36:18] Where Lori suggests you further your learning after listening to this episode.

 

Mentioned in this Episode:

Azure DevOps
Azure DevOps Services
Azure Cloud

Clear Measure (Sponsor)

Microsoft Secrets: How the World’s Most Powerful Software Company Creates Technology, Shapes Markets, and Manages People, by Michael A. Cusumano

Satya Nadella on transforming Microsoft’s culture

More about Satya’s One Engineering System initiative
TFVS

AKA.MS/DevOps

GitHub

 

Want to Learn More?

Visit AzureDevOps.Show for show notes and additional episodes.

 

Follow Up with Our Guest:

Lori Lamkin’s LinkedIn

Check out this episode!

Palermo Pamphlet 002 – State machine design

[podcast src=”https://html5-player.libsyn.com/embed/episode/id/7193621/height/300/theme/custom/autoplay/no/autonext/no/thumbnail/yes/preload/no/no_addthis/no/direction/forward/render-playlist/no/custom-color/4169e1/” height=”300″ width=”100%” placement=”top” theme=”custom”]

In this episode, I go over how to design a workflow feature for an entity in a software application. It’s important to separate states from state transitions.

Here are the show notes

Edward Thomson on All Things Git, libgit2, and Azure DevOps – Episode 006

[iframe style=”border:none” src=”//html5-player.libsyn.com/embed/episode/id/7182890/height/100/width//thumbnail/yes/render-playlist/no/theme/custom/tdest_id/800580/custom-color/0072be” height=”100″ width=”100%” scrolling=”no” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen]

This week, your host, Jeffrey Palermo, brings you a recording, live from the Microsoft Ignite conference. He interviews Edward Thomson, the Principal Program Manager for Azure DevOps, the maintainer of libgit2 (the git library), a host of All Things Git (a podcast about Git), and the curator of Developer Tools Weekly (a weekly newsletter with developer tool news). After the tight-knit company Edward was a Software Engineer for Teamprise was acquired by Microsoft, Edward transitioned into the role of Software Engineer with Microsoft, then GitHub briefly, 6 years later. After Github, Edward returned to Microsoft in 2017, this time as their Senior Program Manager and most recently, as their Principal Program Manager (since two months ago).


Edward is a huge mover and shaker in the Git area of Azure DevOps Services. And in this episode, he answers questions that tons of teams continue to ask in the space. He also speaks about his many side projects: libgit2, All Things Git, and Developer Tools Weekly.

 

Topics of Discussion:

[1:11] About today’s episode and guest.

[1:37] Jeffrey welcomes Edward to the podcast.

[2:13] A bit about the Microsoft Ignite conference.

[3:31] How Edward landed the role he’s currently in, with Microsoft.

[6:38] Does the work Edward has been doing with Git, precede him joining Microsoft?

[9:58] A word from Azure DevOps sponsor: Clear Measure.

[10:24] What is libgit2? What does it do?

[13:11] Is there any source code that won’t work with Git?

[16:18] Version control of binary files — where does it all break down?

[18:11] Is there a file size that’s too large for Git?

[20:14] Does Edward recommend checking in your NuGet packages?

[24:12] When did the use of shallow cloning (for repositories) come about?

[26:44] What is Edward and the Azure DevOps team thinking about pushing forward with the Git engine (when Microsoft acquires GitHub)?

[30:03] Edward talks about his weekly newsletter, Developer Tools Weekly.

[31:29] What was in Edward’s weekly newsletter that he sent off just this morning (of recording this podcast).

[34:36] All about Edward’s podcast, All Things Git.

[36:27] Edward answers some FAQs in the Git area of Azure DevOps!

[47:03] Edward’s parting words for listeners on today’s podcast.

 

Mentioned in this Episode:

Microsoft Ignite

Microsoft Ignite’s Twitter
ADP: Buck Hodges episode

ADP: Donovan Brown episode
ADP: Sam Guckenheimer episode

libgit2

All Things Git Podcast

Developer Tools Weekly

Teamprise

Visual Studio

GitHub

Clear Measure (Sponsor)

VFSforGit

GitKraken

Sourcetree

Azure Repos

Game Developers Conference (GDC)

NuGet

Shallow Cloning
Azure Pipelines

dev.azure.com/libgit2

 

Want to Learn More?

Visit AzureDevOps.Show for show notes and additional episodes.

 

Follow Up with Our Guest:

Edward Thomson’s LinkedIn

Edward Thomson’s Twitter

Check out this episode!

Palermo Pamphlet launch – episode 001

[podcast src=”https://html5-player.libsyn.com/embed/episode/id/7156317/height/300/theme/custom/autoplay/no/autonext/no/thumbnail/yes/preload/no/no_addthis/no/direction/forward/render-playlist/no/custom-color/4169e1/” height=”300″ width=”100%” placement=”top” theme=”custom”]

My goal is to teach, inform, and have a little fun. But I want this to provide value for programmers shipping custom software using Microsoft tools. Here is the first episode of the Palermo Pamphlet, which I hope will be a valuable resource to you.

Here are the show notes

Performance tuning an Azure DevOps build configuration

We’ve all seen the culprits that constantly add time to builds.  One might observe that your NPM install or Nuget restore can take several minutes.  I remember back to the times of CC.Net in 2005 when a small application build could happen in 45 seconds, including unit tests.  And 10 minutes as a “thou shall not go over this” threshold.  So we cannot allow NPM or any other step to take minutes.  We have to ferret that out.
The answer is the same as code performance profiling.  Find out where every build is spending the same time doing work that adds no value or doesn’t vary often. Then we cache the result.  For so many builds, these are the culprits that take time but typically aren’t the changes that are being tested from build to build:
  1. Obtaining a build server (when choosing hosted build agents)
  2. Cloning the source
  3. Package restores
  4. Copying/archiving build artifacts
Here are my common solutions for reducing these common culprits (I’d be interested to know how others have eliminated these time sucks)
  1. Use our own Azure VMs as the build agents (running multiple agents on a single VM) – always available at a moments notice
  2. Let Azure Pipelines be a little less aggressive with cleaning source and instead have the build script delete the build directories at the beginning – removes need for a full clone and can just be a pull (works most of the time and requires probably a monthly purge for a clean clone, but saves SOOO much time)
  3. a) retain cloned working tree so that the previous package restore is used for subsequent builds or b) check in packages so that package restores are not necessary for every build
  4. Once builds are working and reliable, only archive the build artifacts that are directly used by the release pipeline (typically the nuget packages that house the application components)

Dave McKinstry on Integrating Azure DevOps and the Culture of DevOps – Episode 005

[iframe style=”border:none” src=”//html5-player.libsyn.com/embed/episode/id/7135111/height/100/width//thumbnail/yes/render-playlist/no/theme/custom/tdest_id/800580/custom-color/0072be” height=”100″ width=”100%” scrolling=”no” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen]

This week, Jeffrey Palermo is joined by his guest, Dave McKinstry. Dave is a Program Manager with the Azure DevOps Services Community Team — connecting with partners and customers, spreading modern practises, and helping developers succeed with DevOps and Azure. Prior to his position at Microsoft, he has been in software services and technical sales for over 18 years. As a consultant, principal consultant, co-owner, and manager, he has always helped people efficiently build better software. He loves what he does as a technologist and enjoys being a part of today’s rapid technology evolution.

 

In this episode, Jeffrey and Dave talk about changes for Dave since the launch of Azure DevOps, what his journey has been like in the DevOps industry, his thoughts on companies looking to integrate Azure DevOps and move forward with automated deployment and reaching the continuous integration mark, how he thinks developers can move forward in terms of quality and Agile 101, and the modern skillset of what a developer and/or system engineer should look like in today’s DevOps environment.

 

Topics of Discussion:

[:39] About today’s guest, Dave McKinstry.

[1:00] Jeffrey welcomes Dave to the podcast.

[1:14] How it has been for Dave since the launch of Azure DevOps.

[1:25] Which side does Dave work on? Azure DevOps Services or Azure DevOps Server?

[2:58] Is Dave going to be at the Ignite event?

[3:10] What has been Dave’s journey through (what we now talk about as) modern practices and shipping software?

[5:25] How is it with Dave’s customers in regards to getting to continuous delivery and the continuous integration mark.

[8:03] The general nature of smaller and larger companies from a business perspective.

[10:03] Dave’s thoughts on the companies integrating Azure DevOps looking into moving forward with automated deployment.

[12:20] A word from Azure DevOps sponsor: Clear Measure.

[12:48] How developers can move forward with quality and Agile 101.

[15:10] How did the culture of DevOps (Dev and Ops) come together?

[17:57] Dave’s take on the relevant tasks of 15 years ago, no longer being relevant in today’s DevOps environment.

[20:28] The modern skillset of DevOps and what developers and system engineers need to be doing in the current DevOps world.

[21:29] About the benefits of Dave’s standing treadmill desk (that he’s currently using during the recording of the podcast)!

[25:40] Dave and Jeffrey’s early schooling, programming, and typing experiences! And the contrast with modern day schooling and the changing world.

[28:59] Dave describes the term ‘machine learning’ and the impact it has.

[33:15] What Dave recommends listeners should do next.

 

Mentioned in this Episode:

Azure DevOps

Azure DevOps Services

Azure DevOps Server

Microsoft Ignite event
Application Lifecycle Management (ALM)
Team Foundation Server (TFS)

CICD

Better Business Bureau

Clear Measure (Sponsor)

Agile 101

Mythical Man-Month: Essays on Software Engineering, by Fred Brooks

IoT

aka.ms/devops

 

Want to Learn More?

Visit AzureDevOps.Show for show notes and additional episodes.

 

Follow Up with Our Guest:

Dave McKinstry’s LinkedIn

Check out this episode!