Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dockerizing your legacy apps

6 views

Published on

The hype around Docker focuses on distributed microservices, but what about those legacy applications you have? You know the ones…monoliths running on hand-crafted servers, maybe using local storage, maybe running on Windows. You don’t have the time or money to completely re-architect them, so are you stuck on the sidelines, unable to use containers? Absoutely not! In fact, you might benefit from containers more than anyone else!

In this talk, I’ll look at ways that teams can benefit from using Docker on legacy server-hosted applications with no architecture — or even code! — changes.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Dockerizing your legacy apps

  1. 1. Dockerizing Your Legacy Apps Darryl Shpak iQmetrix
  2. 2. What’s a legacy app? • Probably 5+ years old • Maintained by someone other than the original author • Uses “old” technology or tools • Can’t be changed confidently • Making money! • …But generally kind of a headache
  3. 3. What’s Docker? • Containers! • “Lightweight VMs” • All the cool kids are using it
  4. 4. The standard Docker model • Lightweight microservices… • …that are stateless • …running on Linux • …in the cloud • …continuously deployed • Sounds great!
  5. 5. Legacy app • A monolith… • …with session state • …running on Windows • …in a datacentre • …deployed manually • “We need to re-write it!”
  6. 6. Why even consider Docker? • Reproducible runtime environment • Well-defined dependencies • Portable deployment • Options for easy scaling (e.g. Kubernetes)
  7. 7. Can we use Docker with our crusty old monolith?
  8. 8. Should we use Docker with our crusty old monolith?
  9. 9. How easy is it for you to… • …Install a new release on an existing server? • …Get a new server ready to host your application? • …Build your application? • …Set up a new build machine? • …Run a nightly build on a dev/QA laptop for testing/debugging?
  10. 10. The pitch… By using Docker, we can make our legacy application easier to manage and deploy, without requiring any code changes.
  11. 11. The toolbox (Windows and .NET Framework)
  12. 12. Docker Desktop • Docker engine • Command line • GUI
  13. 13. Docker Engine - Enterprise • Docker engine • Command line • No GUI • Free on Windows (just hard to find)
  14. 14. Docker Compose • Describes how to run a container • Network ports • Memory limits • Disk volumes • Auto-restart • Most of this can be done with docker command-line options
  15. 15. Windows base images • mcr.microsoft.com/windows/servercore • mcr.microsoft.com/windows/nanoserver • mcr.microsoft.com/windows • mcr.microsoft.com/windows/servercore/iis • mcr.microsoft.com/dotnet/framework/runtime • mcr.microsoft.com/dotnet/framework/aspnet • mcr.microsoft.com/dotnet/framework/wcf • mcr.microsoft.com/dotnet/framework/sdk
  16. 16. Putting a legacy app into Docker
  17. 17. Build an image using existing processes• Build  artifact  deploy • Build  artifact  Docker image • Use existing deploy scripts or how-to guides • Experiment interactively docker run -it --rm -p 8000:80 --mount type=bind,src=c:build,dst=c:build --entrypoint powershell.exe mcr.microsoft.com/windows/servercore/iis
  18. 18. Possible roadblocks • No GUI for configuration • No desktop • Windows user authentication • Networking • Memory
  19. 19. Benefits • Deploy on any server: docker-compose up • Run on any dev/QA machine
  20. 20. That seems like a big change
  21. 21. Builds • Legacy apps  Legacy builds • Unusual or old tooling • Assumptions about machine setup • Docker to the rescue!
  22. 22. Where can all this take us?
  23. 23. The future • Easier deployments • Better testing • App portability • Freedom to revamp build process • Kubernetes
  24. 24. Questions? Darryl Shpak darryl@shpak.ca @efenesne

×