Database Reference
In-Depth Information
for server in ${servers[@]} ; do
echo ">> Uploading script to ${server} to remote user's
home"
scp -i ${identity_file} ${install_script}
${remote_user}@${server}:~/install_cassandra.sh
echo ">> Executing script..."
ssh -t -i ${identity_file} ${remote_user}@${server} "sudo
chmod a+x ~/install_cassandra.sh && ~/install_cassandra.sh"
echo ">> Installation finished for server: ${server}"
echo "----------------------------------------------"
done
echo ">> Cluster initialization is finished."
exit 0;
Let's discuss a couple of things before we move forward. If you decide to use this script,
and you have an Internet connection, it is recommended to take the code from either my
GitHub repository ( https://github.com/naishe/mastering-cassandra-v2 ) or you can down-
load the code bundle from the topic's website.
When I execute the following script for the demonstration of a three-node cluster, it takes
less than two minutes to get up and running. Since I ran it on a set of machines in AWS
EC2, I have tuned the settings that way. The script thus created is as follows:
$ ./upload_and_execute.sh
>> Uploading script to c1.mydomain.com to remote user's
home install_cassandra.sh 100% 2484 2.4KB/s 00:00
>> Executing script with initial_key=0
Search WWH ::




Custom Search