running marklogic in containers (both docker and kubernetes) · 4 june 2018© marklogic corporation...
TRANSCRIPT
4 June 2018© MARKLOGIC CORPORATION
Running MarkLogic in Containers (Both Docker and Kubernetes)
Emma LiuProduct Manager, MarkLogic
Vitaly KorolevStaff QA Engineer, MarkLogic
@vitaly_korolev
SLIDE: 2 4 June 2018© MARKLOGIC CORPORATION
Source: http://turnoff.us/image/en/tech-adoption.png
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
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.”
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”
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
SLIDE: 7 4 June 2018© MARKLOGIC CORPORATION
Source: https://twitter.com/åcommitstrip/status/746407865485766657
Why MarkLogic in Containers?
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
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
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
SLIDE: 12 4 June 2018© MARKLOGIC CORPORATION
MarkLogic E/D Node SeparationWORKLOAD MANAGEMENT VIA CONTAINERS
E Group 1
D Group
E Group 2
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
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
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
DEMO:Containers from MarkLogic Private Registry
MarkLogic in Kubernetes
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
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
SLIDE: 20 4 June 2018© MARKLOGIC CORPORATION
Kubernetes Architecture
Node 1
Node 2
Node 3
Node n
Image Registry
Kubernetes Master
UI
CLIAPI
Demo:MarkLogic in Kubernetes
Vitaly Korelov, Staff QA Engineer
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
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
Summary
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
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
Questions?