-
Notifications
You must be signed in to change notification settings - Fork 18
Release #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rocky-master
Are you sure you want to change the base?
Release #519
Changes from 11 commits
382e09d
bbee46a
0485f01
658b686
ff2e830
0f93b88
ee5113f
b6afdcf
e212504
0f50729
790d429
d857551
4473c4c
2957432
bdf8c09
1ef63e9
48b2fd5
13e3a9a
dee72a5
94337cc
1c0be8d
159142f
e4dcd66
57db75a
fef179b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| - name: Ensure Podman is installed (RHEL/CentOS/Amazon Linux 2023) | ||
| ansible.builtin.dnf: | ||
| name: | ||
| - podman | ||
| - containers-common | ||
| - slirp4netns | ||
| - fuse-overlayfs | ||
| state: present | ||
|
|
||
| - name: Pull Google Tag Manager Server-Side image | ||
| containers.podman.podman_image: | ||
| name: gcr.io/cloud-tagging-10302018/gtm-cloud-image | ||
| tag: stable | ||
|
|
||
| # MAIN (tagging) container | ||
| - name: Run GTM SS main container and create systemd service | ||
| containers.podman.podman_container: | ||
| name: gtm | ||
| image: gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable | ||
| state: started | ||
| restart_policy: always | ||
| publish: | ||
| - "8080:8080" | ||
| env: | ||
| PORT: "8080" | ||
| PREVIEW_SERVER_URL: "https://{{ mageops_gtm_preview_domain }}" | ||
| CONTAINER_CONFIG: "{{ gtm_container_config }}" | ||
| generate_systemd: | ||
| path: /etc/systemd/system | ||
| restart_policy: always | ||
|
|
||
| # PREVIEW container (separate instance) | ||
| - name: Run GTM SS preview container and create systemd service | ||
| containers.podman.podman_container: | ||
| name: gtm-preview | ||
| image: gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable | ||
| state: started | ||
| restart_policy: always | ||
| publish: | ||
| - "8081:8080" | ||
| env: | ||
| PORT: "8080" | ||
| RUN_AS_PREVIEW_SERVER: "true" | ||
| CONTAINER_CONFIG: "{{ gtm_container_config }}" | ||
| generate_systemd: | ||
| path: /etc/systemd/system | ||
| restart_policy: always | ||
|
|
||
| - name: Reload systemd and enable services | ||
| ansible.builtin.systemd: | ||
| name: "{{ item }}" | ||
| enabled: yes | ||
| state: started | ||
| daemon_reload: yes | ||
| loop: | ||
| - container-gtm.service | ||
| - container-gtm-preview.service |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| magerun_version: 7.4.0 | ||
| magerun_checksum: sha256:35377402bd94c8ee19c3aecbc52f9bb6f6f9b4970447d1d7884fb6cfbb8cdf9b | ||
| magerun_version: 9.3.0 | ||
| magerun_checksum: sha256:15041cdf99466d80691d9f2ed5f37330115ea37b5ca19b4f1883f1c9a18bd26c | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,30 +27,43 @@ | |
|
|
||
| {% if varnish_standalone %} | ||
| {# This has to be first line, remember this is not declarative config, we always need the director! #} | ||
| {% if (gtm_enabled | default(false)) %} | ||
| if (req.http.Host == "{{ mageops_gtm_domain }}" ) { | ||
| set req.backend_hint = gtm_director.backend(); | ||
| return (pass); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new GTM host branch returns Useful? React with 👍 / 👎. |
||
| } elsif (req.http.Host == "{{ mageops_gtm_preview_domain }}" ) { | ||
| set req.backend_hint = gtm_preview_director.backend(); | ||
| return (pass); | ||
| } else { | ||
| set req.backend_hint = app_director.backend(); | ||
| } | ||
| {% else %} | ||
| set req.backend_hint = app_director.backend(); | ||
| {% endif %} | ||
|
|
||
| if (req.http.X-Use-Extra-Instance | ||
| {% if aws_extra_app_asg_passthrough_uagent_pattern %} | ||
| || req.http.User-Agent ~ "{{ aws_extra_app_asg_passthrough_uagent_pattern }}" | ||
| {% endif %} | ||
| {% if aws_extra_app_asg_passthrough_url_pattern %} | ||
| || req.url ~ "{{ aws_extra_app_asg_passthrough_url_pattern }}" | ||
| {% endif %} | ||
| {% if aws_extra_app_asg_passthrough_ip_pattern %} | ||
| || req.http.x-forwarded-for ~ "{{ aws_extra_app_asg_passthrough_ip_pattern }}" | ||
| {% endif %} | ||
| ) { | ||
| set req.backend_hint = extra_director.backend(); | ||
| if (req.http.X-Use-Extra-Instance | ||
| {% if aws_extra_app_asg_passthrough_uagent_pattern %} | ||
| || req.http.User-Agent ~ "{{ aws_extra_app_asg_passthrough_uagent_pattern }}" | ||
| {% endif %} | ||
| {% if aws_extra_app_asg_passthrough_url_pattern %} | ||
| || req.url ~ "{{ aws_extra_app_asg_passthrough_url_pattern }}" | ||
| {% endif %} | ||
| {% if aws_extra_app_asg_passthrough_ip_pattern %} | ||
| || req.http.x-forwarded-for ~ "{{ aws_extra_app_asg_passthrough_ip_pattern }}" | ||
| {% endif %} | ||
| ) { | ||
| set req.backend_hint = extra_director.backend(); | ||
|
|
||
| {% if varnish_extra_instance_failover_enable %} | ||
| if (!std.healthy(req.backend_hint)) { | ||
| set req.backend_hint = app_director.backend(); | ||
| } | ||
| {% else %} | ||
| # Extra instance failover is disabled - requests will return 5xx | ||
| # in case all of the the extra instances are not healthy. | ||
| {% endif %} | ||
| {% if varnish_extra_instance_failover_enable %} | ||
| if (!std.healthy(req.backend_hint)) { | ||
| set req.backend_hint = app_director.backend(); | ||
| } | ||
| {% else %} | ||
| # Extra instance failover is disabled - requests will return 5xx | ||
| # in case all of the the extra instances are not healthy. | ||
| {% endif %} | ||
|
|
||
| } | ||
| {% endif %} | ||
|
|
||
| {% if varnish_vcl_recv_extra %} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template now defines
gtm_*backends for bothvarnish_backend_instances_app + varnish_backend_instances_extraabove, but this director is still populated fromvarnish_backend_instances_apponly (and the preview director below has the same pattern). In environments that rely on the extra ASG for capacity or failover, GTM traffic will never use those healthy extra nodes, and it can go unavailable if the base app pool is empty or unhealthy even though GTM backends were generated for the extra pool.Useful? React with 👍 / 👎.