Reader small image

You're reading from  Hands-On Kubernetes on Azure

Product typeBook
Published inMar 2019
PublisherPackt
ISBN-139781789536102
Edition1st Edition
Right arrow
Authors (2):
Shivakumar Gopalakrishnan
Shivakumar Gopalakrishnan
author image
Shivakumar Gopalakrishnan

Shivakumar Gopalakrishnan is DevOps architect at Varian Medical Systems. He has introduced Docker, Kubernetes, and other cloud-native tools to Varian product development to enable "Everything as Code". He has years of software development experience in a wide variety of fields, including networking, storage, medical imaging, and currently, DevOps. He has worked to develop scalable storage appliances specifically tuned for medical imaging needs and has helped architect cloud-native solutions for delivering modular AngularJS applications backed by microservices. He has spoken at multiple events on incorporating AI and machine learning in DevOps to enable a culture of learning in large enterprises. He has helped teams in highly regulated large medical enterprises adopt modern agile/DevOps methodologies, including the "You build it, you run it" model. He has defined and leads the implementation of a DevOps roadmap that transforms traditional teams to teams that seamlessly adopt security- and quality-first approaches using CI/CD tools. He holds a bachelor of engineering degree from College of Engineering, Guindy, and a Master of Science degree from University of Maryland, College Park.
Read more about Shivakumar Gopalakrishnan

Gunther Lenz
Gunther Lenz
author image
Gunther Lenz

Gunther Lenz is senior director of the technology office at Varian. He is an innovative software R&D leader, architect, MBA, published author, public speaker, and strategic technology visionary with more than 20 years of experience. He has a proven track record of successfully leading large, innovative, and transformational software development and DevOps teams of more than 50 people, with a focus on continuous improvement. He has defined and lead distributed teams throughout the entire software product lifecycle by leveraging groundbreaking processes, tools, and technologies such as the cloud, DevOps, lean/agile, microservices architecture, digital transformation, software platforms, AI, and distributed machine learning. He was awarded Microsoft Most Valuable Professional for Software Architecture (2005-2008). Gunther has published two books, .NET – A Complete Development Cycle and Practical Software Factories in .NET.
Read more about Gunther Lenz

View More author details
Right arrow

Connecting to Other Azure Services (Event Hub)

Event-based integration is a key pattern for implementing microservices. In this chapter, you will learn how to how to implement microservices on AKS, including how to use Event Hub for loosely coupled integration between the applications. The securing of the communications between microservices will also be introduced to the reader. Microservices, when implemented with the correct organization/support in place, help businesses develop a growth mindset in their teams. DevOps maturity is crucial in making the digital transformation of companies a reality. You, as a developer and/or an engineer responsible for site reliability, will learn how to deploy them, and also how to leverage Azure Event Hub to store events. As you will learn in this chapter, events-based integration is one of the key differentiators between monolithic and microservice...

Technical requirements

You will need to use a modern browser, such as Firefox, Chrome, or Edge.

Introducing to microservices

Microservices are an architectural pattern for organizing your application according to business domains. For more information on microservices, please see https://martinfowler.com/articles/microservices.html. Classic examples that are usually provided for microservices are how customer, movies, and recommendation services are implemented. Customer service simply deals with customer details, and has no information about movies. The movies service deals with movie details and nothing more. The recommendation engine service deals with recommendations only, and, given a movie title, will return the movie that are closely related.

One of the main selling points of microservices is strengthen independence. Services are designed to be small enough (hence the name micro) to handle the needs of a business domain. As they are small, they can be made self-contained...

Deploying a set of microservices

We will be deploying a set of microservices called a social network. The service is composed of two main service, users and friends. The users service stores all the users in its own data store. The friends service stores the user's friends. The events of adding a user/adding a friend are sent to a recommendation service backed by a graph database that is then used to query relationships between users. You can query the graph database with questions, such as give me the common friends of user X and user Y.

In the following section, you will do the following:

  • Use Helm to deploy a sample microservice-based application
  • Test the service by sending events and watch objects being created and updated

Deploying Helm

...

Using Azure Event Hubs

Running Kafka locally is OK for demo purposes, but not suitable for production use. The same reasons why you wouldn't want to run your own database server are why you would avoid running and maintaining your own Kafka instance. Azure Event Hub has added support for the Kafka protocol, so with minor modifications, we can update our application from using local Kafka instance to the scalable Azure Event Hub instance.

In the following sections, we will do the following:

  • Create the Azure Event Hub via the portal and gather the required details to connect our microservice-based application.
  • Modify the Helm chart to use the newly created Azure Event Hub.

Creating the Azure Event Hub

Perform the following...

Summary

We started this chapter by covering microservices, their benefits and their trade-offs. Following this, we went on to deploy a set of microservices called social network, where we used Helm to deploy a sample microservice-based application. We were able to test the service by sending events and watching objects being created and updated. Finally, we covered the storing of events in Azure Event Hub using Kafka support, and we were able to gather the required details to connect our microservice-based application and modify the Helm chart. The next chapter will cover cluster and port security using secret objects provided by Kubernetes.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Kubernetes on Azure
Published in: Mar 2019Publisher: PacktISBN-13: 9781789536102
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Authors (2)

author image
Shivakumar Gopalakrishnan

Shivakumar Gopalakrishnan is DevOps architect at Varian Medical Systems. He has introduced Docker, Kubernetes, and other cloud-native tools to Varian product development to enable "Everything as Code". He has years of software development experience in a wide variety of fields, including networking, storage, medical imaging, and currently, DevOps. He has worked to develop scalable storage appliances specifically tuned for medical imaging needs and has helped architect cloud-native solutions for delivering modular AngularJS applications backed by microservices. He has spoken at multiple events on incorporating AI and machine learning in DevOps to enable a culture of learning in large enterprises. He has helped teams in highly regulated large medical enterprises adopt modern agile/DevOps methodologies, including the "You build it, you run it" model. He has defined and leads the implementation of a DevOps roadmap that transforms traditional teams to teams that seamlessly adopt security- and quality-first approaches using CI/CD tools. He holds a bachelor of engineering degree from College of Engineering, Guindy, and a Master of Science degree from University of Maryland, College Park.
Read more about Shivakumar Gopalakrishnan

author image
Gunther Lenz

Gunther Lenz is senior director of the technology office at Varian. He is an innovative software R&D leader, architect, MBA, published author, public speaker, and strategic technology visionary with more than 20 years of experience. He has a proven track record of successfully leading large, innovative, and transformational software development and DevOps teams of more than 50 people, with a focus on continuous improvement. He has defined and lead distributed teams throughout the entire software product lifecycle by leveraging groundbreaking processes, tools, and technologies such as the cloud, DevOps, lean/agile, microservices architecture, digital transformation, software platforms, AI, and distributed machine learning. He was awarded Microsoft Most Valuable Professional for Software Architecture (2005-2008). Gunther has published two books, .NET – A Complete Development Cycle and Practical Software Factories in .NET.
Read more about Gunther Lenz