Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerify2 #187

Merged
merged 76 commits into from
Apr 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1a9538c
use docker to isolate hosts
waghanza Mar 15, 2018
611d0b6
run flask on gunicorn (temporary solution)
waghanza Mar 15, 2018
8377a53
build on ci (only to ensure build could run)
waghanza Mar 15, 2018
8743550
fix style (underscore for large numbers)
waghanza Mar 15, 2018
78de84d
use shards to release all binaries (client,benchmarker)
waghanza Mar 15, 2018
ad176b9
remove unused directory
waghanza Mar 15, 2018
20dda0a
uniformize rubies dockerfile
waghanza Mar 15, 2018
09d22cf
enable to specify (or not) frameworks to benchmark
waghanza Mar 15, 2018
b8a41df
fix style (underscore for large numbers)
waghanza Mar 15, 2018
8045d41
allow docker host
waghanza Mar 18, 2018
9e956fd
re-enable django (in a container)
waghanza Mar 18, 2018
56631f9
enable go frameworks -> iris / gin / echo / fasthttprouter / gorilla-mux
waghanza Mar 16, 2018
e7490b1
dockerize iris
waghanza Mar 19, 2018
56dbe3b
fix jester containerization
waghanza Mar 19, 2018
6863729
re-enable rack-routing
waghanza Mar 19, 2018
82ee661
re-enable lucky
waghanza Mar 19, 2018
506c3e3
re-enable amber
waghanza Mar 20, 2018
99dc2bf
re-enable spider-gazelle
waghanza Mar 20, 2018
478dd8c
re-enable vapor
waghanza Mar 20, 2018
dd42753
Lint yaml (#166)
waghanza Mar 17, 2018
c7cee98
use docker to isolate hosts
waghanza Mar 15, 2018
c408038
use shards to release all binaries (client,benchmarker)
waghanza Mar 15, 2018
b56e9f7
enable to specify (or not) frameworks to benchmark
waghanza Mar 15, 2018
06581b9
fix style (underscore for large numbers)
waghanza Mar 15, 2018
76a9eea
enable to specify (or not) frameworks to benchmark
waghanza Mar 15, 2018
75b15a2
re-enable django (in a container)
waghanza Mar 18, 2018
3dd7a87
enable go frameworks -> iris / gin / echo / fasthttprouter / gorilla-mux
waghanza Mar 16, 2018
6d093ac
re-enable actix
waghanza Apr 3, 2018
c5daa0f
update dependencies
waghanza Apr 3, 2018
7705466
fix actix availability
waghanza Apr 3, 2018
892d300
re-enable rust frameworks
waghanza Apr 3, 2018
3467ae3
upgrade dependencies
waghanza Apr 3, 2018
11885ff
fix listening ip
waghanza Apr 3, 2018
eb36235
upgrade dependencies
waghanza Apr 4, 2018
fff5b62
use rust nightly to cimple rocket
waghanza Apr 4, 2018
169ef58
force shards to install ameba binary
waghanza Apr 4, 2018
71991bd
keep crystal code / yaml files clean
waghanza Apr 4, 2018
556f4b9
use production mode
waghanza Apr 4, 2018
db09d4f
lint
waghanza Apr 4, 2018
54037ed
fix assets compilation
waghanza Apr 4, 2018
5741c85
use --no-debug flag on compilation
waghanza Apr 4, 2018
b997034
fix version
waghanza Apr 5, 2018
081216b
fix version
waghanza Apr 5, 2018
170deda
remove unnecessary code on lucky
waghanza Apr 5, 2018
abfe76f
use production env mode on lucky
waghanza Apr 5, 2018
8abf10a
fix nickel running into dockerf
waghanza Apr 5, 2018
dd1777d
fix mofuw in docker
waghanza Apr 5, 2018
9f8dac6
re-enable japronto
waghanza Apr 6, 2018
5f19dc0
re-enable sanic
waghanza Apr 6, 2018
985d088
re-enable tornado
waghanza Apr 6, 2018
3ed3f5b
re-enable node frameworks (polka / express)
waghanza Apr 6, 2018
0c4e6ba
remove Package.pins (see #172)
waghanza Apr 8, 2018
c5e67b1
update to last major
waghanza Apr 8, 2018
db3f865
re-enable swift frameworks (kitura / perfect / vapor)
waghanza Apr 8, 2018
ccb2327
re-enable tornado & sanic
waghanza Apr 8, 2018
4e0f61d
install neph cli tool on compilation
waghanza Apr 8, 2018
36a45dd
re-enable elixir frameworks (plug & elixir)
waghanza Apr 8, 2018
c0992e8
re-enable libevhtp
waghanza Apr 9, 2018
383d37d
fix version conflict on amber compilation
waghanza Apr 9, 2018
7b01aaa
add scala framework (akkahttp)
waghanza Apr 9, 2018
084691b
re-enable mofuw
waghanza Apr 9, 2018
5bb507a
re-enable c# (.net) framework
waghanza Apr 9, 2018
c25cabe
fix travis config (duplicate key)
waghanza Apr 9, 2018
ba53886
upgrade docker image
waghanza Apr 11, 2018
50b370b
restore evhtp source files
waghanza Apr 11, 2018
249533f
do not start containers with neph, but on-the-fly
waghanza Apr 11, 2018
d459917
re-enable node frameworks
waghanza Apr 11, 2018
8dfc782
Revert "upgrade docker image"
waghanza Apr 11, 2018
62ffdf6
increase sleeping time to wait container starting
waghanza Apr 12, 2018
a4b35cf
fix aspnetcore container
waghanza Apr 12, 2018
c6e2448
use make to build containers sequentially
waghanza Apr 13, 2018
1664a8a
crystal tools are compiled with shards intsead of make
waghanza Apr 13, 2018
0ea9003
fix
tbrand Apr 17, 2018
f959d03
avoid using lock files
waghanza Apr 27, 2018
046ab76
fix rocket build (needs nighlty)
waghanza Apr 27, 2018
c830a33
fix lucky build
waghanza Apr 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
services: docker
language: crystal
before_install: pip install yamllint --user
install:
- crystal deps
install: shards build --release
script:
- crystal spec
- bin/ameba
- bin/ameba tools
- bin/ameba crystal/*
- yamllint shard.yml
- yamllint neph.yaml
- yamllint .travis.yml
155 changes: 46 additions & 109 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,249 +1,186 @@
all: elixir node ruby crystal go rust swift python nim csharp scala client benchmarker
all: elixir node ruby crystal go rust swift python nim csharp scala

# --- Elixir ---
elixir: plug phoenix

plug:
cd elixir/plug; echo "yes" | mix deps.get --force; MIX_ENV=prod mix release --no-tar
ln -s -f ../elixir/plug/bin/server_elixir_plug bin/.
docker build -t plug elixir/plug

phoenix:
cd elixir/phoenix; echo "yes" | mix do local.rebar; mix deps.get --force; MIX_ENV=prod mix release --no-tar
ln -s -f ../elixir/phoenix/bin/server_elixir_phoenix bin/.
docker build -t phoenix elixir/phoenix

# --- node.js ---
node: express clusterexpress polka clusterpolka

express:
cd node/express; npm install
ln -s -f ../node/express/bin/server_node_express bin/.
docker build -t express node/express

clusterexpress:
cd node/express; npm install
ln -s -f ../node/express/bin/server_node_clusterexpress bin/.
docker build -t clusterexpress node/express

polka:
cd node/polka; npm install
ln -s -f ../node/polka/bin/server_node_polka bin/.
docker build -t polka node/polka

clusterpolka:
cd node/polka; npm install
ln -s -f ../node/polka/bin/server_node_clusterpolka bin/.
docker build -t clusterpolka node/polka

# --- Objective-C ---
objc: criollo

#criollo
criollo:
cd objc/criollo; pod install; xcodebuild -workspace server_objc_criollo.xcworkspace -scheme server_objc_criollo -derivedDataPath ./derivedData
ln -s -f ../objc/criollo/derivedData/Build/Products/Debug/server_objc_criollo.app/Contents/MacOS/server_objc_criollo bin/.
docker build -t criollo objc/criollo


# --- Ruby ---
ruby: rails sinatra roda rack-routing

# Rails
rails:
cd ruby/rails; bundle update
cd ruby/rails; bundle install --path vendor/bundle
ln -s -f ../ruby/rails/bin/server_ruby_rails bin/.
docker build -t rails ruby/rails

# Sinatra
sinatra:
cd ruby/sinatra; bundle update
cd ruby/sinatra; bundle install --path vendor/bundle
ln -s -f ../ruby/sinatra/server_ruby_sinatra bin/.
docker build -t sinatra ruby/sinatra

# Roda
roda:
cd ruby/roda; bundle update
cd ruby/roda; bundle install --path vendor/bundle
ln -s -f ../ruby/roda/server_ruby_roda bin/.
docker build -t roda ruby/roda

# Rack Routing
rack-routing:
cd ruby/rack-routing; bundle update
cd ruby/rack-routing; bundle install --path vendor/bundle
ln -s -f ../ruby/rack-routing/server_ruby_rack-routing bin/.
docker build -t rack-routing ruby/rack-routing

# --- Crystal ---
crystal: kemal router_cr lucky amber raze spider-gazelle
crystal: kemal router.cr lucky amber raze spider-gazelle

# Kemal
kemal:
cd crystal/kemal; shards update; shards build --release
ln -s -f ../crystal/kemal/bin/server_crystal_kemal bin/.
docker build -t kemal crystal/kemal

# Raze
raze:
cd crystal/raze; shards update; shards build --release
ln -s -f ../crystal/raze/bin/server_crystal_raze bin/.
docker build -t raze crystal/raze

# Lucky
lucky:
mkdir -p crystal/lucky/public
echo '{}' > crystal/lucky/public/manifest.json
cd crystal/lucky; bin/setup; shards build --release
ln -s -f ../crystal/lucky/bin/server_crystal_lucky bin/.
docker build -t lucky crystal/lucky

# router.cr
router_cr:
cd crystal/router.cr; shards update; shards build --release
ln -s -f ../crystal/router.cr/bin/server_crystal_router_cr bin/.
router.cr:
docker build -t router.cr crystal/router.cr

# amber
amber:
cd crystal/amber; shards update; shards build --release
ln -s -f ../crystal/amber/bin/server_crystal_amber bin/.
docker build -t amber crystal/amber

# Spider Gazelle
spider-gazelle:
cd crystal/spider-gazelle; shards update; shards build --release
ln -s -f ../crystal/spider-gazelle/bin/app bin/server_crystal_spider-gazelle
docker build -t spider-gazelle crystal/spider-gazelle


# --- Go ---
go: echo gorilla-mux fasthttprouter gin iris

# Echo
echo:
go get -u github.com/labstack/echo
cd go/echo; go build -o server_go_echo main.go
ln -s -f ../go/echo/server_go_echo bin/.
docker build -t echo go/echo

# gorilla/mux
gorilla-mux:
go get -u github.com/gorilla/mux
cd go/gorilla-mux; go build -o server_go_gorilla_mux main.go
ln -s -f ../go/gorilla-mux/server_go_gorilla_mux bin/.
docker build -t gorilla-mux go/gorilla-mux

iris:
go get -u github.com/kataras/iris
cd go/iris; go build -o server_go_iris main.go
ln -s -f ../go/iris/server_go_iris bin/.
docker build -t iris go/iris

# fasthttprouter
fasthttprouter:
go get -u github.com/buaazp/fasthttprouter
go get -u github.com/valyala/fasthttp
cd go/fasthttprouter; go build -o server_go_fasthttprouter main.go
ln -s -f ../go/fasthttprouter/server_go_fasthttprouter bin/.
docker build -t fasthttprouter go/fasthttprouter

gin:
go get github.com/gin-gonic/gin
cd go/gin; go build -o server_go_gin main.go
ln -s -f ../go/gin/server_go_gin bin/.
docker build -t gin go/gin

# --- Rust ---
rust: iron nickel rocket
rust: iron nickel rocket actix

# IRON
iron:
cd rust/iron; cargo update
cd rust/iron; cargo build --release
ln -s -f ../rust/iron/target/release/server_rust_iron bin/.
docker build -t iron rust/iron

# nickel.rs
nickel:
cd rust/nickel; cargo update
cd rust/nickel; cargo build --release
ln -s -f ../rust/nickel/target/release/server_rust_nickel bin/.
docker build -t nickel rust/nickel

# rocket
rocket:
cd rust/rocket; cargo update
cd rust/rocket; cargo build --release
ln -s -f ../rust/rocket/target/release/server_rust_rocket bin/.
docker build -t rocket rust/rocket

# Actix
actix:
cd rust/actix; cargo update
cd rust/actix; cargo build --release
ln -s -f ../rust/actix/target/release/server_rust_actix bin/.
docker build -t actix rust/actix

# --- Swift ---
swift: vapor perfect kitura

# Vapor
vapor:
cd swift/vapor; swift build -c release
ln -s -f ../swift/vapor/.build/release/server_swift_vapor bin/.
docker build -t vapor swift/vapor

# Perfect
perfect:
cd swift/perfect; swift build --configuration release
ln -s -f ../swift/perfect/.build/release/server_swift_perfect bin/.
docker build -t perfect swift/perfect

# Kitura
kitura:
cd swift/kitura; swift build --configuration release
ln -s -f ../swift/kitura/.build/release/server_swift_kitura bin/.
docker build -t kitura swift/kitura

# --- Scala ---
scala: akkahttp

# Akka-HTTP
akkahttp:
cd scala/akkahttp; sbt assembly
ln -s -f ../scala/akkahttp/bin/server_scala_akkahttp bin/.
docker build -t akkahttp scala/akkahttp

# --- C# ---
csharp: aspnetcore

# ASP.NET Core
aspnetcore:
cd csharp/aspnetcore; dotnet restore && dotnet build
ln -s -f ../csharp/aspnetcore/server_csharp_aspnetcore bin/.
docker build -t aspnetcore csharp/aspnetcore

# --- Python ---
python: sanic japronto flask django
python: sanic japronto flask django tornado

# Sanic
sanic:
cd python/sanic; pip3 install -r requirements.txt -U --user; chmod +x server_python_sanic.py
ln -s -f ../python/sanic/server_python_sanic.py bin/server_python_sanic
docker build -t sanic python/sanic

# Japronto
japronto:
cd python/japronto; pip3 install -r requirements.txt -U --user; chmod +x server_python_japronto.py
ln -s -f ../python/japronto/server_python_japronto.py bin/server_python_japronto
docker build -t japronto python/japronto

# Flask
flask:
cd python/flask; pip3 install -r requirements.txt -U --user; chmod +x server_python_flask
ln -s -f ../python/flask/server_python_flask.py bin/.
ln -s -f ../python/flask/server_python_flask bin/server_python_flask
docker build -t flask python/flask

# Django
django:
cd python/django; pip3 install -r requirements.txt -U --user
ln -s -f ../python/django/server_python_django bin/server_python_django
docker build -t django python/django

# Tornado
tornado:
cd python/tornado; pip3 install -r requirements.txt -U --user; chmod +x server_python_tornado.py
ln -s -f ../python/tornado/server_python_tornado.py bin/server_python_tornado
docker build -t tornado python/tornado

# --- Nim ---
nim: jester mofuw

# Jester
jester:
cd nim/jester; nimble install -y; nim c -d:release server_nim_jester.nim
ln -s -f ../nim/jester/server_nim_jester bin/server_nim_jester
docker build -t jester nim/jester

# mofuw
mofuw:
cd nim/mofuw; nimble install -y; nim c -d:release server_nim_mofuw.nim
ln -s -f ../nim/mofuw/server_nim_mofuw bin/server_nim_mofuw

# --- Benchmarker ---
# client
client:
cd tools; crystal build src/client.cr -o bin/client --release
ln -s -f ../tools/bin/client bin/.

# benchmarker
benchmarker:
cd tools; crystal build src/benchmarker.cr -o bin/benchmarker --release
ln -s -f ../tools/bin/benchmarker bin/.
docker build -t mofuw nim/mofuw

# Cleaning all executables
clean:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ CPU Cores: 8
- [Rocket](https://rocket.rs) (nightly)
- node
- [express](https://github.com/expressjs/express)
- [express/cluster](https://github.com/LearnBoost/cluster)
- [polka](https://github.com/lukeed/polka)
- [polka/cluster](https://github.com/lukeed/polka)
- Elixir
- [Plug](http://github.com/elixir-lang/plug)
- [Phoenix](http://github.com/phoenixframework/phoenix)
Expand Down
Empty file removed bin/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions cpp/evhtp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_builds/*
20 changes: 20 additions & 0 deletions cpp/evhtp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.1)

include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.20.32.tar.gz"
SHA1 "72bd88df338cb1b02d4c36c3f85ac87b33578eab"
)

project(server_cpp_evhtp)

hunter_add_package(libevhtp)
find_package(libevhtp CONFIG REQUIRED)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_executable(server_cpp_evhtp main.cpp)
target_link_libraries(server_cpp_evhtp libevhtp::evhtp)

13 changes: 13 additions & 0 deletions cpp/evhtp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM gcc

RUN apt-get -qq update
RUN apt-get -qy install cmake

WORKDIR /usr/src/app
COPY . .

RUN cmake -H. -B_builds -DCMAKE_BUILD_TYPE=Release
RUN cmake --build _builds --config Release

EXPOSE 3000
CMD _builds/server_cpp_evhtp
Loading