-
Notifications
You must be signed in to change notification settings - Fork 9
Running Repairs
Repairs are a critical anti-entropy operation in Cassandra. In the past, there have been many custom solutions to manage them outside of your main Cassandra Installation. In K8ssandra, there is a tool called Reaper (contributed by Spotify and developed by TLP) that eliminates the need for a custom solution. Just like K8ssandra makes Cassandra setup easy, Reaper makes configuration of repairs even easier.
✅ Step 1: Check the cluster’s health
✅ Step 1a: Local and Civo Installs
If you are running this locally or in civo then navigate to localhost:9393/webui/
✅ Step 1b: Datastax provided VMs
Navigate to your cloud instance link list and click on reaper or use the http://repair.<YOURADDRESS>:8080/webui/
link
which should bring up the tool as shown below.
The color of the nodes indicates the overall load the nodes are experiencing at the current moment.
✅ Step 2: Schedule a cluster repair
On the left hand side, notice the schedule menu option.
Click Schedule
Click add schedule and fill out the details when you are done click the final add schedule to apply the new repair job. A Cassandra best practice is to have one repair complete per week to prevent zombie data from coming back after deletion.
Keyspace: spring_petclinic
Owner: Any_name
Interval in Days: 7
A Cassandra best practice is to have one repair complete per week to prevent zombie data from coming back after deletion.
Notice the new repair added to the list.
✅ Step 3:Run a cluster repair
On the repair job you just configured, click the Run now button.
Notice the repair job kicking off.
For more reading on Reaper, visit this link
✅ Step 4:Cleanup
Run the following command
jobs
Click to show output 📃
[1] running kubectl port-forward 9000:9000
[2] running kubectl port-forward svc/k8ssandra-dc1-stargate-service 8080 8081 8082 9042
[3] running kubectl port-forward svc/k8ssandra-grafana 9191:80
[4] - running kubectl port-forward svc/prometheus-operated 9292:9090
[5] + running kubectl port-forward svc/k8ssandra-reaper-reaper-service 9393:8080
and based on the output, kill the background processes which are not needed.
kill %1 %2 %3 %4 %5
Remove the petclinic application with the following command.
kubectl delete -f petclinic.yaml`
Get rid of the clusters. For example the Civo cluster can be removed with the following command.
civo kubernetes delete k8ssandra
Click to show output 📃
Warning: Are you sure you want to delete the k8ssandra Kubernetes cluster (y/N) ? y
The Kubernetes cluster (k8ssandra) has been deleted
Amazing work! Now go to the github repo and submit your assignment! You did a good job so let us prove it with your "K8ssandra Workshop" achievement unlocked!
Got questions? Ask us using discord chat or a community forum!