Page MenuHomePhabricator

Set up mahimahi-h2o

Authored By
Gilles
Oct 9 2017, 1:03 PM
Size
2 KB
Referenced Files
None
Subscribers
None

Set up mahimahi-h2o

# WMF-specific
sudo puppet agent --disable 'Do not overwrite my stuff'
sudo sed -i '/hosts/s/^/#/g' /etc/nscd.conf
sudo service nscd restart
cd ~
# Chrome apt repo
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
# Stretch-backports for new kernel
sudo sh -c 'echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/stretch-baskports.list'
sudo apt-get update
# Dependencies available as Debian packages
sudo apt-get -y install google-chrome-stable xvfb imagemagick ffmpeg pyssim dh-autoreconf apache2 dnsmasq protobuf-compiler apache2-dev libprotobuf-dev xcb libxcb-present-dev libpango1.0-dev python-flup python3-protobuf python3-tz python3-pip python3-setuptools python3-dev libssl-dev unzip build-essential cmake libuv1-dev python-sphinx cron bc linux-image-4.12.0-0.bpo.2-amd64 git curl
# Node
sudo wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --lts
npm install browsertime -g
sudo pip3 install --upgrade pip
sudo pip3 install mitmproxy
# h2o dependency not available in Debian yet
git clone https://github.com/tatsuhiro-t/wslay
git clone https://github.com/gi11es/h2o
git clone https://github.com/gi11es/mahimahi-h2o
git clone https://github.com/worenga/mitmproxy2mahimahi
cd wslay
autoreconf -i
automake
autoconf
./configure
make
sudo make install
cd ../h2o
cmake .
make
sudo make install
cd ../mahimahi-h2o
./autogen.sh
autoreconf -f -i -Wall,no-obsolete
./configure
make
sudo make install
cd ..
mkdir runs
# https://phabricator.wikimedia.org/P6081
curl "https://phab.wmfusercontent.org/file/data/oaywhujdcbpvo2mdctid/PHID-FILE-raq52udryayqrzsnyhc3/Mahimahi_run_script" -o mahimahi.sh
chmod u+x mahimahi.sh
echo "export PATH=/home/gilles/.nvm/versions/node/v6.11.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:$PATH" > .bash_profile
echo "Mahimahi-h2o has been set up. Reboot the machine (to pick up the new kernel), modify mahimahi.sh to your liking and run it in a cron."

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4995126
Default Alt Text
Set up mahimahi-h2o (2 KB)

Event Timeline