Last active
January 6, 2023 03:06
-
-
Save christopherdeutsch/5347960 to your computer and use it in GitHub Desktop.
Upgrade a Cassandra node
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Upgrade a node | |
| # | |
| cassandra_config="/etc/cassandra/cassandra.yaml" | |
| echo "Taking snapshot..." | |
| nodetool -h localhost snapshot | |
| echo "Stopping Cassandra..." | |
| monit stop cassandra | |
| while [ $(ps -ef | grep jsvc | wc -l) -gt 1 ]; do | |
| echo "Waiting for Cassandra to stop..." | |
| sleep 5 | |
| done | |
| echo "Downloading and installing Cassandra 1.1..." | |
| wget "https://archive.apache.org/dist/cassandra/debian/pool/main/c/cassandra/cassandra_1.1.10_all.deb" | |
| dpkg --force-confold -i cassandra_1.1.10_all.deb | |
| echo "Starting Cassandra..." | |
| monit restart cassandra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment