vmod workshop

Preview:

Citation preview

WRITINGVMODS

Arianna Aondio

Field Engineer

WHO AM I?

● Email: arianna.aondio@varnish-software.com● Twitter: aondio_● Github: aondio

AGENDA

● Varnishd -C

● Inline c

● VCC file

● Demo

Fun fact:I’m a new OS X user.It took me 10 minutes of googlingto understand how to type this → “\”with this new keyboard.

Be nice to me!

VARNISHD -C

There is no VCL magic

Try it out with:varnishd -C -f your/vcl/file

INLINE C-CODE

Can do almost anything...

C{printf(”Arianna doesn’t like inline c!\n”);

}C

...but VMODs are better!

VCC FILE

Interface between VMOD andthe VCL runtime ("VRT")

And…the man page isgenerated from it!

BUILDING A VMOD

● Fork libvmod-examle https://github.com/varnish/libvmod-example.git

● Run rename-vmod-script

● ./autogen

● ./configure

● Make

● Make check

● Make install

DEMO

Some coding...

WORKSPACE

WORKFLOW

THANK YOU

Recommended