GithubHelp home page GithubHelp logo

natarajan77 / cassandra-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eformat/cassandra

0.0 1.0 0.0 24 KB

Deploying Clustered Cassandra on OpenShift

License: GNU General Public License v3.0

cassandra-1's Introduction

cassandra

Deploying Clustered Cassandra on OpenShift

Manual method (OpenShift versions prior to v3.7)

oc new-project cassandra

As cluster admin, make the following policy change:

oc adm policy add-scc-to-user anyuid -z default -n cassandra

Create (3) apps. Wait for each pod to become ready before creating the next app.

oc new-app --name=cassandra-0 docker.io/cassandra -e CASSANDRA_BROADCAST_ADDRESS=cassandra-0.cassandra.svc.cluster.local

oc new-app --name=cassandra-1 docker.io/cassandra -e CASSANDRA_SEEDS=cassandra-0.cassandra.svc.cluster.local CASSANDRA_BROADCAST_ADDRESS=cassandra-1.cassandra.svc.cluster.local

oc new-app --name=cassandra-2 docker.io/cassandra -e CASSANDRA_SEEDS=cassandra-0.cassandra.svc.cluster.local CASSANDRA_BROADCAST_ADDRESS=cassandra-2.cassandra.svc.cluster.local

Proceed to checking the cluster status.

StatefulSets method (tech preview in v3.7)

Based on an example from the Kubernetes tutorials.

(3) existing 1Gi PVs are required.

Create a project

oc new-project statefuldead

As cluster admin, make the following policy change:

oc adm policy add-scc-to-user privileged -z default -n statefuldead

Create the Service and StatefulSet from a template.

oc process -f https://raw.githubusercontent.com/bkoz/cassandra/master/cassandra-cluster.yaml | oc create -f -

Check the cluster status by running nodetool status from any pod that is ready.

Wait for (3) cassandra pods to become ready.

oc get pods

NAME          READY     STATUS    RESTARTS   AGE
cassandra-0   1/1       Running   0          1h
cassandra-1   1/1       Running   0          59m
cassandra-2   1/1       Running   0          58m

oc rsh cassandra-0 nodetool status

Datacenter: DC1-K8Demo
======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address      Load       Tokens       Owns (effective)  Host ID                               Rack
UN  172.17.0.9   83.54 KiB  32           63.0%             68fc41fd-3d3f-435a-bbd4-50e9869ba0ba  Rack1-K8Demo
UN  172.17.0.8   127.51 KiB  32           61.0%             81d63634-7161-4042-8f4e-c0aaff465f16  Rack1-K8Demo
UN  172.17.0.10  84.71 KiB  32           75.9%             68489417-2864-4a42-9897-e31433265407  Rack1-K8Demo

Clean up

oc delete all,pvc --all

cassandra-1's People

Contributors

bkoz avatar natarajan77 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.