Preface xiii
Acknowledgments xv
About the Author xvii
Â
Part I: Microservices 1
Â
Chapter 1: An Introduction to Microservices 3
What Are Microservices? 3
Modular Architecture 8
Other Advantages of Microservices 9
Disadvantages of Microservices 11
Â
Chapter 2: Switching to Microservices 13
Fatigues and Attributes 14
Learning Curve for the Organization 15
Business Case for Microservices 17
Cost Components 18
Â
Chapter 3: Interprocess Communication 23
Types of Interactions 23
Preparing to Write Web Services 24
Microservice Maintenance 25
Discovery Service 26
Putting It All Together 28
Â
Chapter 4: Migrating and Implementing Microservices 33
The Need for Transition 33
Creating a New Application with Microservices 35
Migrating a Monolithic Application to Microservices 40
A Hybrid Approach 45
Â
Part II: Containers 47
Â
Chapter 5: Docker Containers 49
Virtual Machines 50
Containers 52
Docker Architecture and Components 54
The Power of Docker: A Simple Example 57
Â
Chapter 6: Docker Installation 61
Installing Docker on Mac OS X 61
Installing Docker on Windows 66
Installing Docker on Ubuntu Linux 68
Â
Chapter 7: Docker Interface 73
Key Docker Commands 73
Dockerfile 95
Docker Compose 100
Â
Chapter 8: Containers Networking 105
Key Linux Concepts 105
Linking 106
Default Options 110
Custom Networks 116
Â
Chapter 9: Container Orchestration 123
Kubernetes 123
Apache Mesos and Marathon 129
Docker Swarm 132
Service Discovery 136
Service Registry 139
Â
Chapter 10: Containers Management 143
Monitoring 143
Logging 144
Metrics Collection 147
Cluster-wide Monitoring Tools 150
Â
Part III: Hands-On Project—Putting Learning into Practice 169
Â
Chapter 11: Case Study: Monolithic Helpdesk Application 171
Helpdesk Application Overview 171
Application Architecture 172
Building the Application 190
New Requirements and Bug Fixes 200
Â
Chapter 12: Case Study: Migration to Microservices 203
Planning for Migration 203
Converting to Microservices 207
Application Build and Deployment 212
New Requirements and Bug Fixes 217
Â
Chapter 13: Case Study: Containerizing a Helpdesk Application 221
Containerizing Microservices 221
Deploying the Catalog Microservice 235
Updating the Monolithic Application 246
Â
Conclusion 247
What Is DevOps? 247
Only the Beginning 250
Â
Appendix A: Helpdesk Application Flow 251
Administrator Flows 252
Customer Flows 255
Support Desk Engineer Flows 260
Â
Appendix B: Installing the Solr Search Engine 263
Prerequisites 263
Installation Steps 263
Configuring Solr for Simple Data Import 265
Â
Index 267