-
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
Merged
Merged
Improving docs #203
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ca9f092
added a template for docs (internal)
rustyrazorblade bd6bb14
split up the docs to multiple files, added the content from the index…
rustyrazorblade fda0598
broke the docs into sections
rustyrazorblade d01ddf6
expanding backends
rustyrazorblade 9a7243c
showing subdirectories correctly now
rustyrazorblade 1858801
removed unused html
rustyrazorblade 78363e2
downloads and installation now under docs
rustyrazorblade aa5cd94
updated index
rustyrazorblade d2f772d
can control which pages we show the menu on
rustyrazorblade deba598
config reference
rustyrazorblade ce1eea5
fixed bullets on backend page
rustyrazorblade 0b5a921
fixed reference to packaging directory
rustyrazorblade ee9a650
breaking out the install and download pages to dedicated sections
rustyrazorblade 6cc3683
moving docker under download and install
rustyrazorblade 7c8b82d
added a partial template for side nav. added to both list and single…
rustyrazorblade 5c279ad
got side nav working, looking good
rustyrazorblade 9362cfc
formatting fix on install instructions
rustyrazorblade b5c54c9
fixed install instructions
rustyrazorblade 05fa769
fixed formatting
rustyrazorblade f04d18b
fixed link
rustyrazorblade 4c63b76
did a bunch of anthony's suggestions
rustyrazorblade 573d0b0
Documentation updates
ossarga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
+++ | ||
show_menu = true | ||
+++ | ||
|
||
## Welcome to the Cassandra Reaper documentation! | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
+++ | ||
[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. | ||
|
||
Reaper provides a number of backend storage options: | ||
|
||
* [In-Memory]({{<ref "memory.md" >}}) | ||
* [Cassanda]({{<ref "cassandra.md">}}) | ||
* [PostgresQL]({{<ref "postgres.md">}}) | ||
* [H2]({{<ref "h2.md">}}) | ||
|
||
Sample yaml files are available in the `src/packaging/resource` directory for each of the above storage backends: | ||
|
||
|
||
|
||
* cassandra-reaper-memory.yaml | ||
* cassandra-reaper-cassandra.yaml | ||
* cassandra-reaper-postgres.yaml | ||
* cassandra-reaper-h2.yaml | ||
|
||
For configuring other aspects of the service, see the available configuration options in the [Configuration Reference]({{<ref "configuration.md">}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Cassandra" | ||
parent = "backends" | ||
weight = 4 | ||
+++ | ||
|
||
# Cassandra Backend | ||
|
||
To use Apache Cassandra as the persistent storage for Reaper, the storageType setting must be set to cassandra in the Reaper configuration YAML file. In addition, the connection details for the Apache Cassandra cluster being used to store Reaper data must be specified in the configuration YAML file. | ||
|
||
For example: | ||
|
||
```yaml | ||
storageType: cassandra | ||
cassandra: | ||
clusterName: "test" | ||
contactPoints: ["127.0.0.1"] | ||
keyspace: reaper_db | ||
queryOptions: | ||
consistencyLevel: LOCAL_QUORUM | ||
serialConsistencyLevel: SERIAL | ||
``` | ||
|
||
If you're using authentication or 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. | ||
|
||
|
||
To run Reaper using the Cassandra backend, create a reaper_db keyspace with an appropriate placement strategy. This is installation specific, and names of the data centers in the cluster that will host the Reaper data must be specified. For example: | ||
|
||
|
||
```none | ||
CREATE KEYSPACE reaper_db WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
To use H2 as the persistent storage for Reaper, the storageType setting must be set to database in the Reaper configuration YAML file. When using H2 storage, the database will be automatically created under the path configured in the configuration YAML file. An example of how to configure H2 as persistent storage for Reaper can be found in the cassandra-reaper-h2.yaml. | ||
|
||
|
||
```yaml | ||
storageType: database | ||
database: | ||
# H2 JDBC settings | ||
driverClass: org.h2.Driver | ||
url: jdbc:h2:~/reaper-db/db;MODE=PostgreSQL | ||
user: | ||
password: | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
To use in memory storage as the storage type for Reaper, the `storageType` setting must be set to **memory** in the Reaper configuration YAML file. Note that the in memory storage is enabled by default. | ||
|
||
In memory storage is volatile and as such all registered cluster, column families and repair un information will be lost upon service restart. This storage setting is intended for testing purposes only. | ||
|
||
```yaml | ||
storageType: memory | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Postgres" | ||
parent = "backends" | ||
weight = 3 | ||
+++ | ||
|
||
# Postgres Backend | ||
|
||
To use PostgreSQL as the persistent storage for Reaper, the `storageType` setting must be set to **database** in the Reaper configuration YAML file. The schema will be initialized/upgraded automatically upon startup in the configured database. Ensure that the correct JDBC credentials are specified in the `cassandra-reaper.yaml` to allow object creation. | ||
|
||
|
||
```yaml | ||
storageType: database | ||
database: | ||
# PostgreSQL JDBC settings | ||
driverClass: org.postgresql.Driver | ||
user: postgres | ||
password: | ||
url: jdbc:postgresql://127.0.0.1/reaper | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!