Last active
March 25, 2019 02:29
-
-
Save dbathgate/5236f0e61c2e574415cb to your computer and use it in GitHub Desktop.
Installing ScyllaDB cluster in AWS with RAID0 array
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
# Installing ScyllaDB cluster in AWS with RAID0 array | |
# Prerequisites: | |
# - CentOS 7 (x86_64) with Updates HVM (available on AWS Marketplace) | |
# - Instance type with 2 hard drives for RAID0 array | |
SEED="10.0.0.11" | |
CLUSTER_NAME="Scylla Cluster" | |
PRIVATE_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) | |
######### Create RAID0 Array ############ | |
yum install mdadm -y | |
umount /dev/xvdb | |
yes | mdadm --create --verbose /dev/md0 --level=0 --name=MY_RAID --raid-devices=2 /dev/xvdb /dev/xvdc | |
mkfs.xfs -f -K /dev/md0 | |
mkdir /var/lib/scylla | |
mount /dev/md0 /var/lib/scylla | |
######################################### | |
######### Install ScyllaDB ############## | |
# Manual install of epel | |
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
# rpm -ivh rpm -ivh epel-release-latest-7*.rpm | |
yum install epel-release -y | |
curl http://downloads.scylladb.com/rpm/centos/scylla.repo -s -o /etc/yum.repos.d/scylla.repo | |
yum install scylla-server scylla-jmx scylla-tools -y | |
sed -i -e "s/cluster_name: 'Test Cluster'/cluster_name: '$CLUSTER_NAME'/g" /etc/scylla/scylla.yaml | |
sed -i -e "s/- seeds: \"127.0.0.1\"/- seeds: \"$SEED\"/g" /etc/scylla/scylla.yaml | |
sed -i -e "s/listen_address: localhost/listen_address: $PRIVATE_IP/g" /etc/scylla/scylla.yaml | |
sed -i -e "s/rpc_address: localhost/rpc_address: $PRIVATE_IP/g" /etc/scylla/scylla.yaml | |
sed -i -e "s/endpoint_snitch: SimpleSnitch/endpoint_snitch: Ec2Snitch/g" /etc/scylla/scylla.yaml | |
# Adding private IP to /etc/hosts for JMX | |
echo "$PRIVATE_IP $(hostname)" >> /etc/hosts | |
systemctl start scylla-server | |
systemctl start scylla-jmx | |
######################################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment