microservices - iowa state university
TRANSCRIPT
![Page 1: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/1.jpg)
MicroservicesBy Nicholas Pecka
![Page 2: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/2.jpg)
Who am I?My name is Nicholas Pecka and I work for Red Hat
I’m part of the AMQ Streams team that focuses on providing reliable services for the community as well as the company
I assist in the development of a project called Strimzi that aims to streamline the deployment of Apache Kafka on Kubernetes
![Page 3: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/3.jpg)
So let’s start with a question, does anyone know the term Microservices?
![Page 4: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/4.jpg)
Microservices are…Packaged applications with minimal components
Great for DevOps and CI/CDAllows for greater control of resources
Unlike VM’s once a container is not in use the resources can be reclaimedAn answer for transitioning from traditional IT VM infrastructure
![Page 5: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/5.jpg)
So how can one use Microservices?
![Page 6: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/6.jpg)
Well… To understand that we need to know a little about our friend docker
![Page 7: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/7.jpg)
What is Docker?The main method for deploying Microservices
A great way to deploy and test locally Associated with the concept of containers/containerization
Available for most if not all platforms
![Page 8: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/8.jpg)
Great! So we have docker and can deploy any Microservice we want! Well be that as it may (and assuming you have proper
resources) let’s still look at some pro’s and con’s
![Page 9: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/9.jpg)
Docker Pros / consGreat for developers to quickly spin up apps to test withSmall footprint so low attack surface and small storage
Scalability… Ya… goes out the window as more containers are deployedWith how rapidly updates come out, documentation cannot keep up with the frequency
![Page 10: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/10.jpg)
So… Scalability… How do we solve for this issue?
![Page 11: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/11.jpg)
Solving for scalability with DockerDrum roll please… du du du dahhh —> ORCHESTRATION TOOLS
These tools allow for management across many docker containersExamples of these tools
Docker SwarmKubernetes
Openshift … Red Hat :D !!!
![Page 12: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/12.jpg)
Let’s look at one of these tools in particular
![Page 13: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/13.jpg)
Kubernetes! Kubernetes! kuuuubernetessss!
One of the most well known orchestration tool for MicroservicesMany variants evolved from K8s including Openshift!
Solves scalability by introducing the concept of “Pods”Pods are a concept in K8s that bundle a multiple containers into a single entity for simple container management
![Page 14: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/14.jpg)
But wait! There’s more!K8s allows containers to self-heal taking off some of the management overhead (No more having to manually go in and reboot
containers 1 by 1)!Monitoring goodness! K8s provides ability for monitoring with configurations for Prometheus and Grafana
SECURITY!!! K8s enables a more secure environment by defining new DNS zones, establishing namespaces, RBAC and more!
![Page 15: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/15.jpg)
Ok… Microservices… Yay… So what’s your point?
![Page 16: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/16.jpg)
So as stated prior, I work on the AMQ Streams team and Microservices are very important for
our workflow. Especially with our involvement/utilization with Openshift
![Page 17: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/17.jpg)
To get a bit more granular, the tool we work on is Kafka. Kafka is important for
numerous organizations
![Page 18: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/18.jpg)
So quick question… does anyone know what“Kafka” is?
![Page 19: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/19.jpg)
Well first you need to know what a Pub/Sub model is
![Page 20: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/20.jpg)
A Pub/Sub is…Publisher/Subscriber model
This model can ingest multiple data feeds and output 1 to many data feeds to 1 or many consumers
![Page 21: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/21.jpg)
Kafka is…Pub/Sub developed by LinkedIn and then licensed by Apache
This means that it can take in messages from multiple producers and be ingested by multiple consumers
Different from a Queue in that when a message is consumed it is not lost until the retention period has expired
![Page 22: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/22.jpg)
Our team would be most proactive in dealing with customers who want to streamline their
approach to using Kafka in their org whether that be traditional or the Microservice path
![Page 23: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/23.jpg)
What is Kafka used for you ask?
An example would be something like an event streaming platform (ex. A SIEM for instance).
![Page 24: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/24.jpg)
POP QUIZAnyone know what a SIEM is?
![Page 25: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/25.jpg)
SIEM stands for Security Information and Event Management
![Page 26: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/26.jpg)
Gartner Magic Quadrant
![Page 27: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/27.jpg)
So now you all have a bit of an understanding of what Microservices and generally the AMQ Streams team goal is…
How about a demonstration!
![Page 28: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/28.jpg)
DemonstrationDeploy Kafka using Strimzi on Minikube
![Page 29: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/29.jpg)
Deploying Minikube (Windows)Install Minikube
https://minikube.sigs.k8s.io/docs/start/Install VirtualBox - (make sure to restart comp after install)
https://www.virtualbox.org/wiki/DownloadsInstall choco - (run command in powershell as admin)
Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1’))
Install Kubectl – (run command in powershell as admin)choco install kubernetes-cli
In cmd or powershell as admin run “minikube start”
![Page 30: Microservices - Iowa State University](https://reader033.vdocuments.us/reader033/viewer/2022042421/626147c36187350241435dd1/html5/thumbnails/30.jpg)
Access Front-end applications on Minikube
By default you won’t be able to access any front facing apps in minikubeTo fix this, open a new cmd/powershell as admin and run “minikube tunnel”
This will open an external IP for applications using a loadbalancerTraverse to the external IP:Port found from “kubectl get svc”
Also to access a dashboard input “minikube dashboard”