Last active
September 21, 2023 02:57
-
-
Save Enigo/ff79d36b077f1b8f0834caf05719d051 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
ip=$(curl http://169.254.169.254/latest/meta-data/local-ipv4) | |
sed -i "s/seeds: localhost/seeds: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/listen_address: localhost/listen_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/rpc_address: localhost/rpc_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
nic=$(ip link show | grep -o 'ens[0-9]*') | |
disk=$(lsblk -bno NAME,SIZE | sort -k2n | tail -n1 | awk '{print $1}') | |
scylla_setup --disks "/dev/${disk}" --online-discard 1 --nic "${nic}" --no-kernel-check --no-enable-service --no-ntp-setup --no-coredump-setup --io-setup 1 --no-version-check --no-rsyslog-setup --no-verify-package --no-cpuscaling-setup | |
systemctl start scylla-server.service | |
echo "Sleeping to give headroom for ScyllaDB to start" | |
sleep 30 | |
bash /opt/scylla_setup/setup-db.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment