SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Running
MongoDB Enterprise on
Chicago
Kubernetes - Meetup June 21st
, 2018
2
Your host
Disclaimer
Jason Mimick
Technical Director
@jmimick
MongoDB, Inc.
Agenda
❖ Running data services today
❖ The New MongoDB Enterprise Kubernetes Operator
❖ Using MongoDB on Kubernetes
❖ Preview of coming attractions
4
Data as a service?
Evolution
The Big Bang
Libraries
Card Catalog
Computers
On Demand & Self-service
Cloud Ready
Highly Available
Secure
Databases
Relational &
Normalization
note: not drawn to scale
5
TODAY
Disclaimer
Dev+Ops
Everyone is a bit DBA
• Continuous. Check in a fix - goes to production.
• Knowing how your app uses data is crucial. Deep telemetry and insight into your
database is essential.
• As much as you love bash, you'll never scale without end-to-end tooling
6
ALL
THE
PIECES
Disclaimer
A "data services pie"
Rock solid database
MongoDB
Rich Ecosystem
MongoDB Drivers &
Open Source Projects
MongoDB Ops Manager
Kubernetes
7
MDBaaS
Disclaimer
Ops Manager
Cloud Manager &
Atlas
~ Fully hosted ~
MongoDB Atlas
~ Hosted management ~
MongoDB Cloud Manager
~ Private Cloud/On Prem ~
MongoDB Ops Manager
Management, Monitoring &
Backups for all types
Architecture
supervisord Automation Agent
Backup Agent Monitoring Agent
Deployed by the Automation Agent into the
Container afterwards
The MongoDB Enterprise
Container
Included in the Container Image
Ops Manager Kubernetes
z
Mongo Container
z
Mongo Container
z
Mongo Container
AppDB
Kubectl / k8s API
MongoDB
Kubernetes
Operator
How it all works (demo env)
ConfigMap
OpsMgr Url
OpsMgr Project
Secret
OpsMgr
Credentials
Pod
Pod
⚙
⚙
⚙
StatefulSet
---
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: my-replica-set
namespace: mongodb
spec:
members: 3
version: 3.6.5
project: my-project
credentials: my-credentials
MongoDB
Ops
Manager
OpsMgr
AppDB
MongoDB
Enterprise
Operator
kube-api
HTTP
HTTP
# Start cluster
minikube start --memory="12000" --bootstrapper kubeadm
# Install operator
helm init
helm install ./mongodb-enterprise-kubernetes/helm_chart 
--name mongodb-enterprise
# set default namespace (op installs to 'mongodb')
kubectl config set-context $(kubectl config current-context)
--namespace=mongodb
# See all operator stuff
kubectl get all --selector=app=mongodb-enterprise-operator
# … install/access MongoDB Ops Manager
Demo - Setup - Installing the Operator
---
apiVersion: v1
kind: ConfigMap
metadata:
name: my-k8s-project
data:
projectId: 5b2bcfb052faff00843c9d92
baseUrl: http://mongodb-opsmgr:8080
---
apiVersion: v1
kind: Secret
metadata:
name: opsmgr-global-admin-credentials
data:
user: bW9uZ29kdWRlQG1vbmdvcm9ja3MuY29tCg==
publicApiKey: MTg3NDBmZjMtOWVlMi00NDdhLWI5NWEtNzllMDY4ZjQ2ODgwCg==
Demo - Setup - Configuring the Operator
cat chicago-replset.yaml
---
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: chicago-meetup-replset
namespace: mongodb
spec:
members: 3
version: 3.6.5
project: my-k8s-project
credentials: opsmgr-global-admin-credentials
podSpec:
storage: 2G
storageClass: mongodb-storage
Demo - Deploying a MongoDB Replica Set
NAME CAPACITY CLAIM STORAGECLASS
mongodb-opsmgr-appdb-pv-volume 2Gi mongodb/mongodb-opsmgr-appdb-pv-claim manual
mongodb-opsmgr-config-pv-volume 2Gi mongodb/mongodb-opsmgr-config-pv-claim manual
pv-mongodb-0 20Gi mongodb/data-chicago-meetup-replset-0 mongodb-storage
pv-mongodb-1 20Gi mongodb/data-chicago-meetup-replset-1 mongodb-storage
pv-mongodb-2 20Gi mongodb/data-chicago-meetup-replset-2 mongodb-storage
NAME CAPACITY VOLUME STORAGECLASS
data-chicago-meetup-replset-0 20Gi pv-mongodb-0 mongodb-storage
data-chicago-meetup-replset-1 20Gi pv-mongodb-1 mongodb-storage
data-chicago-meetup-replset-2 20Gi pv-mongodb-2 mongodb-storage
mongodb-opsmgr-appdb-pv-claim 2Gi mongodb-opsmgr-appdb-pv-volume manual
mongodb-opsmgr-config-pv-claim 2Gi mongodb-opsmgr-config-pv-volume manual
Demo - pv & pvc (minikube)
kubectl get all --selector=app=chicago-meetup-replset-svc
NAME READY STATUS RESTARTS AGE
pod/chicago-meetup-replset-0 1/1 Running 0 14m
pod/chicago-meetup-replset-1 1/1 Running 0 14m
pod/chicago-meetup-replset-2 1/1 Running 0 14m
NAME TYPE CLUSTER-IP
EXTERNAL-IP PORT(S) AGE
service/chicago-meetup-replset-svc ClusterIP None <none>
27017/TCP 14m
service/chicago-meetup-replset-svc-external NodePort 10.110.13.232 <none>
27017:31252/TCP 14m
NAME DESIRED CURRENT AGE
statefulset.apps/chicago-meetup-replset 3 3 14m
Demo - What's running
cat chicago-replset.yaml
---
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: chicago-meetup-replset
namespace: mongodb
spec:
members: 3
version: 3.6.5
project: my-k8s-project
credentials: opsmgr-global-admin-credentials
Demo - Testing your connection
Demo - connecting your app - mongodb+srv//:
apiVersion: v1
kind: Service
spec:
clusterIP: None
ports:
- name: mongodb
port: 27017
protocol: TCP
targetPort: 27017
selector:
app: chicago-meetup-replset-svc
sessionAffinity: None
type: ClusterIP
mongodb+srv:// documentation
Demo - connecting your app - mongodb+srv//:
➜ kubectl run test --image=tutum/dnsutils -- 
host -t srv chicago-meetup-replset-svc
deployment.apps "test" created
➜ kubectl logs test-6b59b4689d-4sws6
chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-meetup-replset-0.chicago-meetup-replset-svc.mongodb.svc.cluster.local.
chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-meetup-replset-1.chicago-meetup-replset-svc.mongodb.svc.cluster.local.
chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-meetup-replset-2.chicago-meetup-replset-svc.mongodb.svc.cluster.local.
Demo - connecting your app - mongodb+srv//:
➜ kubectl run conntester --restart=Never --image=simple-mongodb-connection-tester
"mongodb+srv://chicago-meetup-replset-svc.mongodb.svc.cluster.local/?ssl=false"
pod "conntester" created
➜ kubectl logs conntester
simple-connection-test: testing connection to
mongodb+srv://chicago-meetup-replset-svc.mongodb.svc.cluster.local/?ssl=false
Creating and reading 100 docs in the 'test-1f1aab0a.foo' namespace
Database(MongoClient(host=['chicago-meetup-replset-0.chicago-meetup-replset-svc.mongod
l:27017', 'chicago-meetup-replset-2.chicago-meetup-replset-svc.mongodb.svc.cluster.loc
'chicago-meetup-replset-1.chicago-meetup-replset-svc.mongodb.svc.cluster.local:27017']
document_class=dict, tz_aware=False, connect=True, ssl=False), u'test-1f1aab0a')
{u'i': 0, u'_id': ObjectId('5b2c07e92bc77a00017ee7c5')}
…
{u'i': 99, u'_id': ObjectId('5b2c07ea2bc77a00017ee828')}
Dropped db 'test-1f1aab0a'
Full example - ReplicaSet
https://raw.githubusercontent.com/10gen/ops-manager-kubernetes/ead26a54f284d1d1
361c90cce71993089bc1fe0f/samples/extended/om-replica-set.yaml?token=AAEanrYfl-
uB7oBq5xJyrtlK0ZvweoiBks5bNR9twA%3D%3D
More advanced configurations:
● Resources
○ CPU
○ Memory
○ Storage
● Node affinity
Coming attractions….
Coming features before GA
● Evolving Production Notes to support containers
● TLS
○ Configure certs inside containers and also
MongoDB security
● Auth/Authz
○ Tight integration with supported MongoDB
authentication mechanisms
■ x509
■ LDAP/Kerberos
● Dynamic cluster changes
○ Adding nodes to replica sets
○ Converting replica set to sharded cluster
● Backups enabled by default
Coming attractions….
● Support for Kubernetes distributions
○ OpenShift template: example
○ PKS
○ GKE, Amazon ECS, Azure Container Service
○ … more - let us know!
Learn and join the
MongoDB Enterprise Kubernetes
Community
Public launch at MongoDB World next week!
Github: https://github.com/mongodb/mongodb-enterprise-kubernetes
Slack: https://launchpass.com/mongo-db #enterprise-kubernetes
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Brief intro to K8s controller and operator
Brief intro to K8s controller and operator Brief intro to K8s controller and operator
Brief intro to K8s controller and operator
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
 
