-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving docs #203
Improving docs #203
Changes from 20 commits
ca9f092
bd6bb14
fda0598
d01ddf6
9a7243c
1858801
78363e2
aa5cd94
d2f772d
deba598
ce1eea5
0b5a921
ee9a650
6cc3683
7c8b82d
5c279ad
9362cfc
b5c54c9
05fa769
f04d18b
4c63b76
573d0b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
+++ | ||
show_menu = true | ||
+++ | ||
|
||
## Welcome to the Cassandra Reaper documentation! | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Rest API" | ||
weight = 75 | ||
+++ | ||
|
||
# Rest API | ||
|
||
|
||
Source code for all the REST resources can be found from package com.spotify.reaper.resources. | ||
|
||
## Ping Resource | ||
|
||
* GET /ping | ||
* Expected query parameters: *None* | ||
* Simple ping resource that can be used to check whether the reaper is running. | ||
|
||
## Cluster Resource | ||
|
||
* GET /cluster | ||
* Expected query parameters: | ||
* *seedHost*: Limit the returned cluster list based on the given seed host. (Optional) | ||
* Returns a list of registered cluster names in the service. | ||
|
||
* GET /cluster/{cluster_name} | ||
* Expected query parameters: | ||
* *limit*: Limit the number of repair runs returned. Recent runs are prioritized. (Optional) | ||
* Returns a cluster object identified by the given "cluster_name" path parameter. | ||
|
||
* POST /cluster | ||
* Expected query parameters: | ||
* *seedHost*: Host name or IP address of the added Cassandra | ||
clusters seed host. | ||
* Adds a new cluster to the service, and returns the newly added cluster object, | ||
if the operation was successful. | ||
|
||
* PUT /cluster/{cluster_name} | ||
* Expected query parameters: | ||
* *seedHost*: New host name or IP address used as Cassandra cluster seed. | ||
* Modifies a cluster's seed host. Comes in handy when the previous seed has left the cluster. | ||
|
||
* DELETE /cluster/{cluster_name} | ||
* Expected query parameters: *None* | ||
* Delete a cluster object identified by the given "cluster_name" path parameter. | ||
Cluster will get deleted only if there are no schedules or repair runs for the cluster, | ||
or the request will fail. Delete repair runs and schedules first before calling this. | ||
|
||
## Repair Run Resource | ||
|
||
* GET /repair_run | ||
* Optional query parameters: | ||
* *state*: Comma separated list of repair run state names. Only names found in | ||
com.spotify.reaper.core.RunState are accepted. | ||
* Returns a list of repair runs, optionally fetching only the ones with *state* state. | ||
|
||
* GET /repair_run/{id} | ||
* Expected query parameters: *None* | ||
* Returns a repair run object identified by the given "id" path parameter. | ||
|
||
* GET /repair_run/cluster/{cluster_name} (com.spotify.reaper.resources.RepairRunResource) | ||
* Expected query parameters: *None* | ||
* Returns a list of all repair run statuses found for the given "cluster_name" path parameter. | ||
|
||
* POST /repair_run | ||
* Expected query parameters: | ||
* *clusterName*: Name of the Cassandra cluster. | ||
* *keyspace*: The name of the table keyspace. | ||
* *tables*: The name of the targeted tables (column families) as comma separated list. | ||
If no tables given, then the whole keyspace is targeted. (Optional) | ||
* *owner*: Owner name for the run. This could be any string identifying the owner. | ||
* *cause*: Identifies the process, or cause the repair was started. (Optional) | ||
* *segmentCount*: Defines the amount of segments to create for repair run. (Optional) | ||
* *repairParallelism*: Defines the used repair parallelism for repair run. (Optional) | ||
* *intensity*: Defines the repair intensity for repair run. (Optional) | ||
* *incrementalRepair*: Defines if incremental repair should be done. [true/false] (Optional) | ||
|
||
* PUT /repair_run/{id} | ||
* Expected query parameters: | ||
* *state*: New value for the state of the repair run. | ||
Possible values for given state are: "PAUSED" or "RUNNING". | ||
* Starts, pauses, or resumes a repair run identified by the "id" path parameter. | ||
* Can also be used to reattempt a repair run in state "ERROR", picking up where it left off. | ||
|
||
* DELETE /repair_run/{id} | ||
* Expected query parameters: | ||
* *owner*: Owner name for the run. If the given owner does not match the stored owner, | ||
the delete request will fail. | ||
* Delete a repair run object identified by the given "id" path parameter. | ||
Repair run and all the related repair segments will be deleted from the database. | ||
|
||
## Repair Schedule Resource | ||
|
||
* GET /repair_schedule | ||
* Expected query parameters: | ||
* *clusterName*: Filter the returned schedule list based on the given | ||
cluster name. (Optional) | ||
* *keyspaceName*: Filter the returned schedule list based on the given | ||
keyspace name. (Optional) | ||
* Returns all repair schedules present in the Reaper | ||
|
||
* GET /repair_schedule/{id} | ||
* Expected query parameters: *None* | ||
* Returns a repair schedule object identified by the given "id" path parameter. | ||
|
||
* POST /repair_schedule | ||
* Expected query parameters: | ||
* *clusterName*: Name of the Cassandra cluster. | ||
* *keyspace*: The name of the table keyspace. | ||
* *tables*: The name of the targeted tables (column families) as comma separated list. | ||
If no tables given, then the whole keyspace is targeted. (Optional) | ||
* *owner*: Owner name for the schedule. This could be any string identifying the owner. | ||
* *segmentCount*: Defines the amount of segments to create for scheduled repair runs. (Optional) | ||
* *repairParallelism*: Defines the used repair parallelism for scheduled repair runs. (Optional) | ||
* *intensity*: Defines the repair intensity for scheduled repair runs. (Optional) | ||
* *incrementalRepair*: Defines if incremental repair should be done. [true/false] (Optional) | ||
* *scheduleDaysBetween*: Defines the amount of days to wait between scheduling new repairs. | ||
For example, use value 7 for weekly schedule, and 0 for continuous. | ||
* *scheduleTriggerTime*: Defines the time for first scheduled trigger for the run. | ||
If you don't give this value, it will be next mid-night (UTC). | ||
Give date values in ISO format, e.g. "2015-02-11T01:00:00". (Optional) | ||
|
||
* DELETE /repair_schedule/{id} | ||
* Expected query parameters: | ||
* *owner*: Owner name for the schedule. If the given owner does not match the stored owner, | ||
the delete request will fail. | ||
* Delete a repair schedule object identified by the given "id" path parameter. | ||
Repair schedule will get deleted only if there are no associated repair runs for the schedule. | ||
Delete all the related repair runs before calling this endpoint. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Backends" | ||
identifier = "backends" | ||
weight = 10 | ||
+++ | ||
|
||
# Backends | ||
|
||
Cassandra Reaper can be used with either an ephemeral memory storage or persistent database. | ||
|
||
For persistent relational database storage, you must either setup PostgreSQL or H2. You also need to set `storageType: database` in the config file. | ||
|
||
Sample yaml files are available in the `src/packaging/resource` directory for each storage backend: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording
to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the next revision of the docs I'd like to include the samples in the storage pages themselves, rendering this list obsolete. I can make it part of the build process that it copies them over so they'll always be in sync. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rejig the list below so that the ordering is consistent i.e.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
* cassandra-reaper-memory.yaml | ||
* cassandra-reaper-postgres.yaml | ||
* cassandra-reaper-h2.yaml | ||
* cassandra-reaper-cassandra.yaml | ||
|
||
For configuring other aspects of the service, see the available configuration options in later section | ||
of this page. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace
with
In the above wording make Configuration Reference a link to the actual page. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Cassandra" | ||
parent = "backends" | ||
weight = 4 | ||
+++ | ||
|
||
# Cassandra Backend | ||
|
||
For persistent Apache Cassandra storage, you need to set `storageType: cassandra` in the config file. | ||
You'll also need to fill in the connection details to your Apache Cassandra cluster used to store the Reaper schema (reaper_db by default), in the `cassandra: ` section of the yaml file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording the above paragraph to something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
```yaml | ||
storageType: cassandra | ||
cassandra: | ||
clusterName: "test" | ||
contactPoints: ["127.0.0.1"] | ||
keyspace: reaper_db | ||
queryOptions: | ||
consistencyLevel: LOCAL_QUORUM | ||
serialConsistencyLevel: SERIAL | ||
``` | ||
|
||
When using SSL: | ||
|
||
```yaml | ||
cassandra: | ||
storageType: cassandra | ||
clusterName: "test" | ||
contactPoints: ["127.0.0.1"] | ||
keyspace: reaper_db | ||
authProvider: | ||
type: plainText | ||
username: cassandra | ||
password: cassandra | ||
ssl: | ||
type: jdk | ||
``` | ||
|
||
The Apache Cassandra backend is the only one that allows running several Reaper instances at once. This provides high availability and allows to repair multi DC clusters (see the **Multi-DC** section below). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reword this paragraph to something like
|
||
|
||
You will need to create a keyspace to store your data. This is installation specific, you will need to fill in your own datacenter names. For example: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording this paragraph to something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed. |
||
|
||
```none | ||
CREATE KEYSPACE reaper_db WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}; | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
+++ | ||
[menu.docs] | ||
name = "H2 (Local Storage)" | ||
parent = "backends" | ||
weight = 2 | ||
+++ | ||
|
||
|
||
# H2 Backend | ||
|
||
When using H2 storage the database will automatically created for you under the path configured in `cassandra-reaper.yaml`. Please | ||
comment/uncomment the H2 settings and modify the path as needed or use the `cassandra-reaper-h2.yaml` as a base. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording this paragraph to something like
|
||
|
||
```yaml | ||
storageType: database | ||
database: | ||
# H2 JDBC settings | ||
driverClass: org.h2.Driver | ||
url: jdbc:h2:~/reaper-db/db;MODE=PostgreSQL | ||
user: | ||
password: | ||
|
||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
+++ | ||
[menu.docs] | ||
name = "In Memory" | ||
parent = "backends" | ||
weight = 1 | ||
+++ | ||
|
||
# Memory Backend | ||
|
||
Running Reaper with memory storage, which is not persistent, means that all | ||
the registered clusters, column families, and repair runs will be lost upon service restart. | ||
The memory based storage is meant to be used for testing purposes only. Enable this type of storage by using the `storageType: memory` setting in your config file (enabled by default). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording this paragraph to something like
|
||
|
||
```yaml | ||
storageType: memory | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Postgres" | ||
parent = "backends" | ||
weight = 3 | ||
+++ | ||
|
||
# Postgres Backend | ||
|
||
The schema will be initialized/upgraded automatically upon startup in the configured database. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Insert the following sentence in before the one above.
|
||
Make sure to specify the correct credentials in your JDBC settings in `cassandra-reaper.yaml` to allow objects creation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reword this sentence to be something like
|
||
|
||
|
||
```yaml | ||
storageType: database | ||
database: | ||
# PostgreSQL JDBC settings | ||
driverClass: org.postgresql.Driver | ||
user: postgres | ||
password: | ||
url: jdbc:postgresql://127.0.0.1/reaper | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Community" | ||
weight = 100 | ||
+++ | ||
|
||
|
||
We have a [Mailing List](https://groups.google.com/forum/#!forum/tlp-apache-cassandra-reaper-users) and [Gitter chat](https://gitter.im/thelastpickle/cassandra-reaper) available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page should be a summary about the storage options available. With that in mind, lets remove this sentence and put that information in the PostgreSQL and H2 sections respectively.
Consider the following wording for listing the available storage options:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, the list links to the proper pages as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!