Bienvenue! Welcome!
My goal is to help you work faster.
I must speak and teach until I hear 10 people say, "That thing you taught me? I used it! And it saved me time!"
(Ahem ... although maybe blogging slower than I'd hoped. Ugh, coders' repetitive stress injury.)
So check out the tutorials. Play with code. Tell me about your triumphs.
Provisioning Azure DevOps Service Connections that let ADO Release Pipelines leverage Azure AD Service Principals for sensitive CI/CD tasks
17 Mar 2023
We’re almost ready to build an Azure DevOps (“ADO”) Pipeline that can release our tiny web server we asked it to build for us onto our rented 2 webserver hosts (one “nonproduction” and one “production”).
Although we created an Azure Active Directory “(AAD)” service principal that’s authorized to work against our webserver hosts, Azure DevOps doesn’t yet know how to use our Service Principal.
In this article, we’ll set up a cross-reference (known as a “Service Connection”) from ADO project to our AAD Service Principal. Once we’ve done so, we’ll be able to wrap up this series by constructing just a little more ADO Pipeline goodness (auto-updating our live websites every time we update our Git-tracked source code). We’re almost there!
Continue ReadingProvisioning Azure AD Service Principals that can deploy built webapps onto your Azure App Service resources
16 Mar 2023
In this series, we’ve written the world’s tiniest webserver, added unit tests to its codebase, told Azure DevOps (“ADO”) Pipelines to auto-build a runnable web server for us each time we update our Git-tracked source code, and rented 2 webserver hosts from Microsoft Azure’s public cloud (one “nonproduction” and one “production”).
Every time ADO builds our source code into a runnable web server, we’ll want it to deploy the “built” codebase onto the hosts we rented. Our ADO automation will need to prove it’s not an evil hacker trying to take over our web hosts. Therefore, we need to:
- Create an Azure Active Directory (“AAD”) identity ADO can use to prove that it is who it says it is.
- To do so, we’ll create a pair of AAD resource instances – one “Application Registration” and one “Service Principal.”
- Create an Azure RBAC role assignment authorizing the new AAD service principal to deploy code onto our web hosts.
- (We’ll worry about telling ADO how to use the new AAD service principal in a subsequent article.)
Provisioning Azure App Services to host your Hello World webapp
15 Mar 2023
Thus far in this series, we’ve written the world’s tiniest webserver, added unit tests to its codebase, told Azure DevOps (“ADO”) Pipelines to auto-build a runnable web server for us each time we update our Git-tracked source code, and told ADO to fail the build process if the unit tests don’t pass.
Before we can ask friends to visit our new website, we’ll need to rent a webserver host from Microsoft Azure’s public cloud.
Azure App Service’s (“AAS’s”) Web Apps service (“AASWA”) is a great choice for a simple web server. Let’s rent ourselves two such resource instances:
Continue ReadingProvisioning an Azure Resource Group
14 Mar 2023
Before we rent a web server from Microsoft Azure’s cloud, we’ll need set up a home for our web server in Azure called a “Resource Group.”
Continue ReadingLogging your command line into Azure
13 Mar 2023
To rent resources from Microsoft Azure’s public cloud, we need to be logged into it.
Continue ReadingFailing Azure DevOps Pipeline builds if unit tests fail
12 Mar 2023
- We’ve built the world’s tiniest webserver.
- We’ve added unit tests that can help us predict whether it would run “correctly.”
- We’ve told Azure DevOps (“ADO”) Pipelines to auto-build a runnable web server for us each time we update Git-tracked source code.
- How about having Azure DevOps fail the auto-build if our unit tests fail?
Let’s do it!
See the sample codebase on GitHub.
Continue ReadingMaking Azure DevOps Pipelines build a Hello World webapp from Git-tracked source code changes
11 Mar 2023
Now that we know how to code and build a “runtime” for a tiny webserver, thanks to this series’s kickoff article, let’s make someone else’s computer in the cloud do that for us instead.
We’ll put a copy of our source code into Azure DevOps (“ADO”) Repositories (“repos”) and track changes to the source code using the Git version control protocol.
We’ll ask ADO’s Pipelines feature to keep an eye on the “main
” branch of our source code’s repository. We’ll instruct it to build a fresh webserver “runtime” out of the latest copy of our source code every time we edit our source code.
See the sample codebase on GitHub.
Continue ReadingProtecting Git branches in Azure DevOps repositories
10 Mar 2023
Before – or instantly after – you first store any given codebase (like a tiny webserver) in Azure DevOps (“ADO”) Repositories (“repos”), I recommend protecting certain branches like “main
,” protecting them from being directly edited.
Locally unit-testing source code for a Node.js Hello World webapp
09 Mar 2023
Let’s add some unit tests to the tiny webserver we built and ran this series’s kickoff article.
See the sample codebase on GitHub.
Continue ReadingSource code that builds locally into a Node.js Hello World webapp
08 Mar 2023
Let’s take a look at the smallest Node.js website you can easily run on your local computer.
See the sample codebase on GitHub.
Continue Reading