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.

From desktop to the cloud, cutting costs with Virtual kubelet and ACI

93 views

Published on

Breaking up a monolith or switching from client desktop to using the web in scale, require us to think of many factors, like the engineering team and the knowledge that the team already possess, technologies that exist, how to build the infrastructure right and much more. How can we use Kubernetes with Virtual Kubelet to cut costs and use the right service for the workload, whether it is a burst workload or a steady one

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

From desktop to the cloud, cutting costs with Virtual kubelet and ACI

  1. 1. From desktop to the web with the cloud  @ S V E N R U P P E R T 5 S T O R Y A N D P H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N cutting costs with Virtual Kubelet and ACI @ A D I P O L A K
  2. 2. A D I P O L A K Developer Advocate @ Microsoft M A C H I N E L E A R N I N G D I S T R I B U T E D S Y S T E M S B I G D ATA S V E N R U P P E R T Developer Advocate @ Vaadin C O D I N G J AVA S I N C E 1 9 9 6 C O N S U LT I N G W O R L D W I D E D I S T R I B U T E D S Y S T E M S S I N C E 2 0 0 2 J O I N E D VA A D I N 2 0 1 7 5
  3. 3. S V E N R U P P E R T Developer Advocate @ Vaadin 5 C O D I N G J AVA S I N C E 1 9 9 6 C O N S U LT I N G W O R L D W I D E Public Sector: Military / Government Private Sector: Automotive / Aerospace / SMB / NonProfit / NonGov: World Bank / UN / YPARD / CGIAR D I S T R I B U T E D S Y S T E M S S I N C E 2 0 0 2 J O I N E D VA A D I N 2 0 1 7
  4. 4. I N T R O T H E B I R D E Y E V I E W
  5. 5. 5 @SvenRuppertBird-Eye-View Desktop ServerlessUI Development Environment MicroServices
  6. 6. 6 @SvenRuppertBird-Eye-View
  7. 7. 7 @SvenRuppertBird-Eye-View Serverside UI How to use one dev environment? API pure Java ?
  8. 8. 8 @SvenRuppertBird-Eye-View ServersideUI JSONAPI API Modules API - Core Java UI - Vaadin Serverside
  9. 9. 9 @SvenRuppertBird-Eye-View Desktop WEB Core Java JavaScript HTML5 CSS !=
  10. 10. 10 @SvenRuppertWeb-Tech-Stack is complex?
  11. 11. 11 @SvenRuppertWill you get what you are expecting?
  12. 12. W H Y ? W H Y S H O U L D Y O U G O T O T H E C L O U D ?
  13. 13. 13 @SvenRuppertFrom Desktop app to Tech Stack Every step should be a plus for the project After every step it must be possible to stop for a while Plan to run it in hybrid mode - Desktop/Web Don’t forget the TDD cycle and DX
  14. 14. T H E T E A M W H Y S H O U L D T H E O L D T E A M S U P P O R T I T ?
  15. 15. A senior developer is not bad :-)
  16. 16. Start Learning again for example: functional add a new Language focus on a new paradigm but not everyone want to learn or better…. some are learning faster reactive this sometimes leads to ….. reactions….
  17. 17. running away
  18. 18. expecting something
  19. 19. or only feeling themself just too old
  20. 20. you have to deal with this if you don´t want to loose them make them happy again How we solved this?
  21. 21. How to motivate your team?
  22. 22. T H E W AY T O G O W I T H J A V A T H E E V O L U T I O N
  23. 23. 23 @SvenRuppertThe way to go
  24. 24. JDK Release Train OpenJDK ZuluJDK OracleJDK IBMJDK GraalVM 8/9/10/11/12 8/9/10/11/12 8/11/17/23 8/9/?/? 8/?/? @SvenRuppert
  25. 25. 25 @SvenRuppertThe way to go Desktop transform to functional prepare to reactive mutation testing coverage extract functions migrate UI Web Serverside Java8 - LTS Java8 - LTS Java8 - LTS Java11 - LTS Java11 - LTS
  26. 26. The way to go Desktop transform to functional prepare to reactive mutation testing coverage extract functions migrate UI Web Serverless Time Java8 Java8 Java8 Java11 Java11 Java10 Java11 Java10 Java11 Java11 Java12 Java12 Java13 Java12 Java13 OpenJDK OracleJDK ZuluJDK @SvenRuppert
  27. 27. DemoCode 27 @SvenRuppert
  28. 28. DemoCode 28 @SvenRuppertSwing App
  29. 29. DemoCode 29 @SvenRuppertSwing App
  30. 30. DemoCode 30 @SvenRuppertVaadin App
  31. 31. DemoCode 31 @SvenRuppertVaadin App
  32. 32. DemoCode 32 @SvenRuppert
  33. 33. From Swing to Vaadin 33 @SvenRuppert TextFieldJTextField JComboBox Combobox<String> 5 S T O R Y A N D P H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N
  34. 34. Hybrid App - choose the right modules 34 @SvenRuppert Shared - Core Serverside Desktop Web Docker Docker Shared - UI
  35. 35. Use the right tools at the right time 35 @SvenRuppert
  36. 36. Docker Part One 36 @SvenRuppert Run locale inside Docker
  37. 37. Docker Part One 37 @SvenRuppert Dockerfile
  38. 38. Docker Part One 38 @SvenRuppert Run the Image locale
  39. 39. Understand your Tech-Stack 39 @SvenRuppert Make sure your tech-stack is not fighting back
  40. 40. please, follow me ;-) 40 @SvenRuppert @SvenRuppert The basics are done…. How to scale ?
  41. 41. /Learn alert https://aka.ms/start-with-the-cloud Introduction to Cloud basics, everything you need to know to get started Azure
  42. 42. Java Cloud Native on Azure – Landscape IaaS – Linux Distributions Multi-Cloud Platforms Tools DevOps Cloud Automation Kubernetes & Containers OSS Foundations JVMs, Frameworks, Runtimes Azure Services CosmosDB Service Fabric App Service Container Instances Container Registry Kubernetes Service Serverless Functions App Insights Azure DevOps SQL Service Event Grid Event Hub Service Bus Active Directory Microsoft SDKs for Java Over 50+ services covered
  43. 43. On Microsoft Azure, over 50% of workloads are Linux-based. And over 60,000 patents now open source under OIN.
  44. 44. What is not covered today Compliance Containers secure access Namespaces configuration CI/CD Health management Log collection and analysis
  45. 45. What is covered • Container Instances • Container Registry • Azure Kubernetes Service • Virtual Kubelet
  46. 46. Migration - do it Gradually with Flexibility in mind
  47. 47. Decision (p1, p2, p3, … ) = Yes | No p1 = required guarantees p2 = existing skills and resources p3 = acceptable risks pN = … Decision making
  48. 48. Decision Making Variables • Ability to afford resources/time to troubleshoot issues • Requirement to be independent from a cloud provider or environment • Consistency/performance/availability/other guarantees • Readiness to accept possible risks … many more For example:
  49. 49. Decision Making Best Practices ? What are downsides and challenges of your current environment for running your system ? What problems will switch to distributed system solve ? What new problems will it create ? How big will increase/decrease in costs be ? What team or process changes will need to happen
  50. 50. Decisions, decisions.. Web App services Azure Kubernetes services Azure container instances Service fabric ...
  51. 51. Distributed System
  52. 52. Motivation and Challenges 1 - Availability 2 - Scalability 3 - Reliability 4 - Transparency
  53. 53. Burst vs Steady Workloads
  54. 54. /Learn alert https://aka.ms/intro-to-aci Learn how to create your container instances service with docker Azure container instances (ACI)
  55. 55. How to manage distributed systems ? • Multiple machines (VMs) • Containers • Network • Security • Deployment
  56. 56. Why Kubernetes Can run anywhere Distributed, scalable microservices Container orchestration
  57. 57. thenewstack.io
  58. 58. thenewstack.io
  59. 59. @bketelsen Reconciliation Desired State Actual State
  60. 60. @bketelsen Reconciliation Node 1 Backend-server Node 2 Node 3 backend-server … kind: Deployment … spec: nodeSelector: beta.kubernetes.io/os: linux kubernetes.io/role: agent type: virtual-kubelet containers: - name: kotlin-container image: kotlinspringdemo.azurecr.io/backend ports: - containerPort: 80 imagePullSecrets: - name: acr-auth-docker tolerations: - key: virtual-kubelet.io/provider operator: Equal value: azure effect: NoSchedule
  61. 61. /Learn alert https://aka.ms/intro-to-acr Learn how to create your container instances service with docker Azure container Registry (ACR)
  62. 62. /Docs alert aka.ms/container-security ACI security
  63. 63. ACI + AKS + ACRVirtual Node
  64. 64. Virtual Kubelet
  65. 65. Kubernetes API Kubelet Node Kubelet Node Linux ACI connector Virtual Kubelet Kubernetes Cluster ACI Linux container Linux container @AdiPolak Virtual Kubelet and Virtual Nodes Connector to serverless cloud container platforms
  66. 66. … kind: Deployment … spec: nodeSelector: beta.kubernetes.io/os: linux kubernetes.io/role: agent type: virtual-kubelet containers: - name: kotlin-container image: ports: - containerPort: 80 imagePullSecrets: - name: acr-auth-docker tolerations: - key: virtual-kubelet.io/provider operator: Equal value: azure effect: NoSchedule Define Virtual Kubelet K8s yaml * Node selector type * ACR path * Pull secret * Tolerance for pod selection
  67. 67. Demo Virtual kubelet – how it looks like with kubctl
  68. 68. Learn More ! aka.ms/start-with-the-cloud aka.ms/intro-to-Kubernetes aka.ms/intro-to-aci aka.ms/intro-to-acr aka.ms/security_concepts_for_aks aka.ms/enable_ssl_in_aci vaadin.com @SvenRuppert @AdiPolak

×