-
Notifications
You must be signed in to change notification settings - Fork 21
Normalize squid configuration against OSG upstream #435
Comments
I think you've got the basic idea right. However I would think it would be better for you to generate a .awk script and bindmount that in, rather than making it a pre-awk shell script inside the container. The container doesn't have a mechanism for a shell script to generate awk code. (It is possible for the awk script to escape to shell and do any awk code generation wanted there but I don't think that makes things any easier for you.) |
For example, for number 2 you'd do something like
|
Thanks @DrDaveD ! |
Hi @DrDaveD, I am having some difficulty getting the setoption function to work. I added a file "20-slate.awk" under customized.d for testing and its content was:
But it didn't seem to make a difference. I am not sure if I am suppose to add some additional quotes to above or not? I tried to run the customize.sh script manually without adding any custom .awk files. The script doesn't return! When I run it in debug mode I get:
Is the above behavior of the script expected? Isn't it suppose to process pre and post awk scripts and any custom .awk files and then return\exit? |
customize.sh is run by |
I don't have podman working but here's what I did with docker:
|
Thanks a lot @DrDaveD Thanks again! |
Normalizing squid config against OSG upstream - issue #435
This has been addressed, and the chart configurations have been normalized against OSG upstream. |
Today we have a script that customizes squid.conf to do the following:
https://github.com/slateci/slate-catalog/blob/master/stable/osg-frontier-squid/osg-frontier-squid/templates/configmap.yaml#L11-L56
Customizing Squid.conf
What we do today
It first sets the IP range here:
Then it sets the monitoring IP range:
Then it sets the Cache memory:
Then we configure the squid as appropriate depending on whether or not there is 1 worker or N workers:
Then we use some cpu affinity business to pin the squid processes to particular cores:
Set the logfile rotation:
What we need to do
We need to change how we customize squid.conf to follow OSG's upstream image. They have made 3 configuration parameters first class citizens:
acl NET_LOCAL src
is set by the environment variableSQUID_IPRANGE
. We should remove this customization, and instead populate the environment variable SQUID_IPRANGE indeployment.yaml
cache_mem
should be set by populating the environment variable SQUID_CACHE_MEMcache_dir
is set by an environment variable as well:SQUID_CACHE_DISK
. This gets more complicated because we have two possible values for it depending on the mode in which squid is running (single worker or multiple workers)For the configuration parameters that are not exposed as environment variables, we need to write some scripts as per https://github.com/opensciencegrid/docker-frontier-squid/blob/master/squid-customize.sh#L8-L19 that suggest making scipts that live in
/etc/squid/customize.d
.We need to write a script that populates the following configuration parameters:
acl HOST_MONITOR src {{ .Values.SquidConf.MonitoringIPRange }}
I am not sure if this needs to be a pre-awk shell script (i.e., needs to be named
customize.d/[0-4]*.sh
) or post-awk (customize.d/[5-9]*.sh
)The text was updated successfully, but these errors were encountered: