File tree 3 files changed +23
-6
lines changed
docker/initialize-reaper_db
3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -431,9 +431,13 @@ node's status:
431
431
432
432
Once the Cassandra node is online and accepting CQL connections,
433
433
create the required `reaper_db` Cassandra keyspace to allow Reaper to save
434
- its cluster and scheduling data:
434
+ its cluster and scheduling data.
435
435
436
- ```docker-compose run initialize-reaper_db```
436
+ By default, the `reaper_db` keyspace is created using a replication factor
437
+ of 1. To change this replication factor, provide the intended replication
438
+ factor as an optional argument:
439
+
440
+ ```docker-compose run initialize-reaper_db [$REPLICATION_FACTOR]```
437
441
438
442
Wait a few moments for the `reaper_db` schema change to propagate,
439
443
then start Reaper:
Original file line number Diff line number Diff line change 1
1
FROM cassandra:3.11
2
2
3
- # create the required reaper_db keyspace to allow Reaper to store scheduling data
4
- CMD set -x \
5
- && cqlsh cassandra -e \
6
- "CREATE KEYSPACE IF NOT EXISTS reaper_db WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };"
3
+ # create the reaper_db keyspace
4
+ COPY docker-entrypoint.sh /
5
+ ENTRYPOINT ["/docker-entrypoint.sh" ]
6
+
7
+ # use a default replication factor of 1
8
+ CMD ["1" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -x
4
+
5
+ REPLICATION_FACTOR=$1
6
+
7
+ # create the required reaper_db keyspace to allow Reaper to store scheduling data
8
+ cqlsh cassandra -e \
9
+ " CREATE KEYSPACE IF NOT EXISTS reaper_db \
10
+ WITH replication = {'class': 'SimpleStrategy', \
11
+ 'replication_factor': $REPLICATION_FACTOR };"
You can’t perform that action at this time.
0 commit comments