Page MenuHomePhabricator

Varnish vagrant role
Closed, ResolvedPublic

Description

Can we have varnish through a role please? We will have to do a lot of dev & test for it soon.

The default varnish config in /etc/varnish/default.vcl could have this at the very top of the file. Leave all comments there.

backend default {

.host = "127.0.0.1";
.port = "80";

}

the service can be started with:

sudo varnishd -f /etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080

This way varnish will only work if accessed through port 8080 (needs to be mapped to outside), while port 80 will continue be served uncached. The admin port 2000 doesn't have to be patched to the outside (rarely used, can be accessed through ssh).

P.S. Note that varnish config should not be deleted on every vagrant up - there could be a lot of changes during development to that file. Maybe it would make sense to have an include command of some sort the same way as settings.d/ files for vagrant.

Thanks!


Version: unspecified
Severity: enhancement

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:06 AM
bzimport set Reference to bz52302.

[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]

Yuvi mentioned on irc that he was working on a varnish role.

Change 87623 had a related patch set uploaded by Yuvipanda:
[HEAVY WIP] Add varnish role

https://gerrit.wikimedia.org/r/87623

Change 87623 abandoned by Yuvipanda:
[HEAVY WIP] Add varnish role

Reason:
Uncool.

https://gerrit.wikimedia.org/r/87623

yuvipanda set Security to None.
Gilles renamed this task from Add VARNISH role to Varnish vagrant role.Sep 7 2015, 8:19 PM
Gilles claimed this task.
Gilles added a project: Performance-Team.
Gilles added subscribers: Aklapper, Gilles.

Change 237081 had a related patch set uploaded (by Gilles):
Varnish role

https://gerrit.wikimedia.org/r/237081

Change 238095 had a related patch set uploaded (by Gilles):
Rewrite port for Varnish PURGE requests

https://gerrit.wikimedia.org/r/238095

Change 238095 merged by jenkins-bot:
Rewrite port for Varnish PURGE requests

https://gerrit.wikimedia.org/r/238095