Building a Deployment Pipeline for ASP.NET Core with Docker
Thanks to containers and images, Docker makes it incredibly easy to build out a complex deployment pipeline. This course will take you from development through to production with your ASP.NET applications.
What you'll learn
Automating a deployment pipeline was feasible pre-Docker, but was a hassle. Now thanks to containers and images, it's incredibly easy to spin up pipelines. In this course, Building a Deployment Pipeline for ASP.NET Core with Docker, you'll setup a pipeline to build, unit test, and package up an ASP.NET Core app into an image. The pipeline will be triggered every time someone commits to version control. First, you'll learn how the app image is pushed to a private registry and used to perform integration testing with multi-container tests, including a web site, email server, and integration test runner. Next, if all testing passes, you'll discover how the pipeline auto deploys to a demo environment, so anyone can test out the latest version of your app in a matter of minutes after a line of code is checked in. Then, you'll dive into how the pipeline can manually trigger deployment to production. Finally, you'll explore containerizing performance testing. By the end of this course, you'll have a pipeline you can deploy for your own applications.
Table of contents
- Pre-req Recap - Docker Images and Containers for ASP.NET Core 3m
- Pipeline Overview 4m
- Accessing the Files for the Start of This Course 3m
- Time for CI 1m
- Creating a Private Registry 3m
- Aliasing the Private Registry in /etc/hosts 2m
- Pushing an Image to the Private Registry 6m
- Creating a TeamCity Cluster with Docker-compose 3m
- TeamCity Setup 2m
- Big Picture Intro 1m
- Creating a Unit Tests Project 4m
- Testing on the Host 2m
- Starting a Dockerfile for Multiple Projects - Package Restore 6m
- List Files to Inspect What Is Copied into the Image 2m
- Copying in Source 4m
- Running Tests in the Build Stage of the Dockerfile 1m
- Publishing to the Runtime Optimized Image 3m
- Watch Disk Usage - Clean up Images 1m
- Big Picture Intro 1m
- Testing Docker on the TeamCity Agent 2m
- Building the Image with TeamCity 4m
- TeamCity Also Has Docker Build Steps 1m
- Set up TeamCity to Push CI Images to the Registry 2m
- Images Are Not Created on Test Failures 2m
- Rich Test Reporting from xUnit to TeamCity 3m
- Image Push Resumes When Tests Are Fixed 2m
- Pulling and Running Multiple Versions of the App in Seconds 2m
- Dreaming of a Deployment Pipeline 5m
- Creating an Email Integration Test 5m
- Simplifying Exploratory Testing with Docker-compose 5m
- Exploratory Testing Alone Is Markedly Improved with Containers 2m
- Writing an Integration Testing Image 4m
- Building the Image and Running It 5m
- Composing Integration Tests 2m
- Be Mindful of Stateful Containers with Integration Tests 1m
- Stepping Through Distributed Logs with Docker-compose 2m
- Stopping the Services When the Tests Complete 3m
- Cleanup with Docker-compose Down 2m
- Force Recreate Containers 1m
- Avoid Published Port Conflicts 3m
- Always Build the Integration Testing Image 4m
- Production Stacks Often Differ from Testing 1m
- Adding a Production Deployment to the Pipeline 2m
- Watching a Change Flow Through the Pipeline 3m
- Rolling Back to a Previous Build 2m
- Scaling the App Is a Breeze 2m
- Code for Mail Server Configuration 4m
- Setting MailServerConfig When Starting App 3m
- Configuration via Environment Variables Is Easy to Reason About 3m
- Letting Docker Manage Config Files with Docker Config 6m
- Adding in a Reverse Proxy 3m
- Adding a NGINX Service 2m
- Configuring NGINX to Proxy Requests with Docker Config Files 4m
- Hosting Resources 2m
- Consider Adding Health Checks in Production 2m
- Explaining the Perf Testing Environment 5m
- Running the Performance Test 2m
- Just Change Tags to Compare ASP.NET Core 2.0 Versus 1.1 2m
- Impact of Disabling MvcRazorCompileOnPublish 3m
- Inspecting Intermediate Stages in a Multi-stage Build 6m
- The Runtime Package Store Reduces the Publish Folder Size 5m
- The Runtime Package Store Impacts Speed 4m
- What Happens When the Content Root Is Wrong? 3m
- ASPNETCORE_ENVIRONMENT to Enable Environment Specific Behavior 3m
- Building a Windows Container Image Is Slower 7m
- Windows Container Images Are Almost 1GB Bigger 1m
- Windows Docker-compose Workaround for HNS Failed with Error 3m
- What Next? 3m