Skip to main content

Automating Production Environments for Quality

  • Chapter
  • First Online:
DevSecOps for .NET Core
  • 892 Accesses

Abstract

Previous chapters covered the initial CI phases of the DevOps cycle. A complete DevOps cycle incorporates the production environment as well. From security scanning, to runtime selection, process warmup, continuous monitoring, and protection, DevSecOps takes care of everything. A DevOps engineer must manage the details of the production environment as well as the development cycles. It is important for a secure application to run in a secure environment. If the environment is compromised, your secure application will end up being tampered with (as in the case of an HTTP hosted web application) or taken over completely by an attacker. In this chapter, I discuss security and performance from the point of view of the hosting platform. The term “hosting platform” applies to the environment where your solutions run. A hosting platform for a .NET Core solution is not always a cloud environment, or your go-to web hosting provider. A .NET Core solution can run on a mobile application (as in the case of a Xamarin.Forms application) or it can run on a user's device (as in the case of a desktop application). I discuss the common practices that can help you protect your applications and resources.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Sometimes called an SRE, and sometimes called a Software Engineer (I used to work with a company where we had to deal with production-related matters as well).

  2. 2.

    There are some obvious questions all the times of course, such as, deploying as APK on Google Play Store or self-publishing as online multiplayer game Fortnite did it. I am not talking about those areas.

  3. 3.

    Direct deployment does not mean a monolith application. It can mean that the application is targeting other runtimes and microservices frameworks such as Service Fabric. Check out the details of Service Fabric at https://azure.microsoft.com/en-us/services/service-fabric/. Remember that Docker is easier to learn, develop, and deploy against.

  4. 4.

    Git supports hooks for its own events and actions. Learn about Git Hooks at https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks. You can also explore online articles and hands-on guides to learn more about this.

  5. 5.

    Several other examples of my Docker and Kubernetes articles use the Docker image afzaalahmadzeeshan/express-nodejs:latest. It is a lightweight Docker image that showcases basic Docker concepts, such as networking, port forwarding, and scaling.

  6. 6.

    Microsoft Azure will always request usernames/passwords or other session authentication information before giving access. An attacker with a known web address might be prepared with a username/password as well. They might have forged the credentials via social engineering or via scraping the data from your systems.

  7. 7.

    Learn more about Azure Front Door at https://azure.microsoft.com/en-gb/services/frontdoor/.

  8. 8.

    Read their community blog post at https://community.letsencrypt.org/t/revoking-certain-certificates-on-march-4/114864.

  9. 9.

    Yes, that was a reference to the Blue Screen of Death in Microsoft Windows, and I hope you got the reference. These two screens have a similar purpose and they show an error that you likely do not have a solution to.

  10. 10.

    Check out the documentation about Terraform at https://www.terraform.io/docs/state/sensitive-data.html.

  11. 11.

    Caching plays a vital role in the systems designs; you should investigate different caching aspects for .NET Core, ranging from Redis, Memcached, NCache, and so on. You should determine which caching solution can help you decrease the response time for your applications.

  12. 12.

    I am using GitLab’s open source platform to host my official website (https://afzaalahmadzeeshan.com/) and anyone can read the source code as well as the pipelines I wrote (https://gitlab.com/afzaal-ahmad-zeeshan-dotcom/website).

  13. 13.

    Netflix developed this tool to notoriously force their developers to write the software in a chaos-friendly way. Their engineers practice the random failure at production, and they write the software that must tolerate the system failure. Learn more about this tool on their GitHub repository at https://github.com/Netflix/chaosmonkey.

  14. 14.

    Read more about the exception handling in ASP.NET Core on the Microsoft documentation for ASP.NET Core at https://docs.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-3.1.

  15. 15.

    Error Logging Modules and Handlers; see https://elmah.github.io/.

  16. 16.

    Read about the Kubernetes rollback options at https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-back-a-deployment.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Afzaal Ahmad Zeeshan

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Zeeshan, A.A. (2020). Automating Production Environments for Quality. In: DevSecOps for .NET Core. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5850-7_6

Download citation

Publish with us

Policies and ethics