<div dir="ltr">Hi everyone,<div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Here's a triplet of announcements that should make life easier for a bunch of vmod users.</div><div><br></div><div># install-vmod</div><div><br></div><div>Earlier this month I pushed <a href="https://github.com/varnish/toolbox/tree/master/install-vmod">https://github.com/varnish/toolbox/tree/master/install-vmod</a> which, I must admit, takes inspiration from xcir's vmod-packager (<a href="https://github.com/xcir/vmod-packager">https://github.com/xcir/vmod-packager</a>), but with a way less ambitious scope.</div><div><br></div><div>Essentially, you can just point install-vmod at a tarball (local or remote), with an optional checksum and it will download, build, test and install the vmod for you:</div><div><br></div></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="monospace">install-vmod <a href="https://github.com/varnish/varnish-modules/releases/download/0.20.0/varnish-modules-0.20.0.tar.gz">https://github.com/varnish/varnish-modules/releases/download/0.20.0/varnish-modules-0.20.0.tar.gz</a> e63d6da8f63a5ce56bc7a5a1dd1a908e4ab0f6a36b5bdc5709dca2aa9c0b474bd8a06491ed3dee23636d335241ced4c7ef017b57413b05792ad382f6306a0b36</font></div></div></div></div></div></blockquote><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div>It's only a few lines of shell and doesn't handle dependencies installation, but it's pretty convenient for the next point.</div><div><br></div><div># install-vmod in official docker images</div><div><br></div><div>install-vmod is included in all official images, making it very easy to supplement the images with your own vmod combinations. Here's a and example taken from the official docs (<a href="https://hub.docker.com/_/varnish">https://hub.docker.com/_/varnish</a>):</div><div><br></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">FROM varnish:7.1-alpine</font></div></div></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="monospace"><br></font></div></div></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace"># install build dependencies</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">USER root</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">RUN set -e; \</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">    apk add --no-cache $VMOD_DEPS; \</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">    \</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace"># install one, possibly multiple vmods</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">    install-vmod <a href="https://github.com/varnish/varnish-modules/releases/download/0.20.0/varnish-modules-0.20.0.tar.gz">https://github.com/varnish/varnish-modules/releases/download/0.20.0/varnish-modules-0.20.0.tar.gz</a>; \</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">    \</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace"># clean up</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">    apk del --no-network $VMOD_DEPS</font></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><font face="monospace">USER varnish</font></div></div></div></div></blockquote><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div>Note the VMOD_DEPS that allows you to quickly add and remove the general building dependencies.</div><div><br></div><div># official docker images now include varnish-modules and vmod_dynamic</div><div><br></div><div>Now that images have an easy way to install vmods, it seemed like a waste to not install a couple of those, namely:</div><div>- varnish-modules (<a href="https://github.com/varnish/varnish-modules">https://github.com/varnish/varnish-modules</a>) because it's full of tools that are useful in most setups (headers, var, str, etc.)</div><div>- vmod_dynamic (<a href="https://github.com/nigoroll/libvmod-dynamic">https://github.com/nigoroll/libvmod-dynamic</a>) since containers usually live in dynamic environments with backend with a DNS record but no fixed IP</div><div><br></div><div>And those two have the big benefit of not requiring any extra dependencies compared to Varnish, meaning the image size only slightly increased.</div><div><br></div><div>And that's it for now! As usual, feedback is welcome, especially since the features are so new.</div><div><br></div><div>Until next time!</div><div><br></div><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div></div>