Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Running 30-year old software as a cloud native SaaS solution in Azure with Docker and Kubernetes

Running 30-year old software as a cloud native SaaS solution in Azure with Docker and Kubernetes

Docker makes it easy to containerize existing applications and run them on arbitrary machines. Kubernetes takes it to the next level by offering fast and easy container orchestration at runtime. Containerization has been common practice in the Linux world for years, but lately developers on the Microsoft stack have jumped on the Docker bandwagon too. That is all nice and dandy for .NET Core applications that are easily deployable in Docker on Linux, but what if you have 30 year old Win32 and .NET software that has to be cloudified and run as a Software as a Service offering on demand?

In this presentation I’ll share the journey of my team that lead us from hope to desperation to glory in turning an on premise Client-Server application into a full blown cloud native service, with some ancient pieces still in there. It surely can be done!

Roy Cornelissen

November 20, 2019
Tweet

More Decks by Roy Cornelissen

Other Decks in Programming

Transcript

  1. Running 30-Year-Old Software as a Cloud Native SaaS Solution with

    Docker and Kubernetes on Azure Roy Cornelissen Xpirit @roycornelissen Level: Introductory/Intermediate
  2. K-SIM CONNECT The ecosystem for connect the users, the data

    and the simulators to create an environment for generating new possibilities and new business CONFIGURATION Seamless integration of site configuration tools for creation, deployment and management. SIMULATORS Bringing the on premise simulators and cloud based simulators together to create seamless virtual simulators and simulator networks ROLE BASED ACCESS Acquiring and managing users and partners through ecosystem registration and login. Designating specific content, forms, and automated workflows for unique users based on roles DEVELOPER WORKFLOW Creating a community of certified K-Sim developers for content and features. Providing tools, services in a tailored automated workflow for accelerating content creation. SUPPORT Connecting user, simulators and data to create more efficient support workflows for user self service and for Kongsberg customer support team. SOFTWARE UPDATES K-Sim software supply chain automates the software update on simulators in a DevOps style controlled by the user. DATA Handling exercises, configurations and other simulation related data.
  3. Å være pling i bollen Containers: at first I was

    a ping in the bowl @roycornelissen
  4. CHALLENGES… How do you containerize: • Low level Win32 API

    calls with C++ • Use of arcane system constructs like /etc/services • Dynamic ports allocated by simulator middleware • Use of OLE32 dll’s • Registry settings • …
  5. OUR WINDOWS CONTAINERS mcr.microsoft.com/windows/servercore vcpp simulator scc-ii Base image: mcr.microsoft.com/windows/servercore:1809

    Installs VC++ Runtimes & prerequisites Installs generic Neptune simulator software Installs engine room specific software (TPP, SCC-II, etc.) tpp …
  6. HOSTING USING CLUSTER ORCHESTRATORS Largely cloud provider-agnostic Ability to host

    almost anywhere: on-premises or cloud provider of choice Cluster Fabric High Availability Hyper-Scale Hybrid Operations High Density Rolling Upgrades Stateful services Low Latency Fast startup & shutdown Container Orchestration & lifecycle management Replication & Failover Simple programming models Load balancing Self-healing Data Partitioning Automated Rollback Health Monitoring Placement Constraints Microservices Mesos DC/OS Docker Swarm Google Kubernetes Azure Service Fabric
  7. KUBERNETES: THE ORCHESTRATOR OF CHOICE Service 1 Simulator Pod 1

    Service N Simulator Pod n Student 1 Student n
  8. public IP KUBERNETES: THE ORCHESTRATOR OF CHOICE Service 1 <LoadBalancer>

    Simulator Pod 1 Service N <LoadBalancer> Simulator Pod n Student 1 Student n public IP
  9. public IP KUBERNETES: THE ORCHESTRATOR OF CHOICE Service 1 Simulator

    Pod 1 Service n Simulator Pod n Student 1 Student n ?
  10. public IP KUBERNETES: THE ORCHESTRATOR OF CHOICE Ingress Controller Service

    1 Simulator Pod 1 Service n Simulator Pod n Ingress 1 Ingress n Student 1 Student n /abc /xyz
  11. public IP KUBERNETES: THE ORCHESTRATOR OF CHOICE Ingress Controller Scheduler

    Service 1 Simulator Pod 1 Service n Simulator Pod n Ingress 1 Ingress n Student 1 Student n /abc /xyz
  12. public IP KUBERNETES: THE ORCHESTRATOR OF CHOICE Ingress Controller Scheduler

    Service 1 Simulator Pod 1 Service n Simulator Pod n Ingress 1 Ingress n SignalR Hub Connect Portal Student 1 Student n Launch simulator Create Pod Create service Create ingress Return URL Launch client & connect
  13. SOME CAVEATS • Windows containers community is small • Windows

    support in Kubernetes was not there yet (2017) • AKS did not (yet) support Windows Containers • Windows images are were HUGE • Windows container images are tied to Window Server version • Kubernetes services run as Linux containers
  14. Windows node pool Linux node pool A MIXED CLUSTER Master

    Node 1.1 Node 2.1 Node 2.2 Node 1.2 Kubernetes cluster
  15. Windows node pool Linux node pool A MIXED CLUSTER Master

    Node 1.1 Node 2.1 Node 2.2 Node 1.2 Kubernetes cluster
  16. LEARNINGS • The ancient stuff works surprisingly well in Windows

    Containers • Windows containers in Kubernetes were “experimental” • Setting up a mixed cluster was even more “experimental” • Lots and lots of issues with external DNS from Windows pods • Sometimes a Pod just doesn’t start • Sometimes a Pod just “breaks” • Sometimes the disks on a node were full (image size) • Sometimes nodes just “drop out”
  17. RECENT DEVELOPMENTS • Windows containers have been a lot more

    stable the past few months • Windows server 1809 images supposed to be much smaller • Since 1.14.0 (25-03) Kubernetes officially supports Windows nodes • Since 0.33.1 (26-03) AKS engine supports Kubernetes 1.14.0 • Support for Windows nodes in AKS have become available
  18. WINDOWS SERVER IMAGE SIZE 6560 4990 1400 341 364 94

    0 1000 2000 3000 4000 5000 6000 7000 Windows 1709 Windows 1803 Windows 1809* Windows server core Nano server
  19. WINDOWS SERVER 1809 VS LINUX IMAGES 94 129 101 85,8

    1,2 0 20 40 60 80 100 120 140 Windows Nano Server Debian - Jessie Debian - Stretch Ubuntu Busybox Image size
  20. Windows node pool Linux node pool AKS + VIRTUAL KUBELET

    + ACI Master AKS cluster Azure Container Instances Virtual Kubelet
  21. AKS + VIRTUAL KUBELET + ACI • ACI Pay as

    you go pricing model fits perfectly with our business case • AKS does not support multiple node pools (yet) • AKS does not support windows node pools (yet) • Startup time on ACI is too slow (~10 minutes) • Our images MUST match the supported ACI Windows server version
  22. TAKEAWAYS •Do you really need Kubernetes? •Use Linux containers (if

    you can) •If you really need Windows, use Nano Server 1809 (if you can) •In very specific scenarios, use Windows Server Core 1809 •Wait for full AKS support for Windows (if you can)
  23. Å være midt i smørøyet To be in the middle

    of the butter melting in the porridge @roycornelissen