©AmadeusITGroupanditsaffiliatesandsubsidiaries Mastering MongoDB in Kubernetes - MDB Enterprise Operator for Kubernetes Amadeus Dr. Michael Ehrig, Arkadiusz Borucki
2 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Back in the day at a travel agency… FRA IST SLC DEN SIN PHL YYZ YUL PHX TLV PEK HND SYD ICN DEL CLT BOM DUB SEA BRU ORD CTU LAX MNL MSP CGK VKO CDG BCN EWR RCO CAN FCO MCO KUL SAN DFW GRU HKG LGW AMS
Now, you have the personalized travel agent in your hand … ©AmadeusITGroupanditsaffiliatesandsubsidiaries Personalized Tailor-made experiences unique to the traveler’s preferences A smooth, door-to- door experience Connected 3
Agenda 4 40 minutes _Amadeus MongoDB infrastructure _Making use of REST API _What are Kubernetes operators _Introducing the MongoDB Enterprise Operator _Demo: Deploying a Shard Cluster
Amadeus mission: Enriching every step of the traveler’s journey ©AmadeusITGroupanditsaffiliatesandsubsidiaries 5 On-trip Post-trip Inspire Shop Book Pre-trip _ We are one of the world’s top 10 enterprise software companies* _ We are dedicated to the global travel industry and our solutions enrich travel for billions of people every year _ We are present in 190+ countries and employ 17,000+ people worldwide _ We work together with our customers, partners and other players in the industry to improve business performance and shape the future of travel Amadeus in a few words *Forbes 2018 global rankings 630+ million Total bookings processed in 2017 630+ million Total bookings processed in 2017 1.6+ billion Passengers boarded in 2017
©AmadeusITGroupanditsaffiliatesandsubsidiaries Amadeus: Business & business partners / customers 6 Bookings, Reservations, Boarding, Tracking, etc. Searching, Shopping, Checking, Marking, etc.
©AmadeusITGroupanditsaffiliatesandsubsidiaries 2. MongoDB @ Amadeus
8 ©AmadeusITGroupanditsaffiliatesandsubsidiaries MongoDB deployment @ huge scale! 8 Ops Managers 4 Multi Data Centers Cluster Size 130TB Micro sharding 68 MongoD processes Cloud 6500 GCE, OVH, OpenStack 72 Nodes per cluster 168 Shards
MongoDB deployment @ huge scale! 9 _ Instant searching - flight recommendations data 3 huge MongoDB clusters 75TB, 108TB, 130 TB with 2 ms (avg) response time _ MongoDB cluster with 168 shards (micro-shard) _ Data agregation from multiple sources into a central cluster - A Single View application _ Apache Spark on MongoDB – fraud detection - run machine learning on MongoDB _ MongoDB Amadeus Payments - payment flows _ Dashboards, scheduling tools, change viewers, applications error viewers, and more
What is MongoDB Ops Manager? MongoDB Ops Manager makes it fast and easy for you to deploy, monitor, upgrade, back up and scale your MongoDB deployment
REST API for Operations
12 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Kubernetes - how to operate smarter _ There are many ways to deploy and operate apps and MongoDB _ Why Kubernetes ? Why Operator ? _ Fewer manual tasks, more automated failure recovery _ Your company can provide MongoDB as a Service Easy access to production-ready MongoDB with a single click or command _ Build consistent and identical environments! _ Speed!
©AmadeusITGroupanditsaffiliatesandsubsidiaries 4. The future
©AmadeusITGroupanditsaffiliatesandsubsidiaries Knowledge as a code 14 _ You can extend the Kubernetes API with CustomResourceDefinitions _ Enables developers to add new/replace old functionalities _ Custom Controllers allow you to write app to manage another like stateful MongoDB database _ Operators will change/simplify the way how we manage databases / replace already created automation Operator represents human operational knowledge as a code to reliably manage an application Kubernetes 1.7 add Custom Controllers feature An Operator is set of app-specific custom controllers. Controllers have direct access to Kubernetes API
16 MongoDB Enterprise Operator for Kubernetes Ops Manager features on K8s cluster! K8s API and Ops Manager integration Controller, extends the Kubernetes API Operator for Kubernetes supports: _ pod’s backup, automation, monitoring _ provisioning StatefulSets for replica set _ creates deployment in Ops Manager project _ automates cluster provisioning, scalability, auto recovery, logging _ automates common tasks, to achieve the desired state _ security - tls _ Ops Manager on K8s!
Operator architecture 17
Operator architecture 18
Operator architecture 19
Operator architecture 20
Operator architecture 21
Operator architecture 22
23 How is Operator built ? Application specific controllers Custom Resource _ Custom Resource allow us to define your own resources in the Kubernetes API using CustomResourceDefinition _ Additinal resource is available via Kubernets API _ Perform CRUD operations upon them _ Interact with threm via kubectl --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: mongodb.mongodb.com ............. oneOf: - properties: # MongoDBOpsManager - properties: # ReplicaSet schema - properties: # ShardedCluster schema components
Custom resources 24 --- apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: my-sharded-cluster spec: type: ShardedCluster shardCount: 2 mongodsPerShardCount: 3 mongosCount: 2 configServerCount: 3 version: 4.0.6 --- apiVersion: mongodb.com/v1 kind: MongoDBOpsManager metadata: name: my-replica-set spec: members: 3 version: 4.0.6 service: internal-db
©AmadeusITGroupanditsaffiliatesandsubsidiaries Controllers 25 _ Observe the actual state _ Analyse difference from desired state _ Take action _ Drive the actual state towards the desired stare _ Repeat! Observe Analyse Act my-replica set has 2 running pods Differs from desired state of 3 replicas (pods) Action: - Start a pod - Add pod to the cluster - Waiting for replication
©AmadeusITGroupanditsaffiliatesandsubsidiaries 3. Live Demo
Sharded Cluster 27
©AmadeusITGroupanditsaffiliatesandsubsidiaries Let’s shape the future of travel together NoSQL Private Cloud Compliance & MonitoringNetwork Storage -V -T

MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterprise Operator for K8s

  • 1.
    ©AmadeusITGroupanditsaffiliatesandsubsidiaries Mastering MongoDB in Kubernetes- MDB Enterprise Operator for Kubernetes Amadeus Dr. Michael Ehrig, Arkadiusz Borucki
  • 2.
    2 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Back in theday at a travel agency… FRA IST SLC DEN SIN PHL YYZ YUL PHX TLV PEK HND SYD ICN DEL CLT BOM DUB SEA BRU ORD CTU LAX MNL MSP CGK VKO CDG BCN EWR RCO CAN FCO MCO KUL SAN DFW GRU HKG LGW AMS
  • 3.
    Now, you havethe personalized travel agent in your hand … ©AmadeusITGroupanditsaffiliatesandsubsidiaries Personalized Tailor-made experiences unique to the traveler’s preferences A smooth, door-to- door experience Connected 3
  • 4.
    Agenda 4 40 minutes _Amadeus MongoDBinfrastructure _Making use of REST API _What are Kubernetes operators _Introducing the MongoDB Enterprise Operator _Demo: Deploying a Shard Cluster
  • 5.
    Amadeus mission: Enrichingevery step of the traveler’s journey ©AmadeusITGroupanditsaffiliatesandsubsidiaries 5 On-trip Post-trip Inspire Shop Book Pre-trip _ We are one of the world’s top 10 enterprise software companies* _ We are dedicated to the global travel industry and our solutions enrich travel for billions of people every year _ We are present in 190+ countries and employ 17,000+ people worldwide _ We work together with our customers, partners and other players in the industry to improve business performance and shape the future of travel Amadeus in a few words *Forbes 2018 global rankings 630+ million Total bookings processed in 2017 630+ million Total bookings processed in 2017 1.6+ billion Passengers boarded in 2017
  • 6.
    ©AmadeusITGroupanditsaffiliatesandsubsidiaries Amadeus: Business &business partners / customers 6 Bookings, Reservations, Boarding, Tracking, etc. Searching, Shopping, Checking, Marking, etc.
  • 7.
  • 8.
    8 ©AmadeusITGroupanditsaffiliatesandsubsidiaries MongoDB deployment @huge scale! 8 Ops Managers 4 Multi Data Centers Cluster Size 130TB Micro sharding 68 MongoD processes Cloud 6500 GCE, OVH, OpenStack 72 Nodes per cluster 168 Shards
  • 9.
    MongoDB deployment @huge scale! 9 _ Instant searching - flight recommendations data 3 huge MongoDB clusters 75TB, 108TB, 130 TB with 2 ms (avg) response time _ MongoDB cluster with 168 shards (micro-shard) _ Data agregation from multiple sources into a central cluster - A Single View application _ Apache Spark on MongoDB – fraud detection - run machine learning on MongoDB _ MongoDB Amadeus Payments - payment flows _ Dashboards, scheduling tools, change viewers, applications error viewers, and more
  • 10.
    What is MongoDBOps Manager? MongoDB Ops Manager makes it fast and easy for you to deploy, monitor, upgrade, back up and scale your MongoDB deployment
  • 11.
    REST API forOperations
  • 12.
    12 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Kubernetes - howto operate smarter _ There are many ways to deploy and operate apps and MongoDB _ Why Kubernetes ? Why Operator ? _ Fewer manual tasks, more automated failure recovery _ Your company can provide MongoDB as a Service Easy access to production-ready MongoDB with a single click or command _ Build consistent and identical environments! _ Speed!
  • 13.
  • 14.
    ©AmadeusITGroupanditsaffiliatesandsubsidiaries Knowledge as acode 14 _ You can extend the Kubernetes API with CustomResourceDefinitions _ Enables developers to add new/replace old functionalities _ Custom Controllers allow you to write app to manage another like stateful MongoDB database _ Operators will change/simplify the way how we manage databases / replace already created automation Operator represents human operational knowledge as a code to reliably manage an application Kubernetes 1.7 add Custom Controllers feature An Operator is set of app-specific custom controllers. Controllers have direct access to Kubernetes API
  • 15.
    16 MongoDB Enterprise Operatorfor Kubernetes Ops Manager features on K8s cluster! K8s API and Ops Manager integration Controller, extends the Kubernetes API Operator for Kubernetes supports: _ pod’s backup, automation, monitoring _ provisioning StatefulSets for replica set _ creates deployment in Ops Manager project _ automates cluster provisioning, scalability, auto recovery, logging _ automates common tasks, to achieve the desired state _ security - tls _ Ops Manager on K8s!
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
    23 How is Operatorbuilt ? Application specific controllers Custom Resource _ Custom Resource allow us to define your own resources in the Kubernetes API using CustomResourceDefinition _ Additinal resource is available via Kubernets API _ Perform CRUD operations upon them _ Interact with threm via kubectl --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: mongodb.mongodb.com ............. oneOf: - properties: # MongoDBOpsManager - properties: # ReplicaSet schema - properties: # ShardedCluster schema components
  • 23.
    Custom resources 24 --- apiVersion: mongodb.com/v1 kind:MongoDB metadata: name: my-sharded-cluster spec: type: ShardedCluster shardCount: 2 mongodsPerShardCount: 3 mongosCount: 2 configServerCount: 3 version: 4.0.6 --- apiVersion: mongodb.com/v1 kind: MongoDBOpsManager metadata: name: my-replica-set spec: members: 3 version: 4.0.6 service: internal-db
  • 24.
    ©AmadeusITGroupanditsaffiliatesandsubsidiaries Controllers 25 _ Observe theactual state _ Analyse difference from desired state _ Take action _ Drive the actual state towards the desired stare _ Repeat! Observe Analyse Act my-replica set has 2 running pods Differs from desired state of 3 replicas (pods) Action: - Start a pod - Add pod to the cluster - Waiting for replication
  • 25.
  • 26.
  • 27.
    ©AmadeusITGroupanditsaffiliatesandsubsidiaries Let’s shape the futureof travel together NoSQL Private Cloud Compliance & MonitoringNetwork Storage -V -T