From 153304cff4a0fe3deb83db7d3564d45b9016861a Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Thu, 14 Apr 2016 17:12:38 -0600 Subject: [PATCH 1/2] Intial draft on SeedProvider docs --- cassandra/java/README.md | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 cassandra/java/README.md diff --git a/cassandra/java/README.md b/cassandra/java/README.md new file mode 100644 index 00000000..67641d2d --- /dev/null +++ b/cassandra/java/README.md @@ -0,0 +1,61 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + + + +The latest release of this document can be found +[here](http://releases.k8s.io/release-1.2/examples/README.md). + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Cassandra on Kubernetes Custom Seed Provider: releases.k8s.io/HEAD + +Within any deployment of Cassandra a Seed Provider is used to for node discovery and communication. When a Cassandra node first starts it must discover which nodes, or seeds, for the information about the Cassandra nodes in the ring / rack / datacenter. + +This Java project provides a custom Seed Provider which communicates with the Kubernetes API to discover the required information. This provider is bundled with the Docker provided in this example. + +# Configuring the Seed Provider +The following environment variables may be used to override the default configurations: + +| ENV VAR | DEFAULT VALUE | NOTES | +| ------------- |:-------------: |:-------------:| +| KUBERNETES_PORT_443_TCP_ADDR | kubernetes.default.svc.cluster.local | The hostname of the API server | +| KUBERNETES_PORT_443_TCP_PORT | 443 | API port number | +| CASSANDRA_SERVICE | cassandra | Default service name for lookup | +| POD_NAMESPACE | default | Default pod service namespace | + +# Using +This seed provider is packaged with the Cassandra example docker. See the [_Pods_](../../docs/../user-guide/pods.md) documentation on how to configure and or customize environment variables when deploying a new pod to K8s. Also see the [_EXAMPLE_](../README.md) documentation on how to configure and deploy the Cassandra demo. + +If no endpoints are discovered from the API the seeds configured in the cassandra.yaml file are used. + +# Provider limitations + +This Cassandra Provider implements `SeedProvider`. and utilizes `SimpleSnitch`. This limits a Cassandra Ring to a single Cassandra Datacenter and ignores Rack setup. Datastax provides more documentation on the use of [_SNITCHES_](https://docs.datastax.com/en/cassandra/3.x/cassandra/architecture/archSnitchesAbout.html). Further development is planned to +expand this capability. + +This in affect makes every node a seed provider, which is not a recommended best practice. This increases maintenance and reduces gossip performance. From a8c39a3a518a4658ec92d82a6531e007085e7a16 Mon Sep 17 00:00:00 2001 From: Chris Love Date: Tue, 19 Apr 2016 14:13:36 -0600 Subject: [PATCH 2/2] ran hack/update-generated-docs.sh like I should --- cassandra/java/README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cassandra/java/README.md b/cassandra/java/README.md index 67641d2d..adba2314 100644 --- a/cassandra/java/README.md +++ b/cassandra/java/README.md @@ -18,11 +18,6 @@ If you are using a released version of Kubernetes, you should refer to the docs that go with that version. - - -The latest release of this document can be found -[here](http://releases.k8s.io/release-1.2/examples/README.md). - Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). @@ -39,6 +34,7 @@ Within any deployment of Cassandra a Seed Provider is used to for node discovery This Java project provides a custom Seed Provider which communicates with the Kubernetes API to discover the required information. This provider is bundled with the Docker provided in this example. # Configuring the Seed Provider + The following environment variables may be used to override the default configurations: | ENV VAR | DEFAULT VALUE | NOTES | @@ -49,7 +45,7 @@ The following environment variables may be used to override the default configur | POD_NAMESPACE | default | Default pod service namespace | # Using -This seed provider is packaged with the Cassandra example docker. See the [_Pods_](../../docs/../user-guide/pods.md) documentation on how to configure and or customize environment variables when deploying a new pod to K8s. Also see the [_EXAMPLE_](../README.md) documentation on how to configure and deploy the Cassandra demo. + If no endpoints are discovered from the API the seeds configured in the cassandra.yaml file are used. @@ -58,4 +54,9 @@ If no endpoints are discovered from the API the seeds configured in the cassandr This Cassandra Provider implements `SeedProvider`. and utilizes `SimpleSnitch`. This limits a Cassandra Ring to a single Cassandra Datacenter and ignores Rack setup. Datastax provides more documentation on the use of [_SNITCHES_](https://docs.datastax.com/en/cassandra/3.x/cassandra/architecture/archSnitchesAbout.html). Further development is planned to expand this capability. -This in affect makes every node a seed provider, which is not a recommended best practice. This increases maintenance and reduces gossip performance. +This in affect makes every node a seed provider, which is not a recommended best practice. This increases maintenance and reduces gossip performance. + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/cassandra/java/README.md?pixel)]() +