Ema has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/376521 )
Change subject: varnish: convert role::cache::instances into a class ...................................................................... varnish: convert role::cache::instances into a class role::cache::instances is currently a define for no valid reason. Turn it into a class so that we can reference attributes defined there from elsewhere. Change-Id: If06e33b95587e76efc93af7d2ccb756c95a10ca9 --- M modules/role/manifests/cache/instances.pp M modules/role/manifests/cache/misc.pp M modules/role/manifests/cache/text.pp M modules/role/manifests/cache/upload.pp 4 files changed, 12 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/376521/1 diff --git a/modules/role/manifests/cache/instances.pp b/modules/role/manifests/cache/instances.pp index 60bf426..40a64ba 100644 --- a/modules/role/manifests/cache/instances.pp +++ b/modules/role/manifests/cache/instances.pp @@ -1,5 +1,6 @@ # This defines the pair of varnish::instance for a 2-layer (fe+be) cache node -define role::cache::instances ( +class role::cache::instances ( + $cache_type, $fe_jemalloc_conf, $fe_runtime_params, $be_runtime_params, @@ -90,10 +91,10 @@ vcl_config => $fe_vcl_config, } - varnish::instance { "${title}-backend": + varnish::instance { "${cache_type}-backend": instance_name => '', layer => 'backend', - vcl => "${title}-backend", + vcl => "${cache_type}-backend", extra_vcl => $be_extra_vcl, ports => [ '3128' ], admin_port => 6083, @@ -116,10 +117,10 @@ } # lint:ignore:arrow_alignment - varnish::instance { "${title}-frontend": + varnish::instance { "${cache_type}-frontend": instance_name => 'frontend', layer => 'frontend', - vcl => "${title}-frontend", + vcl => "${cache_type}-frontend", extra_vcl => $fe_extra_vcl, ports => [ '80', '3120', '3121', '3122', '3123', '3124', '3125', '3126', '3127' ], admin_port => 6082, diff --git a/modules/role/manifests/cache/misc.pp b/modules/role/manifests/cache/misc.pp index 81cb911..05d3ac1 100644 --- a/modules/role/manifests/cache/misc.pp +++ b/modules/role/manifests/cache/misc.pp @@ -42,7 +42,8 @@ # issues in our setup. See T159429 $be_runtime_params = ['timeout_idle=120'] - role::cache::instances { 'misc': + class { 'role::cache::instances': + cache_type => 'misc', fe_jemalloc_conf => 'lg_dirty_mult:8,lg_chunk:16', fe_runtime_params => $common_runtime_params, be_runtime_params => concat($common_runtime_params, $be_runtime_params), diff --git a/modules/role/manifests/cache/text.pp b/modules/role/manifests/cache/text.pp index 584203b..dd69ad1 100644 --- a/modules/role/manifests/cache/text.pp +++ b/modules/role/manifests/cache/text.pp @@ -57,7 +57,8 @@ $text_storage_args = $::role::cache::base::file_storage_args - role::cache::instances { 'text': + class { 'role::cache::instances': + cache_type => 'text', fe_jemalloc_conf => 'lg_dirty_mult:8,lg_chunk:16', fe_runtime_params => $common_runtime_params, be_runtime_params => $common_runtime_params, diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 52b00b9..3b4db65 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -76,7 +76,8 @@ $common_runtime_params = ['default_ttl=86400'] - role::cache::instances { 'upload': + class { 'role::cache::instances': + cache_type => 'upload', fe_jemalloc_conf => 'lg_dirty_mult:8,lg_chunk:17', fe_runtime_params => $common_runtime_params, be_runtime_params => $common_runtime_params, -- To view, visit https://gerrit.wikimedia.org/r/376521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If06e33b95587e76efc93af7d2ccb756c95a10ca9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema <e...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits