Projects
home:rottame:vhosts-ng
rubygem-bender-vhng
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
rubygem-bender-vhng.changes
Changed
@@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Oct 29 10:54:22 UTC 2025 - Angelo Grossini <angelo@intercom.it> + +- Enhance Varnish configuration by adding multiple template files + and updating the webserver.xml to support new configuration + paths for Varnish components. + +------------------------------------------------------------------- Tue Oct 28 16:11:39 UTC 2025 - Angelo Grossini <angelo@intercom.it> - Refactor Varnish configuration path handling in Webserver plugin
View file
rubygem-bender-vhng.spec
Changed
@@ -1,7 +1,7 @@ %define mod_name bender-vhng %define mod_full_name %{mod_name}-%{version} Name: rubygem-bender-vhng -Version: 2.1.6 +Version: 2.1.7 Release: 0 Summary: vhng provisioning tool License: Apache-2.0
View file
bender-vhng-2.1.6.gem/checksums.yaml.gz -> bender-vhng-2.1.7.gem/checksums.yaml.gz
Changed
@@ -1,7 +1,7 @@ --- SHA256: - metadata.gz: b2f28a12fa82804254d3448a8e5b5870b8fef929113f14ff40bf8f7c63eff516 - data.tar.gz: f7bf5f6b863cf452332329f919ad1ba4a3089724a9be800b7a50f3f20d15a382 + metadata.gz: b350a4ad84af59590496b97fa3f748bd1269ef7d314ce0e5987f98ca65e0ed1b + data.tar.gz: 353402ef2168320158c147c858006e0010ae8f1dee2c5defcb863c77f9b5b754 SHA512: - metadata.gz: 312ec34c8dd7f365181651bbec1c1b997db717f66fdf36cc0619a95ce598dfe35a6e2eecaf579982f073a32698dde1a070c65b5e4edb8efcbd33af385d0f5264 - data.tar.gz: 46e5956d1bbf435dee2028f1a479f1fa26a1b1196d7ef56a06eef034371ec3b090916671ab341b22d87b4c3fca2c6098ad404381abf1646cd47eba248082eafc + metadata.gz: 56760c59a7b9c4383c8bb5e937d4dda5f28daa049b1fd6164eb3a94030d628ce4341c1ae75aca832f41a118557e286658337539793dbb863278a8a9b05f399eb + data.tar.gz: 8e2c71abd2651188dab253eaa501a8dd7c21f485a8da0b862fc9033612dc33a8033dee4f298483099d2ae36f55fb3df191578291cf88462098e80a08c985adaf
View file
bender-vhng-2.1.6.gem/data/config/webserver.xml -> bender-vhng-2.1.7.gem/data/config/webserver.xml
Changed
@@ -236,7 +236,11 @@ <ProxyLogRoot>/storage/logs</ProxyLogRoot> <ProxyConfig>/etc/nginx/vhosts.available</ProxyConfig> <ProxyConfigEnabled>/etc/nginx/vhosts.d</ProxyConfigEnabled> - <VarnishConfigPath>/etc/varnish/vcl.conf</VarnishConfigPath> + <VarnishConfigPath>/etc/varnish</VarnishConfigPath> + <VarnishBackendConfigFile>backend.vcl</VarnishBackendConfigFile> + <VarnishVCLConfigFile>system.vcl</VarnishVCLConfigFile> + <VarnishACLConfigFile>acl.vcl</VarnishACLConfigFile> + <VarnishConfigFile>vcl.conf</VarnishConfigFile> <VarnishSysconfigFile>varnish</VarnishSysconfigFile> </ContainerPaths> <AWStats>
View file
bender-vhng-2.1.6.gem/data/lib/bender/classes/Plugins/Webserver/11-Varnish.rb -> bender-vhng-2.1.7.gem/data/lib/bender/classes/Plugins/Webserver/11-Varnish.rb
Changed
@@ -60,8 +60,6 @@ def varnishConfig(host, service, env) basePath = service.baseConfig.get_entry('/ICSystemConf/BaseDir') - template = File.join(bender_root, 'templates', service.serviceName, "varnish.erb") - data = {} data:vcl = host.varnish.vcl @@ -71,13 +69,39 @@ data:host = host data:port = 80 - fname = File.join(basePath, service.mySvcConf("/MandatoryPaths/Path@name='VarnishConf'/path"), - "#{host.service.name}.conf") + path = service.mySvcConf("/MandatoryPaths/Path@name='VarnishConf'/path") + ctPath = service.mySvcConf("/ContainerPaths/VarnishConfigPath") - ctFname = service.mySvcConf("/ContainerPaths/VarnishConfigPath") + varnishCf = service.mySvcConf("/ContainerPaths/VarnishConfigFile") + vclCf = service.mySvcConf("/ContainerPaths/VarnishVCLConfigFile") + backendCf = service.mySvcConf("/ContainerPaths/VarnishBackendConfigFile") + aclCf = service.mySvcConf("/ContainerPaths/VarnishACLConfigFile") + fname = File.join(basePath, path, "#{host.service.name}_#{varnishCf}") + ctFname = File.join(ctPath, varnishCf) + template = File.join(bender_root, 'templates', service.serviceName, "varnish.erb") env:configs:varnish_conf = {host: fname, container: ctFname} + out = service.render(template, data) + service.write(fname, out) + + fname = File.join(basePath, path, "#{host.service.name}_#{aclCf}") + ctFname = File.join(ctPath, aclCf) + template = File.join(bender_root, 'templates', service.serviceName, "varnish_acl.erb") + env:configs:varnish_acl_conf = {host: fname, container: ctFname} + out = service.render(template, data) + service.write(fname, out) + + fname = File.join(basePath, path, "#{host.service.name}_#{backendCf}") + ctFname = File.join(ctPath, backendCf) + template = File.join(bender_root, 'templates', service.serviceName, "varnish_backend.erb") + env:configs:varnish_backend_conf = {host: fname, container: ctFname} + out = service.render(template, data) + service.write(fname, out) + fname = File.join(basePath, path, "#{host.service.name}_#{vclCf}") + ctFname = File.join(ctPath, vclCf) + template = File.join(bender_root, 'templates', service.serviceName, "varnish_vcl.erb") + env:configs:varnish_vcl_conf = {host: fname, container: ctFname} out = service.render(template, data) service.write(fname, out) end
View file
bender-vhng-2.1.6.gem/data/lib/bender/templates/webserver/varnish.erb -> bender-vhng-2.1.7.gem/data/lib/bender/templates/webserver/varnish.erb
Changed
@@ -1,51 +1,6 @@ -# -# This is an example VCL file for Varnish. -# -# It does not do anything by default, delegating control to the -# builtin VCL. The builtin VCL is called when there is no explicit -# return statement. -# -# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ -# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples. +vcl 4.1; -# Marker to tell the VCL compiler that this VCL has been adapted to the -# new 4.0 format. -vcl 4.0; - -# Default backend definition. Set this to point to your content server. -backend default { - .host = "<%= backend_host %>"; - .port = "<%= backend_port %>"; -} - -acl local { - "localhost"; - "127.0.0.1"; -} - -include +glob "/srv/vhost/etc/varnish/*.vcl"; - -<% if vcl.present? -%> -<%= vcl -%> -<% else -%> -sub vcl_recv { - # Happens before we check if we have this in cache already. - # - # Typically you clean up the request here, removing cookies you don't need, - # rewriting the request, etc. -} - -sub vcl_backend_response { - # Happens after we have read the response headers from the backend. - # - # Here you clean the response headers, removing silly Set-Cookie headers - # and other mistakes your backend does. -} - -sub vcl_deliver { - # Happens when we have all the pieces we need, and are about to send the - # response to the client. - # - # You can do accounting or modifying the final object here. -} -<% end -%> +include "./backend.vcl"; +include "./acl.vcl"; +include "./include.vcl"; +include "./system.vcl";
View file
bender-vhng-2.1.7.gem/data/lib/bender/templates/webserver/varnish_acl.erb
Added
@@ -0,0 +1,4 @@ +acl local { + "localhost"; + "127.0.0.1"; +}
View file
bender-vhng-2.1.7.gem/data/lib/bender/templates/webserver/varnish_backend.erb
Added
@@ -0,0 +1,4 @@ +backend default { + .host = "<%= backend_host %>"; + .port = "<%= backend_port %>"; +}
View file
bender-vhng-2.1.7.gem/data/lib/bender/templates/webserver/varnish_vcl.erb
Added
@@ -0,0 +1,24 @@ +<% if vcl.present? -%> +<%= vcl -%> +<% else -%> +sub vcl_recv { + # Happens before we check if we have this in cache already. + # + # Typically you clean up the request here, removing cookies you don't need, + # rewriting the request, etc. +} + +sub vcl_backend_response { + # Happens after we have read the response headers from the backend. + # + # Here you clean the response headers, removing silly Set-Cookie headers + # and other mistakes your backend does. +} + +sub vcl_deliver { + # Happens when we have all the pieces we need, and are about to send the + # response to the client. + # + # You can do accounting or modifying the final object here. +} +<% end -%>
View file
bender-vhng-2.1.6.gem/metadata.gz -> bender-vhng-2.1.7.gem/metadata.gz
Changed
@@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: bender-vhng version: !ruby/object:Gem::Version - version: 2.1.6 + version: 2.1.7 platform: ruby authors: - Angelo Grossini autorequire: bindir: bin cert_chain: -date: 2025-10-28 00:00:00.000000000 Z +date: 2025-10-29 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: mail @@ -126,7 +126,10 @@ - lib/bender/templates/webserver/php-fpm.erb - lib/bender/templates/webserver/php-fpm_sysconfig.erb - lib/bender/templates/webserver/varnish.erb +- lib/bender/templates/webserver/varnish_acl.erb +- lib/bender/templates/webserver/varnish_backend.erb - lib/bender/templates/webserver/varnish_sysconfig.erb +- lib/bender/templates/webserver/varnish_vcl.erb - lib/bender/tools/ARValidation.rb - lib/bender/tools/ConfigFile.rb - lib/bender/tools/ConfigObject.rb
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.