A step-by-step guide to building microservices using Python and Docker, along with managing and orchestrating them with Kubernetes
Key Features
• Learn to use Docker containers to create, operate, and deploy your microservices
• Create workflows to manage independent deployments on coordinating services using CI and GitOps through GitHub, Travis CI, and Flux
• Develop a REST microservice in Python using the Flask framework and Postgres database
Book Description
Microservices architecture helps create complex systems with multiple, interconnected services that can be maintained by independent teams working in parallel. This book guides you on how to develop these complex systems with the help of containers.
You'll start by learning to design an efficient strategy for migrating a legacy monolithic system to microservices. You'll build a RESTful microservice with Python and learn how to encapsulate the code for the services into a container using Docker. While developing the services, you'll understand how to use tools such as GitHub and Travis CI to ensure continuous delivery (CD) and continuous integration (CI). As the systems become complex and grow in size, you'll be introduced to Kubernetes and explore how to orchestrate a system of containers while managing multiple services. Next, you'll configure Kubernetes clusters for production-ready environments and secure them for reliable deployments. In the concluding chapters, you'll learn how to detect and debug critical problems with the help of logs and metrics. Finally, you'll discover a variety of strategies for working with multiple teams dealing with different microservices for effective collaboration.
By the end of this book, you'll be able to build production-grade microservices as well as orchestrate a complex system of services using containers.
What you will learn
• Discover how to design, test, and operate scalable microservices
• Coordinate and deploy different services using Kubernetes
• Use Docker to construct scalable and manageable applications with microservices
• Understand how to monitor a complete system to ensure early detection of problems
• Become well versed with migrating from an existing monolithic system to a microservice one
• Use load balancing to ensure seamless operation between the old monolith and the new service
Who this book is for
This book is for developers, engineers, or software architects who are trying to move away from traditional approaches for building complex multi-service systems by adopting microservices and containers. Although familiarity with Python programming is assumed, no prior knowledge of Docker is required.
Author(s): Jaime Buelta
Edition: 1
Publisher: Packt Publishing
Year: 2019
Language: English
Commentary: True PDF
Pages: 408
City: Birmingham, UK
Tags: DevOps; Security; Python; Web Applications; PostgreSQL; Monitoring; Logging; Microservices; Pipelines; Clusters; Docker; Deployment; Flask; GitHub; Kubernetes; SQLAlchemy; TravisCI; Docker Swarm; Workflow; Teamwork; RESTful API
1. Making the Move: Design, Plan, Execute
2. Creating a REST service with Python
3. Build, Run, and Test Your Service Using Docker
4. Creating a pipeline and workflow with GitHub and TravisCI
5. Using Kubernetes
6. Local development with Kubernetes
7. Configuring and Securing the System
8. Using GitOps principles
9. Managing workflows
10. Monitoring Logs and Metrics
11. Handling Change, Dependencies, and Secrets in The System
12. Collaboration and communication between teams