RedisConf17 - Amadeus - Redis-Cluster operator

Preview:

Citation preview

Redis-Cluster OperatorMakes Redis-Cluster deployment easier !

cedric.lamoriniere@amadeus.com

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

| @cedlamo

A global player at the heart of the travel industry

2

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Key business numbers

1.4 billionPassengers

boarded (PBs)

566 milliontravel agency

bookings processed

1.6+ billiondata requests

processed per day

5000+Application servers

~450 000queries per second(600 000 at peak)

3

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Our technology journey

SNATPFTN3720

1997

C++TCP/IP

JEE & SOAP

2000 2003 2006 2015 2017

Application on Open System in PRDIn House ESB

Industrializationof Open System

Launch ACS

TPF decoAlmost done

4

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

ACS: Motivation and Goals

New Business Requirements:● improve responses time● hosted on client premises● data must stay in a country● hosting third party application

Current infrastructure:● bare metal or virtual machine● dedicated resources● limited elasticity● spare resources outside peak

time

5

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Amadeus Cloud Services: migration of our applications to a cloud based infrastructure: (OpenShift [private|public] infra)

Redis-Cluster with Openshift: Motivation and Goals

Improve resilience and performance of our applications

Offer a performant session offloading solution to our applications based on Redis

Redis-Cluster operated in Openshift

○ Same stack for middleware and application○ Simplify redis-cluster operational support○ Benefit from Amadeus Cloud Services: deployment,

monitoring, logging, etc 6

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Openshift / Kubernetes

Kubernetes7

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Redis in Kubernetes

8

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Several prototypes examples, but

Missing features:

● Simple deployment

● Update cluster topology: scaling, replication factor

● Rolling-update

● Resiliency

9

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

MasterMaster

Redis-Cluster in Openshift

10

Master

Node

APIkubectlREST

Kubelet

Docker Daemon

Etcd

Scheduler

Node Kubelet

Docker Daemon

Node Kubelet

Docker Daemon

DNS

© 2

016

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Controller

Pod Pod Pod

Pod Pod PodPod Pod

PodPod Pod Pod

Pod Pod Pod Pod

Pod

Pod

Pod Redis-Master

Pod Redis-Slave

Pod Redis-Server

Redis Manager in Openshift

Pod: redis manager

app=manager

RC: manager

Manager

Watch

ConfigMap: ClusterConfiguration

NbMaster: 3ReplicationFactor: 2

Scale

Watch

redis-node -1-dsasxf

app=manager

Init Node

Service: redis-node

Deployment: redis-node

ReplicationSet: redis-node-1

redis-node -1-ascdsd

app=manager

Init Node

n

redis-node -1-etebfbd

app=manager

Init Node

Configure

11

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Redis-Cluster Rolling Update with Openshift

Pod: redis manager

RC: manager

Manager

Watch

ConfigMap: ClusterConfiguration

Deployment: redis-node

ReplicationSet: redis-node-1 ReplicationSet: redis-node-2

Service: redis-node

redis-node

V1

redis-node

V1

redis-node

V1

redis-node

V2

redis-node

V2

redis-node

V2

Scale

Migrate

Pod: Deployer

Redis-deployer

Update12

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Demo

Run in Openshift / Minishift

● Start a Redis-Cluster

● Scale up

● Rolling update

13

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Advantages of current solution

● Automate Redis-Cluster standard operations

○ Creation, Scaling, Rolling-update

● Don't requires persistent volumes

● Seen as yet another Kubernetes application

14

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Limitations of current solution

● One Redis-Cluster per Manager

● React to Kubernetes events (limited control)

● Depends on Openshift feature (custom deployer)

15

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

How to improve current solution ?

OperatorRedis-

16

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Redis Operator

Pod: Redis Operator

RC: Controller

Operator

Watch

Service: redis-node

ThirdPartyResources: Redis-Cluster

Replicas: 3ReplicationFactor: 2PodTemplate: {}

Kubernetes Scheduler

Scheduling Requests

redis-node -1-dsasxf

app=manager

Init Node

Schedule Pods

redis-node -1-ascdsd

app=manager

Init Node

n

redis-node -1-etebfbd

app=manager

Init Nodeconfigure

17

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Advantages of Redis-Cluster Operator

● Specificity hidden in a new K8s Object (3rd party resource)

● Generic User Experience

● Responsive vs Proactive:

○ Better Redis-Node life cycle management

● One Operator for several Redis-Clusters

18

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

What next?

● Opensource current Redis-Manager

● Migrate Redis-Manager logic in an Operator

● Package in Helm chart

● Integration with K8s Service Catalogue

19

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Key takeaways

● Easy deployment of Redis-Cluster thanks to Kubernetes

● Automation thanks to Redis-Manager/Operator

● Opensourced soon

20

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Questions?

21

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Thank you !

cedric.lamoriniere@amadeus.com | @cedlamo