-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a9e482
commit a9a39e8
Showing
11 changed files
with
458 additions
and
28 deletions.
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 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,53 @@ | ||
+++ | ||
[menu.docs] | ||
name = "Astra" | ||
parent = "backends" | ||
weight = 5 | ||
+++ | ||
|
||
# Astra Backend | ||
|
||
To use Astra (Cassandra managed service by Datastax) as the persistent storage for Reaper, the `storageType` setting must be set to **astra** in the Reaper configuration YAML file. In addition, the connection details for the Astra cluster being used to store Reaper data must be specified in the configuration YAML file. An example of how to configure Astra as persistent storage for Reaper can be found in the *[cassandra-reaper-astra.yaml](https://github.com/thelastpickle/cassandra-reaper/blob/master/src/packaging/resource/cassandra-reaper-astra.yaml)*. | ||
|
||
```yaml | ||
storageType: astra | ||
cassandra: | ||
clusterName: "reaper" | ||
contactPoints: ["astra host from the secure bundle config.json file"] | ||
keyspace: reaper_db | ||
port: <cql port found in the secure bundle cqlshrc file> | ||
authProvider: | ||
type: plainText | ||
username: reaper | ||
password: ReaperOnAstraRocks | ||
ssl: | ||
type: jdk | ||
``` | ||
The CQL port to connect to can be found in the `cqlshrc` file of Astra's secure connect bundle. The port found in `config.json` is the metadata port which cannot be used for CQL connections. | ||
|
||
The Astra backend provides the same capabilities as [the Cassanda backend]({{<ref "cassandra.md">}}). | ||
|
||
Schema initialization and migration will be done automatically upon startup. | ||
|
||
## SSL settings | ||
|
||
Astra enables client to node encryption by default, which requires some additional setup in Reaper. | ||
After installing Reaper and configuring the yaml file, copy the `cassandra-reaper-ssl.properties` file to the `/etc/cassandra-reaper` directory (the temmplate can be found under `/etc/cassandra-reaper/configs/`) and configure it as follows: | ||
|
||
``` | ||
-Djavax.net.ssl.keyStore=/path/to/identity.jks | ||
-Djavax.net.ssl.keyStorePassword=keystore_password | ||
-Djavax.net.ssl.trustStore=/path/to/trustStore.jks | ||
-Djavax.net.ssl.trustStorePassword=truststore_password | ||
# Comment the following line when using the Astra backend | ||
# unless JMX encryption is enabled with the same keystore/truststore | ||
# -Dssl.enable=true | ||
``` | ||
|
||
The truststore and keystore (identity) files can be found in the secure connect bundle which should be downloaded from your Astra dashboard. The passwords will be found in the `config.json` file of that same bundle. | ||
Make sure you comment the `-Dssl.enable=true` line as it enables JMX encryption. | ||
|
||
If both CQL and JMX encryption need to be enabled, then JMX encryption must be configured to use the same truststore/keystore than Astra, and the `-Dssl.enable=true` should be left uncommented. |
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 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,138 @@ | ||
# Copyright 2020-2020 DataStax, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Cassandra Reaper Configuration Example. | ||
# See a bit more complete example in: | ||
# src/server/src/test/resources/cassandra-reaper.yaml | ||
segmentCountPerNode: 64 | ||
repairParallelism: DATACENTER_AWARE | ||
repairIntensity: 0.9 | ||
scheduleDaysBetween: 7 | ||
repairRunThreadCount: 15 | ||
hangingRepairTimeoutMins: 30 | ||
storageType: astra | ||
enableCrossOrigin: true | ||
incrementalRepair: false | ||
blacklistTwcsTables: true | ||
enableDynamicSeedList: true | ||
repairManagerSchedulingIntervalSeconds: 10 | ||
activateQueryLogger: false | ||
jmxConnectionTimeoutInSeconds: 5 | ||
useAddressTranslator: false | ||
# purgeRecordsAfterInDays: 30 | ||
# numberOfRunsToKeepPerUnit: 10 | ||
|
||
# datacenterAvailability has three possible values: ALL | LOCAL | EACH | SIDECAR | ||
# the correct value to use depends on whether jmx ports to C* nodes in remote datacenters are accessible | ||
# If the reaper has access to all node jmx ports, across all datacenters, then configure to ALL. | ||
# If jmx access is only available to nodes in the same datacenter as reaper in running in, then configure to LOCAL. | ||
# If there's a reaper instance running in every datacenter, and it's important that nodes under duress are not involved in repairs, | ||
# then configure to EACH. | ||
# If jmx access is restricted to localhost, then configure to SIDECAR. | ||
# | ||
# The default is ALL | ||
datacenterAvailability: ALL | ||
|
||
logging: | ||
level: INFO | ||
loggers: | ||
com.datastax.driver.core.QueryLogger.NORMAL: | ||
level: DEBUG | ||
additive: false | ||
appenders: | ||
- type: file | ||
currentLogFilename: /var/log/cassandra-reaper/query-logger.log | ||
archivedLogFilenamePattern: query-logger-%d.log.gz | ||
archivedFileCount: 2 | ||
io.dropwizard: WARN | ||
org.eclipse.jetty: WARN | ||
appenders: | ||
- type: console | ||
logFormat: "%-6level [%d] [%t] %logger{5} - %msg %n" | ||
threshold: WARN | ||
- type: file | ||
logFormat: "%-6level [%d] [%t] %logger{5} - %msg %n" | ||
currentLogFilename: /var/log/cassandra-reaper/reaper.log | ||
archivedLogFilenamePattern: /var/log/cassandra-reaper/reaper-%d.log.gz | ||
archivedFileCount: 99 | ||
|
||
server: | ||
type: default | ||
applicationConnectors: | ||
- type: http | ||
port: 8080 | ||
bindHost: 0.0.0.0 | ||
adminConnectors: | ||
- type: http | ||
port: 8081 | ||
bindHost: 0.0.0.0 | ||
requestLog: | ||
appenders: [] | ||
|
||
cassandra: | ||
clusterName: "reaper" | ||
contactPoints: ["astra host from the secure bundle config.json file"] | ||
keyspace: reaper_db | ||
port: <cql port found in the secure bundle cqlshrc file> | ||
authProvider: | ||
type: plainText | ||
username: reaper | ||
password: ReaperOnAstraRocks | ||
ssl: | ||
type: jdk | ||
loadBalancingPolicy: | ||
type: tokenAware | ||
shuffleReplicas: true | ||
subPolicy: | ||
type: dcAwareRoundRobin | ||
localDC: | ||
usedHostsPerRemoteDC: 0 | ||
allowRemoteDCsForLocalConsistencyLevel: false | ||
autoScheduling: | ||
enabled: false | ||
initialDelayPeriod: PT15S | ||
periodBetweenPolls: PT10M | ||
timeBeforeFirstSchedule: PT5M | ||
scheduleSpreadPeriod: PT6H | ||
excludedKeyspaces: | ||
- keyspace1 | ||
- keyspace2 | ||
excludedClusters: | ||
# - cluster1 | ||
|
||
|
||
# Uncomment the following to enable dropwizard metrics | ||
# Configure to the reporter of your choice | ||
# Reaper also provides prometheus metrics on the admin port at /prometheusMetrics | ||
|
||
#metrics: | ||
# frequency: 1 minute | ||
# reporters: | ||
# - type: log | ||
# logger: metrics | ||
|
||
# Uncomment the following to enable encryption and the ability to store jmx credentials in | ||
# the backend data source where SOME_SYSTEM_PROPERTY_KEY is a system property that can be | ||
# used to lookup the shared symmetric key. | ||
# ie: export SOME_SYSTEM_PROPERTY=YOUR_SHARED_SYMMETRIC_KEY | ||
|
||
#cryptograph: | ||
# type: symmetric | ||
# systemPropertySecret: SOME_SYSTEM_PROPERTY | ||
|
||
# Authentication is enabled by default | ||
accessControl: | ||
sessionTimeout: PT10M | ||
shiro: | ||
iniConfigs: ["classpath:shiro.ini"] |
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 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 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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
/* | ||
( * Copyright 2014-2017 Spotify AB)?( * Copyright \d\d\d\d-\d\d\d\d Stefan Podkowinski)? | ||
( * Copyright \d\d\d\d-\d\d\d\d The Last Pickle Ltd)? | ||
* | ||
* Licensed under the Apache License, Version 2.0 \(the "License"\); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
\/\* | ||
(^ \* Copyright \d\d\d\d-\d\d\d\d Spotify AB$|^ \* Copyright \d\d\d\d-\d\d\d\d Stefan Podkowinski$|^ \*$)? | ||
(^ \* Copyright \d\d\d\d-\d\d\d\d The Last Pickle Ltd$)+(^ \* Copyright \d\d\d\d-\d\d\d\d DataStax, Inc.$|^ \*$){0,1} | ||
( \*|\* Licensed under the Apache License, Version 2.0 \(the "License"\);)+ | ||
( \* Licensed under the Apache License, Version 2.0 \(the "License"\);| \* you may not use this file except in compliance with the License\.)+ | ||
( \* you may not use this file except in compliance with the License\.| \* You may obtain a copy of the License at)+ | ||
( \* You may obtain a copy of the License at| \*)+ | ||
( \*| \* http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0)+ | ||
( \* http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0| \*)+ | ||
( \*| \* Unless required by applicable law or agreed to in writing, software)+ | ||
( \* Unless required by applicable law or agreed to in writing, software|\* distributed under the License is distributed on an "AS IS" BASIS,)+ | ||
( \* distributed under the License is distributed on an "AS IS" BASIS,| \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.)+ | ||
( \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.| \* See the License for the specific language governing permissions and)+ | ||
( \* See the License for the specific language governing permissions and| \* limitations under the License\.)+ | ||
( \* limitations under the License\.| \*)+ | ||
( \*)+ |
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
Oops, something went wrong.