This is the environment provided for building the Varnish VMODs.
Currently provided setups:
NOTE Contribution welcome!
Currently upported modules configurations are placed in ./modules/vmods folder.
A configuration consists of 3 files:
.env- environment set-up per moduleversion_map.env- mapping between Varnish version and module version,vmod.spec- the RPM building standard specification file.
To provide a support for a new module one should:
- create a sub-folder in
./modules/vmods, named same as the module itself, - prepare a working
vmod.spec, - set the variables in the
.envfile (see curent ones for reference).
- docker
- make
4.1.x - 6.1.x
Builds packages for:
- CentOS 7 x86_64 (for now)
# Help for make commands:
make help# build RPMs for for all supported modules
make rpms VARNISH_VERSION=6.0.1-1
# or for a particular module:
make rpms VARNISH_VERSION=6.0.1-1 MODULE=vmod-curlNOTE Resulting RPM packages can be found in ./modules/dist folder.
The integration test is a Docker Compose stack containing:
- Varnish (version =
$VARNISH_VERSION) with all built modules installed, - Nginx as the main backend,
- An echo-server for testing vmod-curl.
Due to customize the setup:
- create a
docker-compose.ymlfile in the main project directory, copying from the templatetemplate/docker-compose.ymlfile (if not created by hand then will be copied automatically duringmake start), - create
test/configfolder, copy into it and modifytemplate/default.vclandtemplate/varnish.envfiles according to your needs (if not created by hand then will be copied automatically duringmake start)
NOTE Automatically generated files can be edited later (they are excluded from the source control).
# Starts Varnish with modules RPMs in a simple Docker Compose stack together with some backend service:
make startThe above will start the Docker Compose stack in the background.
Display logs with following:
# Open docker compose logs.
make logs
# or Varnish log:
make varnishlogStop or tear down the stack with following:
# Stops the test stack without removing the images.
make stop
# or stop and delete the docker compose related images:
make cleanAjdust the load test settings in the .env file:
# benchmark settings
# -- defaults:
# METHOD=GET
CONCURRENT=100
NR_OF_REQUESTS=50000Perform Apache Benchmark (load test) against provided Varnish Docker Compose stack:
# Ensures stack whether it is started, performs benchmark and cleans up the stack after.
make benchmark VARNISH_VERSION=6.0.1-1NOTE The benchmark results for particular Varnish version will be stored in the benchmark folder.