dc/os stateful services on - percona · 2018-04-27 · why stateful services on dc/os? introduction...

29
Santa Clara, California | April 23th – 25th, 2018 Stateful Services on DC/OS

Upload: others

Post on 20-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

Santa Clara, California | April 23th – 25th, 2018

Stateful Services on DC/OS

Page 2: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

2

Who Am I?

● Shafique Hassan● Solutions Architect @ Mesosphere● “Operator”

Page 3: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

3

Agenda

● DC/OS Introduction and Recap● Why Stateful Services on DC/OS?● Introduction to the DC/OS SDK● Demo

○ Deploying a Data Service on DC/OS● Wrap-Up and Summary

Page 4: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

4

Takeaways for this session

● Why DC/OS is the best place to run stateful services● Introduction to the DC/OS SDK and how you can leverage it to build your

own stateful services on DC/OS

Page 5: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

Why Stateful Services on DC/OS?

Page 6: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

6

DC/OS 101

Powered by Apache Mesos

Unified hybrid cloud operationsSecurely manage cloud, datacenter, and edge infrastructures from a single control plane

4

Intelligent resource poolingOptimize workload density for highest utilization with resource guarantees

3

Broad workload coverageRun today & tomorrow’s applications including traditional J2EE, containers, analytics & ML

1

Application-aware automationAutomate workload-specific operating procedures to “as-a-Service” anything from Kubernetes to data services

2

Page 7: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

7

DC/OS Hybrid Cloud

● Minimize footprint at edge or remote infrastructures

● Consistent operations across clouds

● Deploy applications to multiple clouds simultaneously

● Workloads automatically deployed across fault domains (Racks or Cloud Availability Zones)

Edge and Multi-Cloud Federation

● Easily add and remove cloud capacity to on-premise clusters

Business Continuity & Disaster Recovery

Cloud Bursting

Page 8: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

8

The DC/OS Catalog

● Fast Data and Big Data

● Scalable datacenter-wide services

● Open source & Partner-supported packages

Mesosphere Enterprise DC/OS

Over 100 Services Made For Enterprise DC/OS

Page 9: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

9

Why Run Stateful Services on DC/OS?

On-demand provisioning1

2

3

Simplified operations

Elastic data infrastructure

● Single command install of services

● Runtime software upgrade● Runtime application settings update● Monitoring & metrics● Managed persistent storage volumes

● Data services and containerized applications share resources

● Deploy instances with different versions on the same infrastructure fabric

● Resize instances● Add more instances

Page 10: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

10

The SMACK Stack

EVENTSUbiquitous data streams from connected devices

FEEDS

Kafka

ANALYTICS

Spark

STORAGE

Cassandra

REACTIVE APP

Akka

Ingest millions of events per second

Real-time and batch process data

Distributed & highly scalable database

Scalable, resilient, data driven applications

Sensors

Devices

Clients

MESOSPHERE DC/OS

● Integrated set of data services to ingest, analyze, and store streaming data

● Simple deployment and operations to get your apps to market faster

● Highly available so you don’t miss a single customer interaction

● Increased utilization of hardware and cloud resources through workload consolidation

Page 11: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

11

DC/OS SummaryDC/OS Approach:Datacenter-cloud as a single computer

1. Application-aware automation for complete lifecycle automation of platform services

2. Workload pooling and density optimization for dramatic cost savings

3. Unified hybrid cloud operations with high availability, security, and multi-tenancy

Data Analytics Cluster

Message Queue Cluster

Data Persistence

Cluster

Container Orchestration

Cluster

CI/CD Cluster

Traditional Approach: Slow, Expensive, Hard

Data Analytics

Message Queue

Data Persistence

Container Orchestration

Continuous Integration & Delivery

Datacenter-Cloud Operating System

1

2

3

● Manual & applications-specific configurations are slow and difficult to maintain

● Cluster sprawl and low utilization

● High risk with unique “snowflake” configurations in cloud or datacenter silos

Page 12: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

The DC/OS SDK

Page 13: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

13

DC/OS SDK● A declarative orchestration abstraction for Apache Mesos and DC/OS

● An Apache Mesos scheduler factory

● Simplify the framework development process

● Current frameworks include MongoDB, Kubernetes, Kafka, Cassandra, Elastic, HDFS, EdgeLB, Zookeeper, Jenkins, Spark and more on the way

Page 14: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

14

Components of a Service● Mesos

○ Foundation of a DC/OS cluster; Resource manager● Zookeeper

○ SDK Schedulers use Zookeeper as their persistent store across restarts● Marathon

○ “Init system” of a DC/OS cluster● Scheduler

○ Management layer of the service; exposes endpoints and maintains services nodes

● Packaging○ Packaging schema for SDK services; defines how options are exposed

Page 15: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

15

Mesos Recap: Anatomy of a Resource Offer

Mesos Master(s)

Mesos Agent

16 CPUs128 GB RAM

1 TB disk

Mesos Agent

16 CPUs128 GB RAM

1 TB disk

Mesos Agent

16 CPUs128 GB RAM

1 TB disk

Master offers resources to scheduler

SchedulerExecutor

Available compute resources

Resource offer accepted, launch executors/tasks

Tasks

Executor

Tasks

Executor

Tasks

Scheduler accepts or declines an offer

Page 16: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

16

DC/OS SDK

DC/OS

Documentation

Tools and Utilities

Apache Mesos API

Platform Feature Integration

Kafka Cockroach SparkFinite State MachineExecution PlansAutomated Recovery

Universe PackagingApp ConfigurationNetworking & DiscoveryStorageSecurityMonitoring

Offer EvaluationResource AccountingTask Reconciliation

Developer EnvironmentIntegration Test Framework

Developer GuideTutorials & Code SamplesAPI Reference

Best Practices

Services

SDK

Platform

Page 17: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

17

DC/OS SDK Features

● Horizontal scale out● Vertical scaling● Service discovery● Virtual Networks (CNI)● Readiness checks● Health checks● Custom recovery● Persistent volumes● Resource sets● Operator friendly tools (API)

● Sidecars● Placement constraints● Configuration templating● Rolling updates (configuration)● Rolling upgrades (binaries)● GPUs● Fine-grained plan control● Secrets (EE)● Security (EE)● TLS provisioning (EE)

Page 18: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

18

DC/OS SDK Anatomy

POD: What? PLAN: How and When?

Page 19: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

19

DC/OS SDK Anatomy: Podspods:  kafka:    count: {{BROKER_COUNT}}    placement: {{PLACEMENT_CONSTRAINTS}}    tasks:      broker:        cpus: {{BROKER_CPUS}}        memory: {{BROKER_MEM}}        goal: RUNNING

Page 20: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

20

DC/OS SDK Anatomy: Plans

plans:  deploy:    strategy: serial    phases:      Deployment:        strategy: {{DEPLOY_STRATEGY}}        pod: kafka

Page 21: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

21

Why build Stateful Services using the DC/OS SDK?

● Ease of install: DC/OS UI and DC/OS CLI● Persistent storage volumes: DC/OS reservations and persistent storage

volumes for data safety and durability.● Runtime configuration update: Update configuration during runtime. ● Runtime software upgrade: Upgrade software during runtime. ● Fault domain aware placement and data replication: Frameworks

automatically provision nodes and intelligently replicate data across fault domains.

● Monitoring and metrics: Frameworks send metrics to customer provided statsd metrics service for health and capacity monitoring.

Page 22: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

22

Runtime Configuration Updates

● Minimize disruption to running services.

● Detect errors early and “rollback”.

● Tight integration with DC/OS.

Page 23: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

23

Software and Configuration Updates

Change settings post installation:● Runtime update of configuration

options● Breakpoints for operator inputs● Rollback

dcos kafka update start --options=config.json dcos kafka update status

dcos kafka update pause

dcos kafka update resume

Page 24: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

Demo

Page 25: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

25

Summary

● DC/OS presents a great option to run any application “as-a-Service” on any infrastructure

● The DC/OS SDK allows for technologies to be run as stateful services on DC/OS with reduced operational complexity and increased agility

Page 26: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

Thank You!

Page 27: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

27

Resources

Documentation for data frameworks on DC/OShttps://docs.mesosphere.com/services/

SDK https://github.com/mesosphere/dcos-commonshttps://mesosphere.github.io/dcos-commons/developer-guide/https://docs.mesosphere.com/services/ops-guide/

Page 28: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

28

Rate My Session

Page 29: DC/OS Stateful Services on - Percona · 2018-04-27 · Why Stateful Services on DC/OS? Introduction to the DC/OS SDK Demo Deploying a Data Service on DC/OS Wrap-Up and Summary. 4

29

The “Operator” and “Developer”

The “Operator”• Operates the platform- IaaS, PaaS or XaaS

• Responsible for keeping the lights on and effective utilization of infrastructure

The “Developer”• And here- And maybe even here