31
Microservices By Nicholas Pecka

Microservices - Iowa State University

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microservices - Iowa State University

MicroservicesBy Nicholas Pecka

Page 2: Microservices - Iowa State University

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

So let’s start with a question, does anyone know the term Microservices?

Page 4: Microservices - Iowa State University

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

So how can one use Microservices?

Page 6: Microservices - Iowa State University

Well… To understand that we need to know a little about our friend docker

Page 7: Microservices - Iowa State University

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

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

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

So… Scalability… How do we solve for this issue?

Page 11: Microservices - Iowa State University

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

Let’s look at one of these tools in particular

Page 13: Microservices - Iowa State University

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

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

Ok… Microservices… Yay… So what’s your point?

Page 16: Microservices - Iowa State University

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

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

So quick question… does anyone know what“Kafka” is?

Page 19: Microservices - Iowa State University

Well first you need to know what a Pub/Sub model is

Page 20: Microservices - Iowa State University

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

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

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

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

POP QUIZAnyone know what a SIEM is?

Page 25: Microservices - Iowa State University

SIEM stands for Security Information and Event Management

Page 26: Microservices - Iowa State University

Gartner Magic Quadrant

Page 27: Microservices - Iowa State University

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

DemonstrationDeploy Kafka using Strimzi on Minikube

Page 29: Microservices - Iowa State University

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

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”