Skip to content

Instantly share code, notes, and snippets.

@akotlar
Last active August 9, 2016 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akotlar/91538037836b18ec46775c2217b97c9f to your computer and use it in GitHub Desktop.
Save akotlar/91538037836b18ec46775c2217b97c9f to your computer and use it in GitHub Desktop.
Seqant ec2 setup script; sets up raid0
#! /usr/bin/env bash
sudo yum update -y
sudo yum install git -y
sudo gem install rmate
sudo yum install sysstat -y
touch ~/.inputrc
(echo ""; echo '"\e[A": history-search-backward') >> ~/.inputrc
(echo ""; echo '"\e[B": history-search-forward') >> ~/.inputrc
# Assuming your devices are xvdb and xvdc
sudo mdadm --create --verbose /dev/md0 --level=0 --name=ANNOTATOR_RAID --raid-devices=2 /dev/xvdb /dev/xvdc
sudo mkfs.ext4 -L ANNOTATOR_RAID /dev/md0
sudo mkdir -p /mnt/annotator_databases
sudo mount LABEL=ANNOTATOR_RAID /mnt/annotator_databases/
sudo cp /etc/fstab /etc/fstab.orig
sudo bash;
sudo ( echo '' ; echo 'LABEL=ANNOTATOR_RAID /mnt/annotator_databases/ ext4 defaults,noatime,nodiratime,noexec 0 2') >> /etc/fstab
#Test that it all worked
sudo mount -a
sudo mkdir /efs
sudo mount -t nfs4 -o nfsvers=4.1 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).fs-4da96f04.efs.us-east-1.amazonaws.com:/ /efs
# If want to set up your git account
#ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
## Copy git key to bash_profile (uncomment first)
#if [ -z "$SSH_AUTH_SOCK" ] ; then
# eval `ssh-agent -s`
# ssh-add ~/.ssh/id_rsa
#fi
## Add to your git account
# cat ~/.ssh/id_rsa.pub
# copy that, and add to the git panel
# Then change permissions
# chmod 400 /home/ec2-user/.ssh/id_rsa*
cd ~
git clone git://github.com/akotlar/seq-lmdb.git
cd seq-lmdb
./install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment