Skip to content

Instantly share code, notes, and snippets.

@fyrz
Last active October 10, 2019 12:07
Show Gist options
  • Save fyrz/7a7d2729ff6d12b1cad7 to your computer and use it in GitHub Desktop.
Save fyrz/7a7d2729ff6d12b1cad7 to your computer and use it in GitHub Desktop.
Vagrant - Ubuntu 14.10 - RocksDB dev maschine
#!/usr/bin/env bash
# Ubuntu 14.10 Vagrant Dev machine for RocksDB development
#
# $> vagrant box add Ubuntu14.10 https://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-amd64-vagrant-disk1.box
# $> vagrant init Ubuntu14.10
# $> vagrant up
#
# - Increase RAM to 8048M
#
#
# install necessary software on clean Ubuntu system
sudo apt-get update
sudo apt-get -y install git git-extras rdate make llvm g++ libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev maven
# openjdk
sudo apt-get -y install openjdk-8-jdk
# sunjdk 8 alternative
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-alternatives --set "java" /usr/lib/jvm/java-8-oracle/jre/bin/java
sudo update-alternatives --set "javac" /usr/lib/jvm/java-8-oracle/bin/javac
sudo update-alternatives --set "javaws" /usr/lib/jvm/java-8-oracle/jre/bin/javaws
sudo update-alternatives --set "jar" /usr/lib/jvm/java-8-oracle/bin/jar
sudo cp /usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts /etc/ssl/certs/java/
# set current time
sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
sudo rdate -s ptbtime1.ptb.de
# set java home so we can build rocksdb jars
echo 'export JAVA_HOME" >> ~/.bashrc
echo "JAVA_HOME=$(echo /usr/lib/jvm/java-8-openjdk*)" >> ~/.bashrc
# set git config
git config --global user.name "fyrz"
git config --global user.email "fyrgoss@gmail.com"
git config --global push.default simple
# bash prompt
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
source ~/.git-prompt.sh
echo 'PS1="\[$GREEN\]\t\[$RED\]-\[$BLUE\]\u\[$YELLOW\]\[$YELLOW\]\w\[\033[m\]\[$MAGENTA\]\$(__git_ps1)\[$WHITE\]\$ "' >> ~/.bashrc
# clone rocksdb repository
cd /vagrant
git clone https://github.com/fyrz/rocksdb.git
cd rocksdb
git remote add upstream https://github.com/facebook/rocksdb.git
cd ..
# phabricator stuff
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/libphutil
sudo apt-get -y install php5 php5-curl pep8
echo "PATH=/vagrant/arcanist/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
cd /vagrant/rocksdb
# Initial arc setup
arc install-certificate
# Pass url to browser and copy back the conduit token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment