Top Banner
4 June 2018 © MARKLOGIC CORPORATION Running MarkLogic in Containers (Both Docker and Kubernetes) Emma Liu Product Manager, MarkLogic Vitaly Korolev Staff QA Engineer, MarkLogic @vitaly_korolev
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,

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Questions?