mesosphere and contentteam: a new way to run cassandra

57
A New Way to Run Cassandra

Upload: datastax-academy

Post on 05-Apr-2017

1.805 views

Category:

Technology


1 download

TRANSCRIPT

A New Way to Run Cassandra

© 2015. All Rights Reserved.

Speakers

Ben Whitehead@BenRWhitehead

Distributed Applications Engineer

2

Robert Stupp@snazy

Committer to Apache Cassandra & MVP

© 2015. All Rights Reserved.

Disclaimer

Opinions and facts mentioned in our talk are purely our own and not necessarily those of Mesosphere or contentteam.

So, don’t take us too seriously as we are tech kids that just like to play with cool technology – seriously.

Open source software requires the input from the community – and that is you, please help us to improve it. Get involved and spread the word!

3

© 2015. All Rights Reserved.

1 Apache Mesos intro

2 Apache Mesos architecture

3 Cassandra-Mesos framework

4 Demo

5 Q & A

4

© 2015. All Rights Reserved. 5

Mesos lets us treat a cluster of nodes...

© 2015. All Rights Reserved. 6

As one big computer

© 2015. All Rights Reserved. 7

Not as individual machines

© 2015. All Rights Reserved. 7

Not as individual machines Not as VMs

But as computational resources like cores, memory, disk, etc.

© 2015. All Rights Reserved. 9

© 2015. All Rights Reserved.

Apache Mesos

• Open Source Apache project

• Cluster Resource Manager

• Scalable to 10,000s of nodes

• Fault-tolerant, battle-tested

• A kernel for your datacenter

10

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI

• init, cron, package management, discovery, admin routing

• Ecosystem of DCOS Services

11

© 2015. All Rights Reserved.

DCOS CLI

12

$  dcos Command  line  utility  for  the  Mesosphere  Datacenter  Operating System  (DCOS).  The  Mesosphere  DCOS  is  a  distributed  operating system  built  around  Apache  Mesos.  This  utility  provides  tools for  easy  management  of  a  DCOS  installation. Available  DCOS  commands:                config                    Get  and  set  DCOS  CLI  configuration  properties                help                        Display  command  line  usage  information                marathon                Deploy  and  manage  applications  on  the  DCOS                node                        Manage  DCOS  nodes                package                  Install  and  manage  DCOS  software  packages                service                  Manage  DCOS  services                task                        Manage  DCOS  tasks

© 2015. All Rights Reserved.

DCOS

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

13

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

13

Cassandra

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

• Highly scalable database

13

Cassandra

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

• Highly scalable database• Continuously available

13

Cassandra

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

• Highly scalable database• Continuously available

• Scale out as you need

13

Cassandra

© 2015. All Rights Reserved.

DCOS

• Web UI and CLI• init, cron, DNS• package management• On-premise + cloud

• Ecosystem of DCOS Services

• Highly scalable database• Continuously available

• Scale out as you need

13

Cassandra

Cassandra-Mesos framework

© 2015. All Rights Reserved.

Cassandra-Mesos framework

• Apache2 licensedhttp://github.com/mesosphere/cassandra-mesos

• Included in Mesosphere DCOS

14

© 2015. All Rights Reserved.

Cassandra-Mesos use case

15

© 2015. All Rights Reserved.

Cassandra-Mesos use case

Use-case:Create Cassandra cluster with X nodes.

Mesos provides the Cassandra cluster with X nodes!

15

© 2015. All Rights Reserved.

Cassandra-Mesos use case

Use-case:Create Cassandra cluster with X nodes.

Mesos provides the Cassandra cluster with X nodes!

• Devs needing a cluster “right now”

15

© 2015. All Rights Reserved.

Cassandra-Mesos use case

Use-case:Create Cassandra cluster with X nodes.

Mesos provides the Cassandra cluster with X nodes!

• Devs needing a cluster “right now”• Start the cluster without the hassle to setup servers

15

© 2015. All Rights Reserved.

Cassandra-Mesos use case

Use-case:Create Cassandra cluster with X nodes.