K8s Basic
K8s BasicK8s Basic
K8s Basic
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutions
 
Taming AEM deployments
Taming AEM deploymentsTaming AEM deployments
Taming AEM deployments
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
RESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerRESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with Docker
 
Building scala with bazel
Building scala with bazelBuilding scala with bazel
Building scala with bazel
 
Google App Engine: Basic
Google App Engine: BasicGoogle App Engine: Basic
Google App Engine: Basic
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 
Prometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes clusterPrometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes cluster
 
Developing a user-friendly OpenResty application
Developing a user-friendly OpenResty applicationDeveloping a user-friendly OpenResty application
Developing a user-friendly OpenResty application
 
Elasticsearch Monitoring in Openshift
Elasticsearch Monitoring in OpenshiftElasticsearch Monitoring in Openshift
Elasticsearch Monitoring in Openshift
 
How to successfully migrate to bazel from maven or gradle
How to successfully migrate to bazel from maven or gradleHow to successfully migrate to bazel from maven or gradle
How to successfully migrate to bazel from maven or gradle
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
15 kubernetes failure points you should watch
15 kubernetes failure points you should watch15 kubernetes failure points you should watch
15 kubernetes failure points you should watch
 
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev DaysHow to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCDDevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
 

Ähnlich wie Running MongoDB Enterprise on Kubernetes

SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
MongoDB
 

Ähnlich wie Running MongoDB Enterprise on Kubernetes (20)

MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
How To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeHow To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and Compose
 
GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 
Cloud-native Java EE-volution
Cloud-native Java EE-volutionCloud-native Java EE-volution
Cloud-native Java EE-volution
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS SummitAutomatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
 
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit SydneyAutoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
Autoscaling Your Kubernetes Workloads (Sponsored by Datadog) - AWS Summit Sydney
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Running MongoDB Enterprise on Kubernetes

  • 2. 2 Your host Disclaimer Jason Mimick Technical Director @jmimick MongoDB, Inc.
  • 3. Agenda ❖ Running data services today ❖ The New MongoDB Enterprise Kubernetes Operator ❖ Using MongoDB on Kubernetes ❖ Preview of coming attractions
  • 4. 4 Data as a service? Evolution The Big Bang Libraries Card Catalog Computers On Demand & Self-service Cloud Ready Highly Available Secure Databases Relational & Normalization note: not drawn to scale
  • 5. 5 TODAY Disclaimer Dev+Ops Everyone is a bit DBA • Continuous. Check in a fix - goes to production. • Knowing how your app uses data is crucial. Deep telemetry and insight into your database is essential. • As much as you love bash, you'll never scale without end-to-end tooling
  • 6. 6 ALL THE PIECES Disclaimer A "data services pie" Rock solid database MongoDB Rich Ecosystem MongoDB Drivers & Open Source Projects MongoDB Ops Manager Kubernetes
  • 7. 7 MDBaaS Disclaimer Ops Manager Cloud Manager & Atlas ~ Fully hosted ~ MongoDB Atlas ~ Hosted management ~ MongoDB Cloud Manager ~ Private Cloud/On Prem ~ MongoDB Ops Manager Management, Monitoring & Backups for all types
  • 8. Architecture supervisord Automation Agent Backup Agent Monitoring Agent Deployed by the Automation Agent into the Container afterwards The MongoDB Enterprise Container Included in the Container Image Ops Manager Kubernetes z Mongo Container z Mongo Container z Mongo Container AppDB Kubectl / k8s API MongoDB Kubernetes Operator
  • 9. How it all works (demo env) ConfigMap OpsMgr Url OpsMgr Project Secret OpsMgr Credentials Pod Pod ⚙ ⚙ ⚙ StatefulSet --- apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: my-replica-set namespace: mongodb spec: members: 3 version: 3.6.5 project: my-project credentials: my-credentials MongoDB Ops Manager OpsMgr AppDB MongoDB Enterprise Operator kube-api HTTP HTTP
  • 10. # Start cluster minikube start --memory="12000" --bootstrapper kubeadm # Install operator helm init helm install ./mongodb-enterprise-kubernetes/helm_chart --name mongodb-enterprise # set default namespace (op installs to 'mongodb') kubectl config set-context $(kubectl config current-context) --namespace=mongodb # See all operator stuff kubectl get all --selector=app=mongodb-enterprise-operator # … install/access MongoDB Ops Manager Demo - Setup - Installing the Operator
  • 11. --- apiVersion: v1 kind: ConfigMap metadata: name: my-k8s-project data: projectId: 5b2bcfb052faff00843c9d92 baseUrl: http://mongodb-opsmgr:8080 --- apiVersion: v1 kind: Secret metadata: name: opsmgr-global-admin-credentials data: user: bW9uZ29kdWRlQG1vbmdvcm9ja3MuY29tCg== publicApiKey: MTg3NDBmZjMtOWVlMi00NDdhLWI5NWEtNzllMDY4ZjQ2ODgwCg== Demo - Setup - Configuring the Operator
  • 12. cat chicago-replset.yaml --- apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: chicago-meetup-replset namespace: mongodb spec: members: 3 version: 3.6.5 project: my-k8s-project credentials: opsmgr-global-admin-credentials podSpec: storage: 2G storageClass: mongodb-storage Demo - Deploying a MongoDB Replica Set
  • 13. NAME CAPACITY CLAIM STORAGECLASS mongodb-opsmgr-appdb-pv-volume 2Gi mongodb/mongodb-opsmgr-appdb-pv-claim manual mongodb-opsmgr-config-pv-volume 2Gi mongodb/mongodb-opsmgr-config-pv-claim manual pv-mongodb-0 20Gi mongodb/data-chicago-meetup-replset-0 mongodb-storage pv-mongodb-1 20Gi mongodb/data-chicago-meetup-replset-1 mongodb-storage pv-mongodb-2 20Gi mongodb/data-chicago-meetup-replset-2 mongodb-storage NAME CAPACITY VOLUME STORAGECLASS data-chicago-meetup-replset-0 20Gi pv-mongodb-0 mongodb-storage data-chicago-meetup-replset-1 20Gi pv-mongodb-1 mongodb-storage data-chicago-meetup-replset-2 20Gi pv-mongodb-2 mongodb-storage mongodb-opsmgr-appdb-pv-claim 2Gi mongodb-opsmgr-appdb-pv-volume manual mongodb-opsmgr-config-pv-claim 2Gi mongodb-opsmgr-config-pv-volume manual Demo - pv & pvc (minikube)
  • 14. kubectl get all --selector=app=chicago-meetup-replset-svc NAME READY STATUS RESTARTS AGE pod/chicago-meetup-replset-0 1/1 Running 0 14m pod/chicago-meetup-replset-1 1/1 Running 0 14m pod/chicago-meetup-replset-2 1/1 Running 0 14m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/chicago-meetup-replset-svc ClusterIP None <none> 27017/TCP 14m service/chicago-meetup-replset-svc-external NodePort 10.110.13.232 <none> 27017:31252/TCP 14m NAME DESIRED CURRENT AGE statefulset.apps/chicago-meetup-replset 3 3 14m Demo - What's running
  • 15. cat chicago-replset.yaml --- apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: chicago-meetup-replset namespace: mongodb spec: members: 3 version: 3.6.5 project: my-k8s-project credentials: opsmgr-global-admin-credentials Demo - Testing your connection
  • 16. Demo - connecting your app - mongodb+srv//: apiVersion: v1 kind: Service spec: clusterIP: None ports: - name: mongodb port: 27017 protocol: TCP targetPort: 27017 selector: app: chicago-meetup-replset-svc sessionAffinity: None type: ClusterIP mongodb+srv:// documentation
  • 17. Demo - connecting your app - mongodb+srv//: ➜ kubectl run test --image=tutum/dnsutils -- host -t srv chicago-meetup-replset-svc deployment.apps "test" created ➜ kubectl logs test-6b59b4689d-4sws6 chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-meetup-replset-0.chicago-meetup-replset-svc.mongodb.svc.cluster.local. chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-meetup-replset-1.chicago-meetup-replset-svc.mongodb.svc.cluster.local. chicago-meetup-replset-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-meetup-replset-2.chicago-meetup-replset-svc.mongodb.svc.cluster.local.
  • 18. Demo - connecting your app - mongodb+srv//: ➜ kubectl run conntester --restart=Never --image=simple-mongodb-connection-tester "mongodb+srv://chicago-meetup-replset-svc.mongodb.svc.cluster.local/?ssl=false" pod "conntester" created ➜ kubectl logs conntester simple-connection-test: testing connection to mongodb+srv://chicago-meetup-replset-svc.mongodb.svc.cluster.local/?ssl=false Creating and reading 100 docs in the 'test-1f1aab0a.foo' namespace Database(MongoClient(host=['chicago-meetup-replset-0.chicago-meetup-replset-svc.mongod l:27017', 'chicago-meetup-replset-2.chicago-meetup-replset-svc.mongodb.svc.cluster.loc 'chicago-meetup-replset-1.chicago-meetup-replset-svc.mongodb.svc.cluster.local:27017'] document_class=dict, tz_aware=False, connect=True, ssl=False), u'test-1f1aab0a') {u'i': 0, u'_id': ObjectId('5b2c07e92bc77a00017ee7c5')} … {u'i': 99, u'_id': ObjectId('5b2c07ea2bc77a00017ee828')} Dropped db 'test-1f1aab0a'
  • 19. Full example - ReplicaSet https://raw.githubusercontent.com/10gen/ops-manager-kubernetes/ead26a54f284d1d1 361c90cce71993089bc1fe0f/samples/extended/om-replica-set.yaml?token=AAEanrYfl- uB7oBq5xJyrtlK0ZvweoiBks5bNR9twA%3D%3D More advanced configurations: ● Resources ○ CPU ○ Memory ○ Storage ● Node affinity
  • 20. Coming attractions…. Coming features before GA ● Evolving Production Notes to support containers ● TLS ○ Configure certs inside containers and also MongoDB security ● Auth/Authz ○ Tight integration with supported MongoDB authentication mechanisms ■ x509 ■ LDAP/Kerberos ● Dynamic cluster changes ○ Adding nodes to replica sets ○ Converting replica set to sharded cluster ● Backups enabled by default
  • 21. Coming attractions…. ● Support for Kubernetes distributions ○ OpenShift template: example ○ PKS ○ GKE, Amazon ECS, Azure Container Service ○ … more - let us know!
  • 22. Learn and join the MongoDB Enterprise Kubernetes Community Public launch at MongoDB World next week! Github: https://github.com/mongodb/mongodb-enterprise-kubernetes Slack: https://launchpass.com/mongo-db #enterprise-kubernetes Thanks!