forked from mroth/phoenix-showdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap_ubuntu.sh
executable file
·43 lines (35 loc) · 1.51 KB
/
bootstrap_ubuntu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
mkdir -p $HOME/bin
export PATH=$HOME/bin:$PATH
# bootstrap rails/sinatra
sudo apt-get install -y ruby2.1-dev bundler
(cd rails/benchmarker && bundle install)
(cd sinatra/benchmarker && bundle install)
(cd cuba/benchmarker && bundle install)
# bootstrap express
sudo apt-get install -y nodejs-dev
(cd express/benchmarker && npm install)
# bootstrap phoenix
(cd /tmp && wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb)
sudo apt-get update
sudo apt-get install -y elixir
(cd phoenix/benchmarker && mix do deps.get, compile)
(cd phoenix/benchmarker && MIX_ENV=prod mix compile.protocols)
# bootstrap plug
(cd plug/benchmarker && mix do deps.get, compile)
(cd plug/benchmarker && MIX_ENV=prod mix compile.protocols)
# bootstrap martini / gin
# (benchmarks are identical between go run and compiled version, so we don't
# bother to pre-compile binaries)
go get github.com/go-martini/martini
go get github.com/martini-contrib/render
go get github.com/gin-gonic/gin
# bootstrap play
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install -y oracle-java8-installer
(cd play/benchmarker && ./activator clean stage)
# install forego/wrk to do the benchmarking
(cd $HOME/bin && wget https://godist.herokuapp.com/projects/ddollar/forego/releases/current/linux-amd64/forego && chmod +x forego)
sudo apt-get install -y build-essential libssl-dev git
(cd /tmp && git clone https://github.com/wg/wrk.git && cd wrk && make && cp wrk $HOME/bin)