GNU bug report logs -
#32771
[PATCH 0/2] Varnish service
Previous Next
Reported by: Marius Bakke <mbakke <at> fastmail.com>
Date: Wed, 19 Sep 2018 13:29:01 UTC
Severity: normal
Tags: patch
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hey Marius,
I've not got much experience with Varnish, but this patch applies, and
the system test passes :)
Marius Bakke <mbakke <at> fastmail.com> writes:
> +@subsubheading Varnish Cache
> +@cindex Varnish
> +Varnish is a fast cache server that sits in between web applications
> +and end users. It proxies requests from clients and caches the
> +accessed URLs such that multiple requests for the same resource only
> +creates one request to the back-end.
> +
> +@defvr {Scheme Variable} varnish-service-type
> +A service type for the Varnish daemon.
> +@end defvr
Given there are not other service types for Varnish in Guix, "The
service type ..." would probably be clearer here, or just "Service type
...".
> +@deftp {Data Type} varnish-configuration
> +Data type representing the @code{varnish} service configuration.
> +This type has the following parameters:
> +
> +@table @asis
> +@item @code{package} (default: @code{varnish})
> +The Varnish package to use.
> +
> +@item @code{name} (default: @code{"default"})
> +A name for this Varnish instance. Varnish will create a directory in
> +@file{/var/varnish/} with this name and keep temporary files there. If
> +the name starts with a forward slash, it is interpreted as an absolute
> +directory name.
Most services in Guix use /var/lib for data, would this work for
Varnish?
Also, I wonder if you'd considered supporing running multiple instances
of varnishd, I guess the "name" might come in useful then.
> +@c Varnish does not support HTTPS, so keep this URL to avoid confusion.
> +For example, to mirror @url{http://www.gnu.org,www.gnu.org} with VCL you
> +can do something along these lines:
Does "@c" mean a comment?
> +(define %varnish-accounts
> + (list (user-group
> + (name "varnish")
> + (system? #t))
> + (user-account
> + (name "varnish")
> + (group "varnish")
> + (system? #t)
> + (comment "Varnish Cache User")
> + (home-directory "/var/varnish")
> + (shell (file-append shadow "/sbin/nologin")))))
> +
> +(define %varnish-activation
> + #~(begin
> + (use-modules (guix build utils))
> + (let ((home-dir "/var/varnish")
> + (user (getpwnam "varnish")))
> + (mkdir-p home-dir)
> + (chown home-dir (passwd:uid user) (passwd:gid user))
> + (chmod home-dir #o755))))
Is this necessary, as I think the users home directory might be
automatically created?
Anyway, this looks pretty much good to me.
Thanks,
Chris
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 6 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.