Mesos provides the Cassandra cluster with X nodes!

• Devs needing a cluster “right now”• Start the cluster without the hassle to setup servers• Flexible scale-out

15

© 2015. All Rights Reserved.

Cassandra-Mesos framework

• In the beginning: just a bunch of commodity servers

• Define Cassandra cluster size

• Seed Cassandra nodes are allocated and started

• Remaining Cassandra nodes allocated and started

• That’s it – period.

16

© 2015. All Rights Reserved.

Cassandra-Mesos framework

17

© 2015. All Rights Reserved.

Cassandra-Mesos framework

18

© 2015. All Rights Reserved.

Cassandra-Mesos framework

19

© 2015. All Rights Reserved.

Cassandra-Mesos framework

20

© 2015. All Rights Reserved.

Cassandra-Mesos framework

21

© 2015. All Rights Reserved.

Cassandra-Mesos framework

22

© 2015. All Rights Reserved.

Cassandra-Mesos framework

23

© 2015. All Rights Reserved.

Cassandra-Mesos framework

24

© 2015. All Rights Reserved.

Cassandra-Mesos framework

25

© 2015. All Rights Reserved.

Cassandra-Mesos framework

26

© 2015. All Rights Reserved.

Cassandra-Mesos – getting started

Give it – # of nodes (and # of seeds)

– # of cores per node

– Amount of RAM per node

– Amount of disk space per node

– Name of cluster

“and press ENTER”

27

© 2015. All Rights Reserved.

Cassandra-Mesos – add Cassandra nodes

• Add as many Cassandra nodes as you need

• Coordinated by the scheduler, fault-tolerant

• Just a REST API call

28

© 2015. All Rights Reserved.

Cassandra-Mesos – repair

• Anti-entropy repair (aka. nodetool repair)

• Can perform cluster-wide maintenance job (“rolling”)

• Scheduler keeps track of the job, persists state, fault tolerant

• Triggered via REST API

29

© 2015. All Rights Reserved.

Cassandra-Mesos – more cluster jobs

• Cleanup

• Replace (dead) node

• Restart

• QA-Report

• etc.

30

© 2015. All Rights Reserved.

Cassandra-Mesos – REST API

• Manage + monitor cluster jobs

• Inspect configuration

• Inspect status / health information

• Change seed node status

• Add more nodes

31

© 2015. All Rights Reserved.

Cassandra-Mesos – CLI tools

• Use Cassandra tools with Mesos-DNS

• Supporting CLI tool wrappers for – nodetool – cqlsh – cassandra-stress

32

© 2015. All Rights Reserved.

Cassandra-Mesos – how to access?

33

© 2015. All Rights Reserved.

Cassandra-Mesos – how to access?

• “Wait, how do I access the cluster? I don’t know on which nodes it runs!”

33

© 2015. All Rights Reserved.

Cassandra-Mesos – how to access?

• “Wait, how do I access the cluster? I don’t know on which nodes it runs!”

• Right!

33

© 2015. All Rights Reserved.

Cassandra-Mesos – how to access?

• “Wait, how do I access the cluster? I don’t know on which nodes it runs!”

• Right!

• Mesos-DNS

33

© 2015. All Rights Reserved.

Cassandra-Mesos – client application?

• Mesos-DNS ! • DataStax Java Driver example

accessing cluster named “foo”Cluster cluster = Cluster.builder() .addContactPoint( "cassandra-foo-node. cassandra.foo.mesos") .build();

34

© 2015. All Rights Reserved.

Cassandra-Mesos – upcoming

• Cassandra upgrade job

• Enhanced configuration options

• Extended multi data center support

• Backup using snapshots

• Includes restore functionality

35

© 2015. All Rights Reserved.

Cassandra-Mesos – LIVE DEMO!

• We would really love to show that it really scales to some hundred nodes!

• We can do that in meetups! • But – time is a rare resource today…

36

© 2015. All Rights Reserved. 37

© 2015. All Rights Reserved. 37

Thank youhttp://github.com/mesosphere/cassandra-mesos