Page MenuHomePhabricator
Paste P6083

Set up mahimahi-h2o
ActivePublic

Authored by Gilles on Oct 5 2017, 12:38 PM.
# 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 jq
# 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/bc4s4ttzal32wtfgc75n/PHID-FILE-775a2j3pjlbvx2gv76a3/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."

Event Timeline

Gilles created this paste.Oct 5 2017, 12:38 PM
Gilles edited the content of this paste. (Show Details)Oct 5 2017, 12:54 PM
Gilles edited the content of this paste. (Show Details)Oct 5 2017, 12:58 PM
Gilles edited the content of this paste. (Show Details)Oct 5 2017, 1:05 PM
Gilles edited the content of this paste. (Show Details)Oct 5 2017, 1:07 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 12:27 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 12:31 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 1:03 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 1:22 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 2:33 PM
Gilles edited the content of this paste. (Show Details)Oct 9 2017, 3:59 PM