GithubHelp home page GithubHelp logo

natarajan77 / openshift-cassandra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anderssv/openshift-cassandra

0.0 1.0 0.0 60 KB

Forked example (manually) from Kubernetes to include some limits and enable recent build.

Dockerfile 41.86% Makefile 24.80% Shell 33.35%

openshift-cassandra's Introduction

This is a simple set up for Cassandra with two nodes in a cluster.

Create Cassandra cluster

./run.sh

Start CQLSH

oc exec -ti $(oc get -o jsonpath='{@.items[0].metadata.name}' pods) -- bash -c 'cqlsh $POD_IP 9042'

List nodes with nodetool

oc exec -ti $(oc get -o jsonpath='{@.items[0].metadata.name}' pods) -- nodetool status

Test performance

Cassandra has a build in stress test tool that is awesome.

Demo mode

You can easily run the benchmarks inside the same pod as one of the server processes. You normally don't want to do this though as it affects the server process and is constrained to the same cpu and memory as the server.

oc exec -ti $(oc get -o jsonpath='{@.items[0].metadata.name}' pods) -- bash -c 'cassandra-stress write -node $POD_IP' | tee stress.txt

Stress testing pod

To launch it in a different pod:

oc run cassandra-stress -i --tty --attach=false --image=anderssv/openshift-cassandra /bin/bash

Running the test:

oc exec \
    -t $(oc get -l 'run=cassandra-stress' -o jsonpath='{@.items[0].metadata.name}' pods) \
    -- cassandra-stress write -rate threads\>\=500 \
        -node $(oc get -o jsonpath='{@.items[0].status.podIP}' pods) \
        -graph file=/tmp/openshift-benchmark.html title=Openshift revision=benchmark-0

This will display stats but also generate a HTML report. To extract the report from the pod you can do:

mkdir -p /tmp/openshift-cassandra-report \
&& oc rsync \
    $(oc get -l 'run=cassandra-stress' -o jsonpath='{@.items[0].metadata.name}' pods):/tmp /tmp/openshift-cassandra-report

Make sure to check which node the cassandra-stress pod is running on, and that it is different from the nodes you are testing. :)

Resources

openshift-cassandra's People

Contributors

anders-sveen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.