Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION...
Transcript of Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION...
![Page 1: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/1.jpg)
4 June 2018© MARKLOGIC CORPORATION
Running MarkLogic in Containers (Both Docker and Kubernetes)
Emma LiuProduct Manager, MarkLogic
Vitaly KorolevStaff QA Engineer, MarkLogic
@vitaly_korolev
![Page 2: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/2.jpg)
SLIDE: 2 4 June 2018© MARKLOGIC CORPORATION
Source: http://turnoff.us/image/en/tech-adoption.png
![Page 3: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/3.jpg)
SLIDE: 3 4 June 2018© MARKLOGIC CORPORATION
Cloud Agnostic and Platform Agnostic
CONTAINERIZED MARKLOGIC ENABLES
Write the application once, run it anywhere
Deploy in the cloud
– Private, hybrid, or public cloud
– AWS, Azure, or Google Cloud
Deploy on-premises
CLOUD
PHYSICAL / VIRTUAL
DEPLOY
![Page 4: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/4.jpg)
SLIDE: 4 4 June 2018© MARKLOGIC CORPORATION
According to Docker:“A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings.”
![Page 5: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/5.jpg)
SLIDE: 5 4 June 2018© MARKLOGIC CORPORATION
Containers vs. Virtual Machines• OS-level Virtualization vs. Hardware Virtualization • Docker Engine vs. Guest OS + Hypervisor • “Apartment vs. House”
![Page 6: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/6.jpg)
SLIDE: 6 4 June 2018© MARKLOGIC CORPORATION
VIRTUAL MACHINES
SERVER
HOST OS
HYPERVISOR
GUEST OS GUEST OS
BINS / LIBS BINS / LIBS
SERVER
HOST OS
DOCKER ENGINE
BINS / LIBS BINS / LIBS
CONTAINERVM
Lightweight • Simple configuration • Reduced costs • Efficient resource consumption
True network separation • Mature technology
MarkLogic MarkLogic MarkLogic MarkLogic
![Page 7: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/7.jpg)
SLIDE: 7 4 June 2018© MARKLOGIC CORPORATION
Source: https://twitter.com/åcommitstrip/status/746407865485766657
![Page 8: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/8.jpg)
Why MarkLogic in Containers?
![Page 9: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/9.jpg)
SLIDE: 9 4 June 2018© MARKLOGIC CORPORATION
MarkLogic in Containers
Portability
Shared among users and across platforms
Simplicity
Lightweight and quick to start up
Speed
Rapid software development and smooth
CI/CD Integration
![Page 10: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/10.jpg)
SLIDE: 10 4 June 2018© MARKLOGIC CORPORATION
MarkLogic in Containers
Sept 2015 Dec 2016 May 2017
Community UpdateBuild MarkLogic Docker
image
Oct 2016
MarkLogic 9.0-1 Container support for
Dev/QA
MarkLogic 8 Dev/QA usage
MarkLogic Internal Registry
Share development images
![Page 11: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/11.jpg)
SLIDE: 11 4 June 2018© MARKLOGIC CORPORATION
MarkLogic Supports Containers in Production
CLOUD NEUTRAL TO PLATFORM NEUTRAL
Production support starting MarkLogic 9.0-5
Extensive regression testing
RHEL 7.4 Base OS + Overlay FS with NFS
Performance testing versus virtual machines
![Page 12: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/12.jpg)
SLIDE: 12 4 June 2018© MARKLOGIC CORPORATION
MarkLogic E/D Node SeparationWORKLOAD MANAGEMENT VIA CONTAINERS
E Group 1
D Group
E Group 2
![Page 13: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/13.jpg)
SLIDE: 13 4 June 2018© MARKLOGIC CORPORATION
MarkLogic Data Hub Framework DEVELOP VIA CONTAINERS
Quick start container image on private/public registry
- Installation requirements: Java 8, Quick Start Data Set, Gradle, MLCP
![Page 14: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/14.jpg)
SLIDE: 14 4 June 2018© MARKLOGIC CORPORATION
Setup MarkLogic Docker in 3 Easy StepsDEVELOPING & TESTING MADE EASY
DOCKER FILE
DependenciesExpose ports
1MARKLOGIC IMAGE
Docker build
2RUN MARKLOGIC
DOCKER CONTAINER
Docker run
3
![Page 15: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/15.jpg)
SLIDE: 15 4 June 2018© MARKLOGIC CORPORATION
Share and Deploy via Registry
IMAGE
Create imagePush to registry
IMAGE + CONTAINER
CI/CD processProduction server
Public registryPrivate registry
REGISTRY
![Page 16: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/16.jpg)
DEMO:Containers from MarkLogic Private Registry
![Page 17: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/17.jpg)
MarkLogic in Kubernetes
![Page 18: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/18.jpg)
SLIDE: 18 4 June 2018© MARKLOGIC CORPORATION
WHY KUBERNETES?
Kubernetes is the Leading Orchestration Framework for Containers Production-grade container orchestration
Major cloud platforms support Kubernetes
![Page 19: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/19.jpg)
SLIDE: 19 4 June 2018© MARKLOGIC CORPORATION
Kubernetes Features Automatic binpacking
Scalability
High availability (self healing)
Auto rollouts and rollbacks
Service discovery and load balancing
Storage orchestration
![Page 20: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/20.jpg)
SLIDE: 20 4 June 2018© MARKLOGIC CORPORATION
Kubernetes Architecture
Node 1
Node 2
Node 3
Node n
Image Registry
Kubernetes Master
UI
CLIAPI
![Page 21: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/21.jpg)
Demo:MarkLogic in Kubernetes
Vitaly Korelov, Staff QA Engineer
![Page 22: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/22.jpg)
SLIDE: 22 4 June 2018© MARKLOGIC CORPORATION
Lightweight on local machineMinikube – Kubernetes on a Laptop
Dependencies
- Docker, private Docker registry, VirtualBox, Minikube, kubectl, & MarkLogic 9
![Page 23: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/23.jpg)
SLIDE: 23 4 June 2018© MARKLOGIC CORPORATION
Lightweight on local machineSetup Components
MarkLogic Docker image with cluster configuration scripts
Nginx Docker image with configuration scripts
- Used as load balancer and replication controller
Kubernetes configuration
- Pod for MarkLogic
- Service for pods
- Nginx service
![Page 24: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/24.jpg)
Summary
![Page 25: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/25.jpg)
SLIDE: 25 4 June 2018© MARKLOGIC CORPORATION
MarkLogic in ContainersENABLING MICROSERVICES ARCHITECTURE
Platform Neutral
Write your app once, run it anywhere – in cloud
and on-premises
Container Support in SDLC
Develop, test and deploy in production
Ecosystem Compatible
Proof-of-concept of MarkLogic cluster
deployment in Kubernetes
![Page 26: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/26.jpg)
SLIDE: 26 4 June 2018© MARKLOGIC CORPORATION
Get Started Build a MarkLogic Docker Container:
https://developer.marklogic.com/blog/building-a-marklogic-docker-container
Automate MarkLogic Docker Install: http://developer.marklogic.com/blog/docker-marklogic-initialization
Deploy a MarkLogic Cluster in Kubernetes: http://developer.marklogic.com/blog/docker-deploy-kubernetes
![Page 27: Running MarkLogic in Containers (Both Docker and Kubernetes) · 4 June 2018© MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager,](https://reader036.fdocuments.in/reader036/viewer/2022070710/5ec5febdb73aec795f411374/html5/thumbnails/27.jpg)
Questions?