emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32771: closed ([PATCH 0/2] Varnish service)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32771: closed ([PATCH 0/2] Varnish service)
Date: Tue, 25 Sep 2018 22:53:01 +0000

Your message dated Wed, 26 Sep 2018 00:52:51 +0200
with message-id <address@hidden>
and subject line Re: [bug#32771] [PATCH 2/2] services: Add Varnish service.
has caused the debbugs.gnu.org bug report #32771,
regarding [PATCH 0/2] Varnish service
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32771: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32771
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 0/2] Varnish service Date: Wed, 19 Sep 2018 15:28:03 +0200
These patches adds a service for the Varnish HTTP proxy.

Marius Bakke (2):
  gnu: varnish: Use absolute file name of "rm".
  services: Add Varnish service.

 doc/guix.texi        |  82 +++++++++++++++++++++++++++++++++
 gnu/packages/web.scm |   4 +-
 gnu/services/web.scm | 107 ++++++++++++++++++++++++++++++++++++++++++-
 gnu/tests/web.scm    |  41 +++++++++++++++++
 4 files changed, 232 insertions(+), 2 deletions(-)

-- 
2.19.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#32771] [PATCH 2/2] services: Add Varnish service. Date: Wed, 26 Sep 2018 00:52:51 +0200 User-agent: Notmuch/0.27 (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu)
Christopher Baines <address@hidden> writes:

> Hey Marius,
>
> I've not got much experience with Varnish, but this patch applies, and
> the system test passes :)
>
> Marius Bakke <address@hidden> writes:
>
>> address@hidden Varnish Cache
>> address@hidden 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.
>> +
>> address@hidden {Scheme Variable} varnish-service-type
>> +A service type for the Varnish daemon.
>> address@hidden defvr
>
> Given there are not other service types for Varnish in Guix, "The
> service type ..." would probably be clearer here, or just "Service type
> ...".

Just "Service type ..." is better, thanks!

>> address@hidden {Data Type} varnish-configuration
>> +Data type representing the @code{varnish} service configuration.
>> +This type has the following parameters:
>> +
>> address@hidden @asis
>> address@hidden @code{package} (default: @code{varnish})
>> +The Varnish package to use.
>> +
>> address@hidden @code{name} (default: @code{"default"})
>> +A name for this Varnish instance.  Varnish will create a directory in
>> address@hidden/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?

Probably, although I didn't bother trying it.  Those files are temporary
anyway, perhaps /var/cache/varnish would be better?  But, I think the
upstream default is OK.

> Also, I wonder if you'd considered supporing running multiple instances
> of varnishd, I guess the "name" might come in useful then.

If you read the system test closely, you'll notice it does actually run
multiple instances, one proxying the other, and testing different
aspects of the service definition :-)

>> address@hidden 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?

Yes.

>> +(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?

You are correct!  I removed the activation script.

> Anyway, this looks pretty much good to me.

Thank you very much for reviewing :-)

Pushed as 3b97a1779f3b65d582b8edc8c154b6414314b946.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]