Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Merge branch '3.1' into 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Nov 19, 2020
2 parents cbf5dc6 + 0002b61 commit c318b15
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 22 deletions.
7 changes: 1 addition & 6 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ default:

DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~

FriendsOfBehat\SymfonyExtension:
kernel:
path: src/Kernel.php
class: App\Kernel
environment: behat
debug: true
FriendsOfBehat\SymfonyExtension: ~

EzSystems\BehatBundle\BehatExtension: ~

Expand Down
32 changes: 32 additions & 0 deletions config/packages/behat/doctrine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider

services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
10 changes: 0 additions & 10 deletions config/packages/behat/ezplatform.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Siteaccesses are first added in ../ezplatform.yaml.
# Only merge additional siteaccesses here.

ezplatform:
siteaccess:
list:
- other_site
groups:
site_group:
- other_site
sf_group_1: []
sf_group_2: []
default_siteaccess: site
Expand All @@ -27,9 +20,6 @@ ezdesign:
phpstorm:
enabled: false

ez_platform_standard_design:
override_kernel_templates: false

parameters:
ezsettings.admin_group.notifications.success.timeout: 20000
ezplatform.behat.enable_enterprise_services: true
2 changes: 0 additions & 2 deletions config/packages/behat/framework.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions config/packages/behat/routing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
router:
strict_requirements: true
33 changes: 30 additions & 3 deletions doc/docker/entrypoint/varnish/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Script takes the following parameters:
# [--acl-all-networks] - Add all container's network in the PURGE ACL.
# [--acl-add ...] - Add a host or network segment to the PURGE ACL
# [--debug-acl-add ...] - Add a host or network segment to the debuggers ACL

function create_template_file
{
Expand Down Expand Up @@ -34,26 +35,43 @@ function get_net_segments
}

# $1 is segment, format 1.2.3.4/24 or myhostname
function add_segment
function format_segment
{
# convert format 1.2.3.4/24 --> "1.2.3.4"/24;
segment=`echo $1 | sed "s|\(.*\)/\(.*\)|\"\1\"/\2;|"`

# convert format myhost --> "myhost"; ( any string not containing slash )
segment=`echo $segment | sed -E "s|^([^/]+)\$|\"\1\";|"`

echo "$segment"
}

# $1 is segment, format 1.2.3.4/24 or myhostname
function add_segment_to_purge_acl
{
segment=`format_segment $1`

echo "Adding network segment to varnish ACL : $segment"
sed -i -s "s|\(.*ACL_INVALIDATOR.*\)| $segment\n\1|" /etc/varnish/parameters.vcl
}

# $1 is segment, format 1.2.3.4/24 or myhostname
function add_segment_to_debugger_acl
{
segment=`format_segment $1`

echo "Adding network segment to varnish debuggers : $segment"
sed -i -s "s|\(.*DEBUGGER.*\)| $segment\n\1|" /etc/varnish/parameters.vcl
}

create_template_file

while (( "$#" )); do
if [ "$1" = "--acl-all-networks" ]; then
segments=`get_net_segments`

for segment in `echo $segments`; do
add_segment $segment
add_segment_to_purge_acl $segment
done
elif [ "$1" = "--acl-add" ]; then
shift
Expand All @@ -62,7 +80,16 @@ while (( "$#" )); do
if [ "$new_network" = "" ]; then
echo "Warning : --acl-add parameter needs to be followed by a network segment, for instance \"--acl-add 10.0.1.0/24\""
else
add_segment $new_network
add_segment_to_purge_acl $new_network
fi
elif [ "$1" = "--debug-acl-add" ]; then
shift
new_network="$1"

if [ "$new_network" = "" ]; then
echo "Warning : --debug-acl-add parameter needs to be followed by a network segment, for instance \"--debug-add 10.0.1.0/24\""
else
add_segment_to_debugger_acl $new_network
fi
else
echo "Warning : Unrecognized parameter $1"
Expand Down
1 change: 1 addition & 0 deletions doc/docker/entrypoint/varnish/parameters.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ acl invalidators {
acl debuggers {
"127.0.0.1";
"172.16.0.0"/20;
// DEBUGGER
}
2 changes: 1 addition & 1 deletion doc/docker/varnish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
networks:
- frontend
- backend
command: ["--acl-add", "app"]
command: ["--acl-add", "app", "--debug-acl-add", "app"]

## DEBUG??
# In need of debugging all request going to Varnish, use varnishlog, example:
Expand Down

0 comments on commit c318b15

Please sign in to comment.