[MediaWiki-commits] [Gerrit] Get base domainname from ldap.conf - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/197087 Change subject: Get base domainname from ldap.conf .. Get base domainname from ldap.conf Change-Id: Id541e43777e0c0e4d7499d1997354daa37b519c2 --- M modules/puppetmaster/files/puppetsigner.py 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/197087/1 diff --git a/modules/puppetmaster/files/puppetsigner.py b/modules/puppetmaster/files/puppetsigner.py index 7d269b6..c9fe183 100755 --- a/modules/puppetmaster/files/puppetsigner.py +++ b/modules/puppetmaster/files/puppetsigner.py @@ -28,6 +28,7 @@ (options, args) = parser.parse_args() ldapSupportLib.setBindInfoByOptions(options, parser) ds = ldapSupportLib.connect() +basedn = ldapSupportLib.getLdapInfo('base') try: proc = subprocess.Popen('/usr/bin/puppet cert list', shell=True, stdout=subprocess.PIPE) hosts = proc.communicate() @@ -36,7 +37,6 @@ if host[0] == (: continue host = host.strip('') -basedn = getPuppetInfo('ldapbase') query = ((objectclass=puppetclient)(|(dc= + host + )(cnamerecord= + host + )(associateddomain= + host + ))) PosixData = ds.search_s(basedn, ldap.SCOPE_SUBTREE, query) if not PosixData: @@ -52,7 +52,6 @@ hosts = proc.communicate() hosts = json.loads(hosts[0]) for host in hosts[minions_pre]: -basedn = getPuppetInfo('ldapbase') query = ((objectclass=puppetclient)(|(dc= + host + )(cnamerecord= + host + )(associateddomain= + host + ))) PosixData = ds.search_s(basedn, ldap.SCOPE_SUBTREE, query) if not PosixData: -- To view, visit https://gerrit.wikimedia.org/r/197087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id541e43777e0c0e4d7499d1997354daa37b519c2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow override of sync_common config - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/198173 Change subject: Allow override of sync_common config .. Allow override of sync_common config Add an optional override of scap.cfg via hiera. Needed to automate the setup of appservers in the staging environment in labs. Bug: T91548 Change-Id: Ia76802ecaee64bee8066ce33724e3c1c6992051e --- M modules/mediawiki/manifests/scap.pp 1 file changed, 19 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/73/198173/1 diff --git a/modules/mediawiki/manifests/scap.pp b/modules/mediawiki/manifests/scap.pp index 05fa63f..b1c9c0a 100644 --- a/modules/mediawiki/manifests/scap.pp +++ b/modules/mediawiki/manifests/scap.pp @@ -5,13 +5,20 @@ # scap is installed, that the shell environment is configured for # MediaWiki, and that the MediaWiki deployment directory exists and # contains a copy of MediaWiki. + +# === Parameters: +# [*defines*] +# Optional. Add override parameters for scap's config. # -class mediawiki::scap { +class mediawiki::scap( +$defines = undef, +) { include ::mediawiki::users $mediawiki_deployment_dir = '/srv/mediawiki' $mediawiki_staging_dir= '/srv/mediawiki-staging' $scap_bin_dir = '/srv/deployment/scap/scap/bin' +$scap_cmd = ${scap_bin_dir}/sync-common $mediawiki_web_user = $::mediawiki::users::web # 'scap' is the command-line tool we use to push MediaWiki changes @@ -48,8 +55,18 @@ # If this is a new install, populate /srv/mediawiki by retrieving # the current MediaWiki deployment tree from the deployment server. +# override scap config file with hiera variables in labs, e.g.: +# mediawiki::scap::defines: master_rsync:staging-tin.eqiad.wmflabs +if $defines { +$scap_defines = join(concat([], $defines), ' --define ') + +$sync_common = ${scap_cmd} --define ${scap_defines} +} else { +$sync_common = $scap_cmd +} + exec { 'fetch_mediawiki': -command = ${scap_bin_dir}/sync-common, +command = $sync_common, creates = ${mediawiki_deployment_dir}/docroot, require = [ File[$mediawiki_deployment_dir], Package['scap'] ], timeout = 30 * 60, # 30 minutes -- To view, visit https://gerrit.wikimedia.org/r/198173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia76802ecaee64bee8066ce33724e3c1c6992051e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add version to mariadb package resource - change (operations...mariadb)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/195328 Change subject: Add version to mariadb package resource .. Add version to mariadb package resource Both Trusty and Precise complain and require '--force-yes' to install mariadb packages via this puppet module. Older versions of puppet (like the one from the Trusty repo) don't support install_options for the apt provider—must specify a package version to trigger --force-yes to be appended to install command. Change-Id: Id34902254eeb456fea070d58ea0aa37098295e86 --- M manifests/packages.pp 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/mariadb refs/changes/28/195328/1 diff --git a/manifests/packages.pp b/manifests/packages.pp index 11b79e7..85e0992 100644 --- a/manifests/packages.pp +++ b/manifests/packages.pp @@ -7,6 +7,7 @@ uri= 'http://apt.wikimedia.org/wikimedia', dist = 'precise-wikimedia', components = 'mariadb', +notify = Exec['apt-get update'], } package { [ @@ -14,9 +15,18 @@ 'mariadb-client-5.5', 'mariadb-server-5.5', 'mariadb-server-core-5.5', +]: +# Needed to trigger --force-yes on versions of puppet without +# the install_options parameter (read: Trusty) +ensure = '5.5.34+maria-1~precise', +require = Apt::Repository['wikimedia_mariadb'], +} + +package { [ 'percona-toolkit', 'percona-xtrabackup', ]: -ensure = present, +ensure = present, +require = Apt::Repository['wikimedia_mariadb'], } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/195328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id34902254eeb456fea070d58ea0aa37098295e86 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/mariadb Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Combine deployment_server roles - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/195336 Change subject: Combine deployment_server roles .. Combine deployment_server roles Combines the majority of role::deployment::deployment_servers::{production,labs} into role::deployment::deployment_servers::common. Shifts most configuration over to hiera. Change-Id: Iad21f81973d20857ede4eae542fc8b02fb8361a8 --- M manifests/role/deployment.pp 1 file changed, 31 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/195336/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index e535013..58d62c4 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -131,6 +131,9 @@ class role::deployment::deployment_servers::common( # Source of the key, change this if not in production, with hiera. $key_source = 'puppet:///private/ssh/tin/mwdeploy_rsa', +$apache_fqdn = $::fqdn, +$deployable_networks, +$deployment_group = 'wikidev', ) { # Can't include this while scap is present on tin: # include misc::deployment::scripts @@ -166,24 +169,13 @@ keyholder::private_key { 'mwdeploy_rsa': source = $key_source, } -} - -class role::deployment::deployment_servers::production { -include role::deployment::deployment_servers::common -include network::constants -include wikitech::wiki::passwords -include apache::helper_scripts -include dsh -include rsync::server file { '/srv/deployment': ensure = directory, owner = 'trebuchet', -group = 'wikidev', +group = $deployment_group, } -$deployable_networks = $::network::constants::deployable_networks -$apache_fqdn = $::fqdn apache::site { 'deployment': content = template('apache/sites/deployment.erb'), @@ -201,6 +193,29 @@ port = '6379', } +sudo::group { ${deployment_group}_deployment_server: +group = $deployment_group, +privileges = [ +'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json pillar.data', +'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner deploy.fetch *', +'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner deploy.checkout *', +'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json publish.runner deploy.restart *', +], +} + +} + +class role::deployment::deployment_servers::production { +include network::constants +include wikitech::wiki::passwords +include apache::helper_scripts +include dsh +include rsync::server + +class { role::deployment::deployment_servers::common: +deployable_networks = $::network::constants::deployable_networks +} + package { 'percona-toolkit': ensure = latest, } @@ -209,16 +224,6 @@ # determining the state of git repos during deployments. package { 'tig': ensure = latest, -} - -sudo::group { 'wikidev_deployment_server': -group = 'wikidev', -privileges = [ -'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json pillar.data', -'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner deploy.fetch *', -'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner deploy.checkout *', -'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json publish.runner deploy.restart *', -], } } @@ -248,8 +253,6 @@ } class role::deployment::deployment_servers::labs { -include role::deployment::deployment_servers::common - # Enable multiple test environments within a single project if ( $::deployment_server_override != undef ) { $apache_fqdn = $::deployment_server_override @@ -257,17 +260,10 @@ $apache_fqdn = ${::instanceproject}-deploy.eqiad.wmflabs } -$deployable_networks = '10.0.0.0/8' - -file { '/srv/deployment': -ensure = directory, -owner = 'trebuchet', -group = project-${::instanceproject}, -} - -apache::site { 'deployment': -content = template('apache/sites/deployment.erb'), -require = File['/srv/deployment'], +class {role::deployment::deployment_servers::common: +apache_fqdn = $apache_fqdn, +deployable_networks = '10.0.0.0/8', +deployment_group= project-${::instanceproject}, } ferm::service { 'http_deployment_server': @@ -277,26 +273,6 @@ srange = $deployable_networks, } -class { 'redis': -dir = '/srv/redis', -maxmemory = '500Mb', -monitor = false, -} - -ferm::service { 'deployment-redis': -proto = 'tcp', -port = '6379', -} - -sudo::group {
[MediaWiki-commits] [Gerrit] Add master_key param for salt_minion module - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/195492 Change subject: Add master_key param for salt_minion module .. Add master_key param for salt_minion module Patch to overwrite /etc/salt/pki/minion/minion_master.pub on salt minion host to allow contact to a non-default salt master in labs. Change-Id: I96534f4eb4d3172ff9e36ec0a9dfb99257c7968a --- M manifests/role/salt.pp M modules/salt/manifests/minion.pp 2 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/195492/1 diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp index 1ebab09..655f218 100644 --- a/manifests/role/salt.pp +++ b/manifests/role/salt.pp @@ -74,8 +74,9 @@ } class role::salt::minions( -$salt_master = $::salt_master_override, -$salt_finger = $::salt_master_finger_override, +$salt_master = $::salt_master_override, +$salt_finger = $::salt_master_finger_override, +$salt_master_key = $::salt_master_key, ) { if $::realm == 'labs' { $labs_masters = [ 'virt1000.wikimedia.org', 'labcontrol2001.wikimedia.org' ] @@ -98,6 +99,7 @@ id= $client_id, master= $master, master_finger = $master_finger, +master_key= $salt_master_key, grains= { realm = $::realm, site= $::site, diff --git a/modules/salt/manifests/minion.pp b/modules/salt/manifests/minion.pp index 146003c..1d58995 100644 --- a/modules/salt/manifests/minion.pp +++ b/modules/salt/manifests/minion.pp @@ -33,6 +33,7 @@ class salt::minion( $master, $master_finger, +$master_key = '', $id= $::fqdn, $grains= {}, ) { @@ -72,4 +73,13 @@ group = 'root', mode = '0544', } + +if ($master_key != '') { +file { '/etc/salt/pki/minion/minion_master.pub': +owner = 'root', +group = 'root', +mode= '0444', +content = $master_key, +} +} } -- To view, visit https://gerrit.wikimedia.org/r/195492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96534f4eb4d3172ff9e36ec0a9dfb99257c7968a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add /etc/mysql dir before linking inside it - change (operations...mariadb)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/194925 Change subject: Add /etc/mysql dir before linking inside it .. Add /etc/mysql dir before linking inside it Add a file resource for /etc/mysql and require that resource before linking /etc/my.cnf to /etc/mysql/my.cnf. Link will fail if /etc/mysql does not exist. Change-Id: Idf2d87606a58ee993c235e59dd7d03404b5f1285 --- M manifests/config.pp 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/mariadb refs/changes/25/194925/1 diff --git a/manifests/config.pp b/manifests/config.pp index ec56643..f4553f6 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -29,9 +29,19 @@ content = template('mariadb/root.my.cnf.erb'), } +if ! defined(File['/etc/mysql']) { +file { '/etc/mysql': +ensure = directory, +mode = '0755', +owner = 'root', +group = 'root', +} +} + file { '/etc/mysql/my.cnf': ensure = link, target = '/etc/my.cnf', +require = File['/etc/mysql'], } # Include these manually. If we're testing on systems with tarballs -- To view, visit https://gerrit.wikimedia.org/r/194925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf2d87606a58ee993c235e59dd7d03404b5f1285 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/mariadb Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Parameterize mail::mx role - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/196658 Change subject: Parameterize mail::mx role .. Parameterize mail::mx role Change-Id: If918ba46e9783abc6d7c7ef0dfd968a5a8b658b3 --- M manifests/role/mail.pp 1 file changed, 7 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/58/196658/1 diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp index 41880af..feb5499 100644 --- a/manifests/role/mail.pp +++ b/manifests/role/mail.pp @@ -5,7 +5,13 @@ } } -class role::mail::mx { +class role::mail::mx( +$verp_domains = [ +'wikimedia.org' +], +$verp_post_connect_server = 'test2.wikipedia.org', +$verp_bounce_post_url = api.svc.${::mw_primary}.wmnet/w/api.php, +) { include network::constants include privateexim::aliases::private @@ -22,27 +28,6 @@ use_bayes= '1', bayes_auto_learn = '1', trusted_networks = $network::constants::all_networks, -} - -# MediaWiki VERP bounce processor config - labs vs. production -case $::realm { -'labs': { -$verp_domains = [ -'beta.wmflabs.org' -] -$verp_post_connect_server = 'deployment.wikimedia.beta.wmflabs.org' -$verp_bounce_post_url = 'http://deployment.wikimedia.beta.wmflabs.org/w/api.php' -} -'production': { -$verp_domains = [ -'wikimedia.org' -] -$verp_post_connect_server = 'test2.wikipedia.org' -$verp_bounce_post_url = api.svc.${::mw_primary}.wmnet/w/api.php -} -default: { -fail('unknown realm, should be labs or production') -} } class { 'exim::roled': -- To view, visit https://gerrit.wikimedia.org/r/196658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If918ba46e9783abc6d7c7ef0dfd968a5a8b658b3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure apt update before sql libraries install - change (operations...mariadb)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/195779 Change subject: Ensure apt update before sql libraries install .. Ensure apt update before sql libraries install This alleviates conflicts with libmysqlclient18 where installing the system package would require you to later downgrade libmysqlclient18 to install mariadb-server-5.5. Change-Id: I999a2fa7ef57d577effe3c2a0918771cf1a6c07e --- M manifests/packages.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/mariadb refs/changes/79/195779/1 diff --git a/manifests/packages.pp b/manifests/packages.pp index 11b79e7..d14c725 100644 --- a/manifests/packages.pp +++ b/manifests/packages.pp @@ -17,6 +17,7 @@ 'percona-toolkit', 'percona-xtrabackup', ]: -ensure = present, +ensure = present, +require = Exec['apt-get update'], } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/195779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I999a2fa7ef57d577effe3c2a0918771cf1a6c07e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/mariadb Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Assign swift roles via ENC - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/200625 Change subject: Assign swift roles via ENC .. Assign swift roles via ENC Bug: T91553 Change-Id: Ibb0139e8857d068f6a57e648824b9e2f12e69806 --- M nodes/labs/staging.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/25/200625/1 diff --git a/nodes/labs/staging.yaml b/nodes/labs/staging.yaml index 10ce964..b8df70d 100644 --- a/nodes/labs/staging.yaml +++ b/nodes/labs/staging.yaml @@ -1,3 +1,9 @@ +.*-ms-be\d\d: + - swift::base + - swift::storage +.*-ms-fe\d\d: + - swift::base + - swift::proxy .*-elastic\d\d: - role::elasticsearch::server .*-mc\d\d: -- To view, visit https://gerrit.wikimedia.org/r/200625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb0139e8857d068f6a57e648824b9e2f12e69806 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add silver dblist - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/199940 Change subject: Add silver dblist .. Add silver dblist File was generated on tin as part of morning swat deploy of CId I345516cd005b2716cd11925d528a182503910f0e on March 10th Been sitting on tin uncommit since. Change-Id: I224a2fcd66c8b92d7821f193c7520e4b699b145f --- A silver.dblist 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/40/199940/1 diff --git a/silver.dblist b/silver.dblist new file mode 100644 index 000..c3308d0 --- /dev/null +++ b/silver.dblist @@ -0,0 +1 @@ +labswiki -- To view, visit https://gerrit.wikimedia.org/r/199940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I224a2fcd66c8b92d7821f193c7520e4b699b145f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Include hiera classes in lab instance role - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/194426 Change subject: Include hiera classes in lab instance role .. Include hiera classes in lab instance role Bug: T90592 Change-Id: Ie748f117caa41fca559232e58a07f707d796f78a --- M manifests/role/labs.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/194426/1 diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index 6116b5b..5db3bed 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -158,6 +158,8 @@ # icinga, so collect puppet freshness metrics via diamond/graphite diamond::collector::minimalpuppetagent { 'minimal-puppet-agent': } +hiera_include('classes', []) + # The next two notifications are read in by the labsstatus.rb puppet report handler. # It needs to know project/hostname for nova access. notify{instanceproject: ${::instanceproject}:} -- To view, visit https://gerrit.wikimedia.org/r/194426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie748f117caa41fca559232e58a07f707d796f78a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add classes via hiera for labs - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/194413 Change subject: Add classes via hiera for labs .. Add classes via hiera for labs Parameterize role::puppet::self and role::salt::minions. Allow for project-wide puppetmaster and salt master. Bug: T90592 Change-Id: I9d3160362f3c7ed73091f8c6ad0d5af632cdeeb8 --- M manifests/role/labs.pp M manifests/role/puppet.pp M manifests/role/salt.pp 3 files changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/194413/1 diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index 6116b5b..5db3bed 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -158,6 +158,8 @@ # icinga, so collect puppet freshness metrics via diamond/graphite diamond::collector::minimalpuppetagent { 'minimal-puppet-agent': } +hiera_include('classes', []) + # The next two notifications are read in by the labsstatus.rb puppet report handler. # It needs to know project/hostname for nova access. notify{instanceproject: ${::instanceproject}:} diff --git a/manifests/role/puppet.pp b/manifests/role/puppet.pp index 5ce7048..6f3906e 100644 --- a/manifests/role/puppet.pp +++ b/manifests/role/puppet.pp @@ -49,18 +49,20 @@ # This allows puppet classes to be configured via LDAP # and wikitech instance configuration. # -class role::puppet::self { +class role::puppet::self( +$master = $::puppetmaster, +) { # If $::puppetmaster is not set, assume # this is a self hosted puppetmaster, not allowed # to serve any other puppet clients. -$server = $::puppetmaster ? { +$server = $master ? { undef = 'localhost', 'localhost' = 'localhost', '' = 'localhost', # if has . characters in in, assume fqdn. - /\./= $::puppetmaster, + /\./= $master, # else assume short hostname and append domain. - default = ${::puppetmaster}.${::domain}, + default = ${master}.${::domain}, } # If localhost or if $server matches this node's diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp index 4b06c90..7d2e5d6 100644 --- a/manifests/role/salt.pp +++ b/manifests/role/salt.pp @@ -73,12 +73,15 @@ } -class role::salt::minions { +class role::salt::minions( +$salt_master = $::salt_master_override, +$salt_finger = $::salt_master_finger_override, +) { if $::realm == 'labs' { $labs_masters = [ 'virt1000.wikimedia.org', 'labcontrol2001.wikimedia.org' ] $labs_finger = 'c5:b1:35:45:3e:0a:19:70:aa:5f:3a:cf:bf:a0:61:dd' -$master= pick($::salt_master_override, $labs_masters) -$master_finger = pick($::salt_master_finger_override, $labs_finger) +$master= pick($salt_master, $labs_masters) +$master_finger = pick($salt_finger, $labs_finger) $client_id = ${::ec2id}.${::domain} salt::grain { 'instanceproject': -- To view, visit https://gerrit.wikimedia.org/r/194413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d3160362f3c7ed73091f8c6ad0d5af632cdeeb8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add hiera yaml for staging, refactor salt class - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/193545 Change subject: Add hiera yaml for staging, refactor salt class .. Add hiera yaml for staging, refactor salt class Adds a bunch of hiera variables for staging, and refactors the salt master roles to allow for easier hiera abstraction. Bug: T88304 Change-Id: I4265ed0b2c26e3ae29f10df7482386bfd7f5e559 --- A hieradata/labs/staging/common.yaml M manifests/role/salt.pp M modules/salt/manifests/master.pp 3 files changed, 22 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/193545/1 diff --git a/hieradata/labs/staging/common.yaml b/hieradata/labs/staging/common.yaml new file mode 100644 index 000..52a9ef9 --- /dev/null +++ b/hieradata/labs/staging/common.yaml @@ -0,0 +1,8 @@ +--- +salt::master::salt_runner_dirs: [ '/srv/runners' ] +salt::master::salt_peer_run: { '.*.eqiad.wmflabs': [ 'deploy.*' ] } +salt::master::salt_state_roots: { base: [ '/srv/salt' ] } +salt::master::salt_file_roots: { base: [ '/srv/salt' ] } +salt::master::salt_pillar_roots: { base: [ '/srv/pillars' ] } +salt::master::salt_module_roots: { base: [ '/srv/salt/_modules' ] } +salt::master::salt_returner_roots: { base: [ '/srv/salt/_returners' ] } diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp index 7b848a9..4b06c90 100644 --- a/manifests/role/salt.pp +++ b/manifests/role/salt.pp @@ -14,12 +14,7 @@ salt_file_roots = $salt_file_roots, salt_pillar_roots = $salt_pillar_roots, salt_worker_threads = '25', -} - -salt::master_environment{ 'base': salt_state_roots= $salt_state_roots, -salt_file_roots = $salt_file_roots, -salt_pillar_roots = $salt_pillar_roots, salt_module_roots = $salt_module_roots, salt_returner_roots = $salt_returner_roots, } @@ -40,18 +35,13 @@ salt_file_roots = $salt_file_roots, salt_pillar_roots = $salt_pillar_roots, salt_worker_threads = '50', +salt_state_roots= $salt_state_roots, +salt_module_roots = $salt_module_roots, +salt_returner_roots = $salt_returner_roots, } class { 'salt::reactors': salt_reactor_options = { 'puppet_server' = 'virt1000.wikimedia.org' }, -} - -salt::master_environment{ 'base': -salt_state_roots= $salt_state_roots, -salt_file_roots = $salt_file_roots, -salt_pillar_roots = $salt_pillar_roots, -salt_module_roots = $salt_module_roots, -salt_returner_roots = $salt_returner_roots, } } @@ -76,12 +66,7 @@ salt_file_roots = $salt_file_roots, salt_pillar_roots = $salt_pillar_roots, salt_worker_threads = '10', -} - -salt::master_environment{ 'base': salt_state_roots= $salt_state_roots, -salt_file_roots = $salt_file_roots, -salt_pillar_roots = $salt_pillar_roots, salt_module_roots = $salt_module_roots, salt_returner_roots = $salt_returner_roots, } diff --git a/modules/salt/manifests/master.pp b/modules/salt/manifests/master.pp index 6267607..cd1d37b 100644 --- a/modules/salt/manifests/master.pp +++ b/modules/salt/manifests/master.pp @@ -11,6 +11,9 @@ $salt_peer={}, $salt_peer_run={}, $salt_nodegroups={}, +$salt_state_roots={'base'=['/srv/salt']}, +$salt_module_roots={'base'=['/srv/salt/_modules']}, +$salt_returner_roots={'base'=['/srv/salt/_returners']}, ){ package { 'salt-master': ensure = $salt_version, @@ -44,4 +47,12 @@ owner = 'root', group = 'root', } + +salt::master_environment{ 'base': +salt_state_roots= $salt_state_roots, +salt_file_roots = $salt_file_roots, +salt_pillar_roots = $salt_pillar_roots, +salt_module_roots = $salt_module_roots, +salt_returner_roots = $salt_returner_roots, +} } -- To view, visit https://gerrit.wikimedia.org/r/193545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4265ed0b2c26e3ae29f10df7482386bfd7f5e559 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change regex to match labs hiera config - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/193165 Change subject: Change regex to match labs hiera config .. Change regex to match labs hiera config Change-Id: I9a759e8f6c98c54c73219c25c1a084bed5a29baf --- M modules/wmflib/lib/hiera/backend/mwyaml_backend.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/65/193165/1 diff --git a/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb b/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb index 48802ad..6d4d195 100644 --- a/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb +++ b/modules/wmflib/lib/hiera/backend/mwyaml_backend.rb @@ -14,7 +14,7 @@ # Small hack: - we don't want to search any datasource but the # labs/%{::instanceproject} hierarchy here; so we plainly exit # in any other case - if m = /labs\/([^\/]+)$/.match(source) + if m = /labs\/([^\/]+)\//.match(source) source = m[1].capitalize else next -- To view, visit https://gerrit.wikimedia.org/r/193165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a759e8f6c98c54c73219c25c1a084bed5a29baf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trebuchet group wikidev; mw-staging owner mwdeploy - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/199988 Change subject: Trebuchet group wikidev; mw-staging owner mwdeploy .. Trebuchet group wikidev; mw-staging owner mwdeploy Change ownership of files on {tin,deployment-bastion} to correct recent permissions problems that arose from combining role::deployment::server::{production,labs} into role::deployment::server (I3e947637b49ce2a94128e21db35798a49e8d45e8) Bug: T94054 Change-Id: I0b391b1c50857794d1526edc2c80e3c87b67ef8c --- M hieradata/labs/deployment-prep/common.yaml M hieradata/labs/staging/common.yaml M manifests/role/deployment.pp M modules/scap/manifests/master.pp 4 files changed, 4 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/199988/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 9a56dd2..86640cc 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -180,6 +180,5 @@ role::url_downloader::url_downloader_ip: 10.68.16.135 zotero::http_proxy: deployment-urldownloader.eqiad.wmflabs:8080 role::trebuchet::deployment_server: deployment-bastion.eqiad.wmflabs -role::deployment::server::deployment_group: 'project-deployment-prep' dsh::config::group_source: 'puppet:///modules/beta/dsh/group' mediawiki::users::mwdeploy_pub_key: 'ssh-rsa B3NzaC1yc2EDAQABAAABAQDFwlmBBBJAr1GI+vuYjFh5vq0YIVa5fqE5DZdpzUZISlQ0Kt+9bIr2qNHIj+Jl5Bc6ZY1mkh8l693tAHVx+8tayoiFWYNs9IVsxR+iHgOOhAdDIBXaHaUattdiye5bQmdvJVXaVegckNX2gbmUCOc09jvZvlk3blKFTSEpZRU8dmpXQzKdZgaAq2VTajAegoFnuN9FbC7hzBPA+1NxFNKn94eIeFPSlo5rWr44OEb5Uy3O0B5c6WPM+IgfiygetP+yGL4cKv7qEjZ0Sxok/Rh1lBh1vP1YQ/Mc6tMV0s+kOv7Wz+P88bfU1/uWvy479OZdfh3NQqDTrLzqHwVW1vef root@deployment-salt' diff --git a/hieradata/labs/staging/common.yaml b/hieradata/labs/staging/common.yaml index 51e4f1e..41d510e 100644 --- a/hieradata/labs/staging/common.yaml +++ b/hieradata/labs/staging/common.yaml @@ -6,6 +6,5 @@ salt::master::salt_pillar_roots: { base: [ '/srv/pillars' ] } salt::master::salt_module_roots: { base: [ '/srv/salt/_modules' ] } salt::master::salt_returner_roots: { base: [ '/srv/salt/_returners' ] } -role::deployment::server::deployment_group: 'project-staging' role::deployment::salt_masters::deployment_server: staging-tin.eqiad.wmflabs role::trebuchet::deployment_server: staging-tin.eqiad.wmflabs diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index e9c5d8c..636cd95 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -156,10 +156,7 @@ $deployable_networks = $::network::constants::deployable_networks include mediawiki - -class { 'scap::master': -deployment_group = $deployment_group, -} +include scap::master if $::realm != 'labs' { include wikitech::wiki::passwords diff --git a/modules/scap/manifests/master.pp b/modules/scap/manifests/master.pp index 51720f1..7340343 100644 --- a/modules/scap/manifests/master.pp +++ b/modules/scap/manifests/master.pp @@ -1,6 +1,6 @@ # = class: scap::master # -# Sets up a scap master (currently tin). +# Sets up a scap master (currently tin) class scap::master( $common_path= '/srv/mediawiki', $common_source_path = '/srv/mediawiki-staging', @@ -8,6 +8,7 @@ $statsd_host= 'statsd.eqiad.wmnet', $statsd_port= 8125, $deployment_group = 'wikidev', +$staging_group = 'mwdeploy', ) { include scap::scripts include rsync::server @@ -17,7 +18,7 @@ git::clone { 'operations/mediawiki-config': directory = $common_source_path, ensure= present, -group = $deployment_group, +group = $staging_group, shared= true, } -- To view, visit https://gerrit.wikimedia.org/r/199988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b391b1c50857794d1526edc2c80e3c87b67ef8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge parsoid beta and production roles - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/201636 Change subject: Merge parsoid beta and production roles .. Merge parsoid beta and production roles Combines beta and production roles for the staging project. Change-Id: Ifee4628240413c260ca696057d1989ff6dee4733 --- M manifests/role/parsoid.pp M manifests/site.pp 2 files changed, 62 insertions(+), 128 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/201636/1 diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp index 2a72280..42a9e40 100644 --- a/manifests/role/parsoid.pp +++ b/manifests/role/parsoid.pp @@ -2,7 +2,31 @@ @monitoring::group { 'parsoid_eqiad': description = 'eqiad parsoid servers' } -class role::parsoid::common { +class role::parsoid ( +$parsoid_log_dir = '/var/log/parsoid/', +$parsoid_log_file = '/var/log/parsoid/parsoid.log', +$parsoid_user = 'parsoid', +$parsoid_group = 'parsoid', +$parsoid_settings_file = '/srv/deployment/parsoid/deploy/conf/wmf/localsettings.js', +$parsoid_node_path = '/var/lib/parsoid/deploy/node_modules', +$parsoid_base_path = '/var/lib/parsoid/deploy/src' +) { +system::role { 'role::parsoid::production': +description = 'Parsoid server' +} + +include standard + +if ($::realm == 'production') { +include admin +} + +if hiera('has_lvs', true) { +include lvs::realserver +} + +include base::firewall + package { [ 'nodejs', 'npm', @@ -29,22 +53,6 @@ proto = 'tcp', port = '8000', } -} - -class role::parsoid::production { -system::role { 'role::parsoid::production': -description = 'Parsoid server' -} - -include role::parsoid::common -include standard -include admin -include lvs::realserver -include base::firewall - -package { 'parsoid/deploy': -provider = 'trebuchet', -} group { 'parsoid': ensure = present, @@ -53,15 +61,25 @@ } user { 'parsoid': -gid = 'parsoid', -home = '/var/lib/parsoid', -managehome= true, -system= true, +gid= 'parsoid', +home = '/var/lib/parsoid', +managehome = true, +system = true, +require= Group['parsoid'], } file { '/var/lib/parsoid/deploy': -ensure = link, -target = '/srv/deployment/parsoid/deploy', +ensure = link, +target = '/srv/deployment/parsoid/deploy', +require = User['parsoid'], +} + +file { $parsoid_log_dir: +ensure = directory, +mode= '0775', +owner = $parsoid_user, +group = $parsoid_group, +require = User['parsoid'], } file { '/etc/init/parsoid.conf': @@ -71,28 +89,18 @@ mode= '0444', source = 'puppet:///files/misc/parsoid.upstart', } -file { '/var/log/parsoid': -ensure = directory, -owner = parsoid, -group = parsoid, -mode = '0775', -} -$parsoid_log_file = '/var/log/parsoid/parsoid.log' -#TODO: Should we explicitly set this to '/srv/deployment/parsoid/deploy/node_modules' -#just like beta labs -$parsoid_node_path = '/var/lib/parsoid/deploy/node_modules' -$parsoid_settings_file = '/srv/deployment/parsoid/deploy/conf/wmf/localsettings.js' -$parsoid_base_path = '/var/lib/parsoid/deploy/src' - -#TODO: Duplication of code from beta class, deduplicate somehow file { '/etc/default/parsoid': ensure = present, owner = root, group = root, mode= '0444', content = template('misc/parsoid.default.erb'), -require = File['/var/log/parsoid'], +require = File[$parsoid_log_dir], +} + +package { 'parsoid/deploy': +provider = 'trebuchet', } file { '/etc/logrotate.d/parsoid': @@ -101,15 +109,6 @@ group = root, mode= '0444', content = template('misc/parsoid.logrotate.erb'), -} - -cron { 'parsoid-hourly-logrot': -ensure = present, -command = '/usr/sbin/logrotate /etc/logrotate.d/parsoid', -user = 'root', -hour = '*', -minute = '12', -require = File['/etc/logrotate.d/parsoid'], } service { 'parsoid': @@ -124,6 +123,15 @@ require= Package['parsoid/deploy'], } +cron { 'parsoid-hourly-logrot': +ensure = present, +command = '/usr/sbin/logrotate /etc/logrotate.d/parsoid', +user = 'root', +hour = '*', +minute = '12', +require = File['/etc/logrotate.d/parsoid'], +} + monitoring::service { 'parsoid': description = 'Parsoid', check_command = 'check_http_on_port!8000', @@
[MediaWiki-commits] [Gerrit] Bump Popup submodule Submodule extensions/Popups b95d4e9..22... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/205266 Change subject: Bump Popup submodule Submodule extensions/Popups b95d4e9..220d35d:Update the popups-send-feedback string to include the fact that its an external link .. Bump Popup submodule Submodule extensions/Popups b95d4e9..220d35d: Update the popups-send-feedback string to include the fact that its an external link Change-Id: I5786dffd9c93ca3638d2fb8ebb26bcd341d1d41e --- M extensions/Popups 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/205266/1 diff --git a/extensions/Popups b/extensions/Popups index b95d4e9..220d35d 16 --- a/extensions/Popups +++ b/extensions/Popups -Subproject commit b95d4e9fcaf36911453af225e39cfb86c9ce1b49 +Subproject commit 220d35d9abb0b1b8fd431d9c97e68a66031fb22f -- To view, visit https://gerrit.wikimedia.org/r/205266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5786dffd9c93ca3638d2fb8ebb26bcd341d1d41e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf1 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update popup submodule - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/205264 Change subject: Update popup submodule .. Update popup submodule Change-Id: I51c49892ef0bd299bc65c1f47d3dba3298e272ab --- M extensions/Popups 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/205264/1 diff --git a/extensions/Popups b/extensions/Popups index 1575f5f..220d35d 16 --- a/extensions/Popups +++ b/extensions/Popups -Subproject commit 1575f5f9e49ba9f75635e2dff1f7bb303b79863a +Subproject commit 220d35d9abb0b1b8fd431d9c97e68a66031fb22f -- To view, visit https://gerrit.wikimedia.org/r/205264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51c49892ef0bd299bc65c1f47d3dba3298e272ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf1 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make scap localization cache build $TMPDIR aware - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/206856 Change subject: Make scap localization cache build $TMPDIR aware .. Make scap localization cache build $TMPDIR aware Bug: T97257 Change-Id: I1d8e4eddc308260f8e2fd488cf84dcf82da3734a --- M scap/tasks.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/56/206856/1 diff --git a/scap/tasks.py b/scap/tasks.py index 395264e..2d32466 100644 --- a/scap/tasks.py +++ b/scap/tasks.py @@ -16,6 +16,7 @@ import shutil import socket import subprocess +from tempfile import gettempdir from . import cdblib from . import log @@ -401,8 +402,8 @@ :param quiet: Whether to pass --quiet logger = logging.getLogger('update_localization_cache') -temp_dir = '/tmp/scap_l10n_' + str( -random.SystemRandom().randint(0, 0x)) +temp_dir = os.path.join(gettempdir(), 'scap_l10n_' + str( +random.SystemRandom().randint(0, 0x))) # Create a temporary directory for l10n CDB files utils.sudo_check_call('www-data', 'mkdir %s' % (temp_dir), logger) -- To view, visit https://gerrit.wikimedia.org/r/206856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d8e4eddc308260f8e2fd488cf84dcf82da3734a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deployment group for trebuchet - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/209045 Change subject: Deployment group for trebuchet .. Deployment group for trebuchet Bug: T97775 Change-Id: I4486fd5e69a4cbca1a02817f59a12546ad6c9e4b --- M modules/deployment/files/modules/deploy.py M modules/deployment/manifests/deployment_server.pp 2 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/209045/1 diff --git a/modules/deployment/files/modules/deploy.py b/modules/deployment/files/modules/deploy.py index 932c821..8990931 100644 --- a/modules/deployment/files/modules/deploy.py +++ b/modules/deployment/files/modules/deploy.py @@ -167,6 +167,7 @@ if not is_deployment_server: return ret_status deploy_user = __grains__.get('deployment_repo_user') +deploy_group = __grains__.get('deployment_repo_group') repo_config = __pillar__.get('repo_config') for repo in repo_config: config = get_config(repo) @@ -251,6 +252,18 @@ runas=deploy_user, umask=002) if status != 0: ret_status = 1 +continue + +# If deploy group was specified, ensure group +if deploy_group is not None: +cmd = 'chown -R %s:%s %s' % (deploy_user, + deploy_group, + config['location']) +status = __salt__['cmd.retcode'](cmd, + cwd=config['location']) +if status != 0: +ret_status = 1 + return ret_status diff --git a/modules/deployment/manifests/deployment_server.pp b/modules/deployment/manifests/deployment_server.pp index 25737ec..c30ce93 100644 --- a/modules/deployment/manifests/deployment_server.pp +++ b/modules/deployment/manifests/deployment_server.pp @@ -71,6 +71,12 @@ replace = true, } +salt::grain { 'deployment_repo_group': +grain = 'deployment_repo_group', +value = $deployer_groups[0], +replace = true, +} + exec { 'deployment_server_sync_all': refreshonly = true, path= ['/usr/bin'], -- To view, visit https://gerrit.wikimedia.org/r/209045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4486fd5e69a4cbca1a02817f59a12546ad6c9e4b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add script from jenkins beta-update-databases - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/210618 Change subject: Add script from jenkins beta-update-databases .. Add script from jenkins beta-update-databases Change-Id: Ie063022b7b4bfc7fa4e1dac2fd15f32bf3a02d3d Bugs: T96199, T98342 --- A modules/beta/files/wmf-beta-update-databases.py M modules/beta/manifests/autoupdater.pp 2 files changed, 64 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/210618/1 diff --git a/modules/beta/files/wmf-beta-update-databases.py b/modules/beta/files/wmf-beta-update-databases.py new file mode 100755 index 000..e6b83c6 --- /dev/null +++ b/modules/beta/files/wmf-beta-update-databases.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +### +# WARNING: this file is managed by Puppet +# puppet:///modules/beta/wmf-beta-update-databases.py +### + + +Updates update.php on all dbs listed in all-labs.dblist + +import os +import sys +import errno +import multiprocessing +import subprocess + +import time + +def get_staging_dir(): +return os.getenv(MEDIAWIKI_STAGING_DIR, /srv/mediawiki-staging) + +def do_wait(procs): + +wait for command in procs array to execute, dump their output + +for p, f, cmd in procs: +if p.wait() 0: +raise Exception(command: , cmd, output: , f.read()) +f.seek(0) +print f.read().strip() +f.close() + +def run_updates(staging, cores): + +run update.php on each wiki found in all-labs.dblist + +procs = [] +with open(staging, 'r') as dblist: +for db in dblist: +db = db.strip() +f = os.tmpfile() +cmd = '/usr/local/bin/mwscript update.php --wiki=%s --quick' % db +p = subprocess.Popen(cmd, stdout=f, stderr=f, shell=True) +procs.append((p, f, cmd)) +if (len(procs) = cores): +do_wait(procs) +procs = [] + +def main(): +staging = os.path.join(get_staging_dir(), 'all-labs.dblist') +if not os.path.exists(staging): +raise IOError(errno.ENOENT, 'Labs dblist not found', staging) + +cores = max(multiprocessing.cpu_count() / 2, 1) +run_updates(staging, cores) + +if __name__ == '__main__': +sys.exit(main()) diff --git a/modules/beta/manifests/autoupdater.pp b/modules/beta/manifests/autoupdater.pp index 3ca9821..9990b7c 100644 --- a/modules/beta/manifests/autoupdater.pp +++ b/modules/beta/manifests/autoupdater.pp @@ -30,6 +30,13 @@ content = template('beta/wmf-beta-mwconfig-update.erb'), } +file { '/usr/local/bin/wmf-beta-update-databases.py': +owner = 'root', +group = 'root', +mode = '0555', +source = 'puppet:///modules/beta/wmf-beta-update-databases.py', +} + git::clone { 'mediawiki/core': directory = ${stage_dir}/php-master, branch= 'master', -- To view, visit https://gerrit.wikimedia.org/r/210618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie063022b7b4bfc7fa4e1dac2fd15f32bf3a02d3d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change beta-update-databases to python script - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/210619 Change subject: Change beta-update-databases to python script .. Change beta-update-databases to python script Should be merged after the puppet repo change addint the script (Ie063022b7b4bfc7fa4e1dac2fd15f32bf3a02d3d) Bug: T96199 Bug: T98342 Change-Id: Ida843ac40009150c9398caeef1061c81f667aa0f --- M jjb/beta.yaml 1 file changed, 4 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/19/210619/1 diff --git a/jjb/beta.yaml b/jjb/beta.yaml index 7e3603a..8160a7c 100644 --- a/jjb/beta.yaml +++ b/jjb/beta.yaml @@ -60,66 +60,16 @@ # Job to run MediaWiki update.php script on all the beta wikis. # -# It is a matrix job which is a very nice feature in Jenkins to have a job run -# with different input parameters. It is current drawback is that the list of -# databases is hardcoded in the Jenkins job (ie below) when it should really be -# generated out of the current list of database (which is all-labs.dblist in -# the repository operations/mediawiki-config.git). FIXME We should workaround -# this by having an integration test that would make sure boths repositories -# are in sync. - job-template: name: beta-update-databases-{datacenter} defaults: beta node: deployment-bastion-{datacenter} -project-type: matrix - -axes: - - axis: -type: label-expression -name: label -values: - - deployment-bastion-{datacenter} - - axis: -type: user-defined -name: wikidb -values: - - aawiki - - arwiki - - cawiki - - commonswiki - - deploymentwiki - - dewiki - - ee_prototypewiki - - enwiki - - en_rtlwiki - - enwikibooks - - enwikinews - - enwikiquote - - enwikisource - - enwikiversity - - enwiktionary - - eowiki - - eswiki - - fawiki - - hewiki - - hiwiki - - jawiki - - kowiki - - loginwiki - - metawiki - - ruwiki - - simplewiki - - sqwiki - - testwiki - - ukwiki - - wikidatawiki - - zhwiki - -# The 'wikidb' axis defined above is exported by Jenkins as an -# environnement variable. Makes it trivial to run on all databases. builders: - - shell: mwscript update.php --wiki=$wikidb --quick + - global-setup + - shell: | + . /srv/deployment/integration/slave-scripts/bin/global-set-env.sh + /usr/local/bin/wmf-beta-update-databases.py publishers: - beta-irc -- To view, visit https://gerrit.wikimedia.org/r/210619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida843ac40009150c9398caeef1061c81f667aa0f Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add submodules to master checkoutMediaWiki - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/204080 Change subject: Add submodules to master checkoutMediaWiki .. Add submodules to master checkoutMediaWiki Builds on the ideas in I0a206a8b5c4beabcbd161fbabebf223f5bd104d2 adds additional necessary repos. Bug: T88442 Change-Id: I76ea0b71df6bfd89344b977660fa7e839602e7d7 --- M multiversion/checkoutMediaWiki.php 1 file changed, 61 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/80/204080/1 diff --git a/multiversion/checkoutMediaWiki.php b/multiversion/checkoutMediaWiki.php index d225ac4..1455a89 100644 --- a/multiversion/checkoutMediaWiki.php +++ b/multiversion/checkoutMediaWiki.php @@ -65,6 +65,67 @@ print Error checking out branch\n; exit( 1 ); } + + # master has no extensions, vendor, or skins in submodules + if ($checkoutVersion === 'master') { + $gerrit = 'https://gerrit.wikimedia.org'; + + $repos = array( + 'extensions'= 'r/p/mediawiki/extensions', + 'vendor'= 'r/mediawiki/vendor.git', + 'skins/CologneBlue' = 'r/mediawiki/skins/CologneBlue', + 'skins/Modern' = 'r/mediawiki/skins/Modern', + 'skins/MonoBook'= 'r/mediawiki/skins/MonoBook', + 'skins/Vector' = 'r/mediawiki/skins/Vector', + ); + + foreach($repos as $dir = $upstream) { + $rawPath = ${destIP}/${dir}; + + list($path, $upstream) = array_map( + 'escapeshellarg', + array( + $rawPath, + ${gerrit}/${upstream}, + ) + ); + + if (file_exists( $rawPath )) { + chdir( $rawPath ); + + $cmds = array( + 'git init', + git remote add origin ${upstream}, + 'git fetch', + 'git checkout -f -t origin/master', + ); + + } else { + $cmds = array( + git clone ${upstream} ${path}, + ); + } + + foreach ($cmds as $cmd) { + passthru( $cmd, $ret ); + + if ( $ret ) { + print '${cmd}' failed in ${path}\n; + exit(1); + } + } + + chdir( $rawPath ); + passthru( 'git submodule update --init --recursive' , $ret ); + + if ( $ret ) { + print Submodule update failed in ${dir}\n; + exit(1); + } + chdir( $destIP ); + } + } + passthru( 'git submodule update --init --recursive', $ret ); if ( $ret ) { print Error updating submodules\n; -- To view, visit https://gerrit.wikimedia.org/r/204080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76ea0b71df6bfd89344b977660fa7e839602e7d7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wrap lvs class in has_lvs hiera variable - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/202611 Change subject: Wrap lvs class in has_lvs hiera variable .. Wrap lvs class in has_lvs hiera variable Change-Id: Ie0327e1fbe5504e9cbeaa857b80304cd2d683e1d --- M manifests/role/rcstream.pp 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/202611/1 diff --git a/manifests/role/rcstream.pp b/manifests/role/rcstream.pp index 3072f5a..e009a2d 100644 --- a/manifests/role/rcstream.pp +++ b/manifests/role/rcstream.pp @@ -7,7 +7,6 @@ # a convenience layer over the WebSockets protocol. # class role::rcstream { -include lvs::configuration include standard if $::realm == 'production' { include admin @@ -42,8 +41,11 @@ backends = $backends, } -class { 'lvs::realserver': -realserver_ips = $lvs::configuration::lvs_service_ips[$::realm]['stream'][$::site], +if hiera('has_lvs', true) { +include lvs::configuration +class { 'lvs::realserver': +realserver_ips = $lvs::configuration::lvs_service_ips[$::realm]['stream'][$::site], +} } nrpe::monitor_service { 'rcstream_backend': -- To view, visit https://gerrit.wikimedia.org/r/202611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0327e1fbe5504e9cbeaa857b80304cd2d683e1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow for new labs domain schema in ENC - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/202790 Change subject: Allow for new labs domain schema in ENC .. Allow for new labs domain schema in ENC Change-Id: I3282acb02d269841f3286a053cbc3b5193235e36 --- M modules/puppetmaster/files/ldap-yaml-enc.py 1 file changed, 26 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/202790/1 diff --git a/modules/puppetmaster/files/ldap-yaml-enc.py b/modules/puppetmaster/files/ldap-yaml-enc.py index 2291dee..9f6adc7 100644 --- a/modules/puppetmaster/files/ldap-yaml-enc.py +++ b/modules/puppetmaster/files/ldap-yaml-enc.py @@ -56,6 +56,30 @@ return int(value) return value +def _is_valid_hostname(name): + +Check that hostname is of the form host.eqiad.wmflabs or +host.project.eqiad.wmflabs + +where host and project are alphanumeric with '-' and '_' allowed + +host_parts = name.split('.')[::-1] + +if len(host_parts) 4 or len(host_parts) 3: +return False + +domain = host_parts.pop(0) +realm = host_parts.pop(0) + +if domain != 'wmflabs' or realm != 'eqiad': +return False + +hostname = [x.replace('-', '').replace('_', '') for x in host_parts] + +if len([s for s in hostname if not s.isalnum()]) 0: +return False + +return True if __name__ == '__main__': with open('/etc/wmflabs-project') as f: @@ -74,10 +98,10 @@ # check to make sure ec2id_name is an actual ec2id based hostname, to prevent # ldap injection attacks -if not re.match(r'^[a-zA-Z0-9_-]+\.eqiad\.wmflabs$', ec2id_name): +if not _is_valid_hostname(ec2id_name): print 'Invalid hostname', ec2id_name sys.exit(-1) -query = 'dc=%s' % (ec2id_name) +query = '((objectclass=puppetClient)(associatedDomain=%s))' % (ec2id_name) base = 'ou=hosts,dc=wikimedia,dc=org' result = ldapConn.search_s(base, ldap.SCOPE_SUBTREE, query) if result: -- To view, visit https://gerrit.wikimedia.org/r/202790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3282acb02d269841f3286a053cbc3b5193235e36 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make varnish template compatible with labs - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/219502 Change subject: Make varnish template compatible with labs .. Make varnish template compatible with labs There is only one backend for deployment-prep currently so when it encounters this equation it tries to take log10(0) and breaks. Bug: T102570 Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/219502/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index f305691..a4c8a1c 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -33,7 +33,11 @@ # weight*num_backends. # Blame _joe_ for the math! :) def chash_def_retries(p, n) - return ((Math.log10(100 - p) - 2) / (Math.log10(n - 1) - Math.log10(n))).ceil + x = n - 1 + if (x = 0) + return n + end + return ((Math.log10(100 - p) - 2) / (Math.log10(x) - Math.log10(n))).ceil end -% -- To view, visit https://gerrit.wikimedia.org/r/219502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wrap varnishkafka ganglia monitor with has_ganglia - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/219775 Change subject: Wrap varnishkafka ganglia monitor with has_ganglia .. Wrap varnishkafka ganglia monitor with has_ganglia Since the varnishkafka ganglia module sensibly requires Package['ganglia-monitor'], and since only production includes ganglia in the standard class, wrap varnishkafka ganglia monitor with has_ganglia hiera variable. Change-Id: I1f4dcb5be79dfbfdfd495ef9348aea7fb0a0494f --- M modules/role/manifests/cache/kafka/statsv.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/219775/1 diff --git a/modules/role/manifests/cache/kafka/statsv.pp b/modules/role/manifests/cache/kafka/statsv.pp index cc4075b..ab26689 100644 --- a/modules/role/manifests/cache/kafka/statsv.pp +++ b/modules/role/manifests/cache/kafka/statsv.pp @@ -29,5 +29,7 @@ topic_request_required_acks = '2', } -varnishkafka::monitor { 'statsv': } +if hiera('has_ganglia', true) { +varnishkafka::monitor { 'statsv': } +} } -- To view, visit https://gerrit.wikimedia.org/r/219775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f4dcb5be79dfbfdfd495ef9348aea7fb0a0494f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Merge Enable browse prototype on test- and enwiki - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/220487 Change subject: Revert Merge Enable browse prototype on test- and enwiki .. Revert Merge Enable browse prototype on test- and enwiki This reverts commit 08d8d6fb168e0947ba835f308325a2c96296b226, reversing changes made to 506e8253c79823129060d56a11366c9c7831f777. Change-Id: If863e8994f1ba12f769efb962644f80d38603e55 --- M wmf-config/InitialiseSettings.php M wmf-config/mobile.php 2 files changed, 0 insertions(+), 531 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/87/220487/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 62933a7..178e3f8 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13272,14 +13272,6 @@ 'kowiki' = false, // T94388 ), -// Enable browse prototype T101155 -'wmgMFIsBrowseEnabled' = array( - 'default' = false, - 'testwiki' = true, - 'test2wiki' = true, - 'enwiki' = true, -), - 'wgExtraGenderNamespaces' = array( 'default' = array(), 'cswiki' = array( diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 2e24a10..32e159f 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -240,527 +240,4 @@ if ( $wmgUseGather ) { require_once $IP/extensions/Gather/Gather.php; } - - // Enable browse experiment (T101155) - $wgMFIsBrowseEnabled = $wmgMFIsBrowseEnabled; - $wgMFBrowseTags = array(); - - if ( $wgMFIsBrowseEnabled ) { - $wgMFBrowseTags = array( - 'San Francisco landmarks' = array( - 'Alcatraz Island', - 'Golden Gate Bridge', - 'Presidio of San Francisco', - 'Lombard Street (San Francisco)', - 'Golden Gate Park', - 'City Lights Bookstore', - 'Coit Tower', - 'San Francisco cable car system', - 'Palace of Fine Arts', - 'Alamo Square, San Francisco', - 'Fort Point, San Francisco', - 'Grace Cathedral, San Francisco', - 'San Francisco Ferry Building', - 'ATT Park', - 'Yerba Buena Gardens', - 'Castro Theatre', - 'Transamerica Pyramid', - 'San Francisco Museum of Modern Art', - 'Candlestick Park', - 'San Francisco Zoo', - 'Fairmont San Francisco', - 'Fort Mason', - 'Ghirardelli Square', - 'Crissy Field', - 'San Francisco Botanical Garden', - 'Barbary Coast Trail', - 'Duboce Park', - 'Flatiron Building (San Francisco)', - 'Lands End (San Francisco)', - 'San Francisco Mint', - 'Crissy Field', - 'San Francisco Naval Shipyard', - 'Dolores Park', - 'Jack Kerouac Alley', - 'San Francisco Cable Car Museum', - 'Balboa Park, San Francisco', - 'Panhandle (San Francisco)', - 'San Francisco City Hall', - 'Victoria Theatre, San Francisco', - 'Union Square, San Francisco', - 'San Francisco Armory', - 'Mitchell Brothers O\'Farrell Theatre', - 'Seal Rocks (San Francisco, California)', - 'San Francisco–Oakland Bay Bridge', - 'Asian Art Museum of San Francisco', - 'San Francisco Public Library', - 'Levi\'s Plaza', - 'Louise M. Davies Symphony Hall', - 'Moscone Center', - 'San Francisco Federal Building', - ), - 'western Europe' = array( - 'Germany', - 'France', - 'United Kingdom', - 'Italy', - 'Spain', -
[MediaWiki-commits] [Gerrit] Bump OpenStackManager to introduce 'editallhiera' Submodule ... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/218355 Change subject: Bump OpenStackManager to introduce 'editallhiera' Submodule extensions/OpenStackManager 1892c9d..854d162:Introduce 'editallhiera' permission .. Bump OpenStackManager to introduce 'editallhiera' Submodule extensions/OpenStackManager 1892c9d..854d162: Introduce 'editallhiera' permission Change-Id: I56162a11173d144a0167f0bd43327f0d4cd550bd --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/218355/1 diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index 1892c9d..854d162 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit 1892c9da412f5e89d870c69aecb36fe21afa5ca4 +Subproject commit 854d162c8eac12eb615228e7ac016b25fd5bf0c1 -- To view, visit https://gerrit.wikimedia.org/r/218355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56162a11173d144a0167f0bd43327f0d4cd550bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf9 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump OSM Submodule for nova cli tools - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/218705 Change subject: Bump OSM Submodule for nova cli tools .. Bump OSM Submodule for nova cli tools Submodule extensions/OpenStackManager 96cae97..5cce0ea: Remove ldap host-entry creation and deletion from OSM. Use fqdn instead of ecid for ldap host dn Change-Id: Ifd8c22c38866b04d029ec2136109284f16b93b7d --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/218705/1 diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index 96cae97..5cce0ea 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit 96cae97ed10f0d99f158d5f083d19ddca136a5dc +Subproject commit 5cce0eae90715ad76893848754146e2458e34c41 -- To view, visit https://gerrit.wikimedia.org/r/218705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd8c22c38866b04d029ec2136109284f16b93b7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf9 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump OpenStackManager - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/218374 Change subject: Bump OpenStackManager .. Bump OpenStackManager Submodule extensions/OpenStackManager 854d162..96cae97: Refer to $user the correct way Change-Id: I6689fee87fdf7d03dc2bfe6e1ee3d0f0522d12c5 --- M extensions/OpenStackManager 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/218374/1 diff --git a/extensions/OpenStackManager b/extensions/OpenStackManager index 854d162..96cae97 16 --- a/extensions/OpenStackManager +++ b/extensions/OpenStackManager -Subproject commit 854d162c8eac12eb615228e7ac016b25fd5bf0c1 +Subproject commit 96cae97ed10f0d99f158d5f083d19ddca136a5dc -- To view, visit https://gerrit.wikimedia.org/r/218374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6689fee87fdf7d03dc2bfe6e1ee3d0f0522d12c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf9 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial phragile puppet role - change (mediawiki/vagrant)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/213198 Change subject: Initial phragile puppet role .. Initial phragile puppet role Change-Id: I60cf0a60cfefbdc4b63b33660ef0029b354fd376 --- M puppet/hieradata/common.yaml A puppet/modules/role/manifests/phragile.pp A puppet/modules/role/templates/phragile.env.erb 3 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/98/213198/1 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index d8263e1..d961523 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -183,6 +183,9 @@ phabricator::deploy_dir: %{hiera('mwv::services_dir')} phabricator::vhost_name: phabricator.local.wmftest.net +phragile::install_dir: /vagrant/phragile +phragile::debug: true + # We are masterless and have no need to run an agent. puppet::agent::ensure: stopped puppet::agent::enable: false diff --git a/puppet/modules/role/manifests/phragile.pp b/puppet/modules/role/manifests/phragile.pp new file mode 100644 index 000..affad38 --- /dev/null +++ b/puppet/modules/role/manifests/phragile.pp @@ -0,0 +1,31 @@ +# == Class: role::phragile +# Class to setup phragile install +class role::phragile( +$install_dir, +$debug, +) { +include ::role::phabricator + +phabricator::config { 'phabricator.show-prototypes': +value = true, +} + +git::clone { 'https://github.com/wmde/phragile.git': +directory = $install_dir, +remote= 'https://github.com/wmde/phragile.git', +} + +file { ${install_dir}/.env: +source = template('role/phragile.env.erb'), +require = Git::Clone['https://github.com/wmde/phragile.git'], +} + +exec { 'update_phalicity_app_key': +command = (printf 'APP_KEY=' php artisan key:generate) ${install_dir}/.env, +cwd = $install_dir, +unless = grep -q ^APP_KEY ${install_dir}/.env, +require = File[${install_dir}/.env], +} + +php::composer::install { $install_dir: } +} diff --git a/puppet/modules/role/templates/phragile.env.erb b/puppet/modules/role/templates/phragile.env.erb new file mode 100644 index 000..edbe1cb --- /dev/null +++ b/puppet/modules/role/templates/phragile.env.erb @@ -0,0 +1,31 @@ +# This file is managed by puppet +APP_ENV=local +APP_DEBUG=%= @debug % + +DB_HOST=localhost +DB_DATABASE=phragile +DB_USERNAME=root +DB_PASSWORD=%= scope['mysql::root_password'] % + +CACHE_DRIVER=file +SESSION_DRIVER=file + +# Phragile client ID from your Phabricator OAuth server +OAUTH_CLIENT_ID= +# Phragile client secret from your Phabricator OAuth server +OAUTH_CLIENT_SECRET= + +PHABRICATOR_URL=http://%= scope['phabricator::vhost_name'] %%= scope['::port_fragment'] %/ + +# Name of your Phragile Bot user in your Phabricator instance +PHRAGILE_BOT_NAME=Phragile +# Conduit certificate of the Phragile Bot user +PHRAGILE_BOT_CERTIFICATE= + +# Name of your custom field for story points in Maniphest +MANIPHEST_STORY_POINTS_FIELD=std:maniphest:WMDE:story_points + +# The tag PHID that indicates whether a task is in review +REVIEW_TAG_PHID= +# Comma separated names of Phabricator user names that are allowed to create projects on Phragile +PHRAGILE_ADMINS= -- To view, visit https://gerrit.wikimedia.org/r/213198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60cf0a60cfefbdc4b63b33660ef0029b354fd376 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add login error browser test - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/213507 Change subject: Add login error browser test .. Add login error browser test Change-Id: I19a7f708825d5f11859d8ea70db4cdde752df26c --- M tests/browser/features/create_account.feature M tests/browser/features/step_definitions/create_account_steps.rb M tests/browser/features/support/pages/create_account_page.rb 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/213507/1 diff --git a/tests/browser/features/create_account.feature b/tests/browser/features/create_account.feature index 0b4e83a..64a986d 100644 --- a/tests/browser/features/create_account.feature +++ b/tests/browser/features/create_account.feature @@ -10,3 +10,8 @@ | Special:CreateAccount | | Special:UserLogin/signup | | Special:UserLogin?type=signup | + + Scenario: If not username is entered error is displayed +Given I go to Create account page at Special:CreateAccount +When I submit the form +Then an error message is displayed diff --git a/tests/browser/features/step_definitions/create_account_steps.rb b/tests/browser/features/step_definitions/create_account_steps.rb index 03bff66..c8eb54a 100644 --- a/tests/browser/features/step_definitions/create_account_steps.rb +++ b/tests/browser/features/step_definitions/create_account_steps.rb @@ -16,3 +16,13 @@ Then(/^form has Create account button$/) do expect(on(CreateAccountPage).create_account_element).to exist end + +When(/^I submit the form$/) do + #on(CreateAccountPage).create_account_element.click + on(CreateAccountPage).create_account +end + +Then(/^an error message is displayed$/) do + expect(on(CreateAccountPage).error_message_element.class_name).to eq errorbox +end + diff --git a/tests/browser/features/support/pages/create_account_page.rb b/tests/browser/features/support/pages/create_account_page.rb index 98b893a..9aa00cd 100644 --- a/tests/browser/features/support/pages/create_account_page.rb +++ b/tests/browser/features/support/pages/create_account_page.rb @@ -15,4 +15,5 @@ page_url '%=params[:page_title]%' button(:create_account, id: 'wpCreateaccount') + div(:error_message, id: 'mw-createacct-status-area') end -- To view, visit https://gerrit.wikimedia.org/r/213507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19a7f708825d5f11859d8ea70db4cdde752df26c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release notes for MediaWiki 1.25 - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/213537 Change subject: Release notes for MediaWiki 1.25 .. Release notes for MediaWiki 1.25 Change-Id: I28d2fee8e287a62a6597fa3ddcec893bd5b7d159 --- M HISTORY D RELEASE-NOTES-1.25 2 files changed, 546 insertions(+), 578 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/213537/1 diff --git a/HISTORY b/HISTORY index 4cca023..07f0fac 100644 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,551 @@ Change notes from older releases. For current info see RELEASE-NOTES-1.26. +== MediaWiki 1.25 == + +=== Configuration changes in 1.25 === +* $wgPageShowWatchingUsers was removed. +* $wgLocalVirtualHosts has been added to replace $wgConf-localVHosts. +* $wgAntiLockFlags was removed. +* $wgJavaScriptTestConfig was removed. +* Edit tokens returned from User::getEditToken may change on every call. Token + validity must be checked by passing the user-supplied token to + User::matchEditToken rather than by testing for equality with a + newly-generated token. +* (T74951) The UserGetLanguageObject hook may be passed any IContextSource + for its $context parameter. Formerly it was documented as receiving a + RequestContext specifically. +* Profiling was restructured and $wgProfiler now requires an 'output' parameter. + See StartProfiler.sample for details. +* $wgMangleFlashPolicy was added to make MediaWiki's mangling of anything that + might be a flash policy directive configurable. +* ApiOpenSearch now supports XML output. The OpenSearchXml extension should no + longer be used. If extracts and page images are desired, the TextExtracts and + PageImages extensions are required. +* $wgOpenSearchTemplate is deprecated in favor of $wgOpenSearchTemplates. +* Edits are now prepared via AJAX as users type edit summaries. This behavior + can be disabled via $wgAjaxEditStash. +* (T46740) The temporary option $wgIncludejQueryMigrate was removed, along + with the jQuery Migrate library, as indicated when this option was provided in + MediaWiki 1.24. +* ProfilerStandard and ProfilerSimpleTrace were removed. Make sure that any + StartProfiler.php config is updated to reflect this. Xhprof is available + for zend/hhvm. Also, for hhvm, one can consider using its xenon profiler. +* Default value of $wgSVGConverters['rsvg'] now uses the 'rsvg-convert' binary + rather than 'rsvg'. +* Default value of $wgSVGConverters['ImageMagick'] now uses transparent + background with white fallback color, rather than just white background. + * MediaWikiBagOStuff class removed, make sure any object cache config + uses SqlBagOStuff instead. +* The 'daemonized' flag must be set to true in $wgJobTypeConf for any redis + job queues. This means that mediawiki/services/jobrunner service has to + be installed and running for any such queues to work. +* $wgAutopromoteOnce no longer supports the 'view' event. For keeping some + compatibility, any 'view' event triggers will still trigger on 'edit'. +* $wgExtensionDirectory was added for when your extensions directory is somewhere + other than $IP/extensions (as $wgStyleDirectory does with the skins directory). + +=== New features in 1.25 === +* (T64861) Updated plural rules to CLDR 26. Includes incompatible changes + for plural forms in Russian, Prussian, Tagalog, Manx and several languages + that fall back to Russian. +* (T60139) ResourceLoaderFileModule now supports language fallback + for 'languageScripts'. +* Added a new hook, ContentAlterParserOutput, to allow extensions to modify the + parser output for a content object before links update. +* (T37785) Enhanced recent changes and extended watchlist are now default. + Documentation: https://meta.wikimedia.org/wiki/Help:Enhanced_recent_changes + and https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions. +* (T69341) SVG images will no longer be base64-encoded when being embedded + in CSS. This results in slight size increase before gzip compression (due to + percent-encoding), but up to 20% decrease after it. +* Update jStorage to v0.4.12. +* MediaWiki now natively supports page status indicators: icons (or short text + snippets) usually displayed in the top-right corner of the page. They have + been in use on Wikipedia for a long time, implemented using templates and CSS + absolute positioning. + - Basic wikitext syntax: indicator name=foo[[File:Foo.svg|20px]]/indicator + - Usage instructions: https://www.mediawiki.org/wiki/Help:Page_status_indicators + - Adjusting custom skins to support indicators: +https://www.mediawiki.org/wiki/Manual:Skinning#Page_status_indicators +* Edit tokens may now be time-limited: passing a maximum age to + User::matchEditToken will reject any older tokens. +* The debug logging internals have been overhauled, and are now using the + PSR-3 interfaces. +* Update CSSJanus to v1.1.1. +* Update
[MediaWiki-commits] [Gerrit] Pass user to deploy functions - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/233074 Change subject: Pass user to deploy functions .. Pass user to deploy functions Makes minor changes to scap remote tasks where the deploy user isn't set explicitly. Also, passes the previously defined (but unused) batch_size parameter to the ssh command run for the deploy task. Change-Id: I105860d2acbfe25599f97f8846d70ca84ae3653f --- M scap/main.py M scap/tasks.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/74/233074/1 diff --git a/scap/main.py b/scap/main.py index 2b73c23..fb6e37d 100644 --- a/scap/main.py +++ b/scap/main.py @@ -603,7 +603,7 @@ tasks.git_checkout(location, rev, has_submodules, repo_user) if service_name is not None: -tasks.restart_service(service_name) +tasks.restart_service(service_name, user=repo_user) if service_port is not None: tasks.check_port(int(service_port)) @@ -679,7 +679,7 @@ deploy_rev = ssh.Job( hosts=targets, user=self.config['ssh_user']) deploy_rev.command(deploy_local_cmd).progress('deploy_' + repo) -succeeded, failed = deploy_rev.run() +succeeded, failed = deploy_rev.run(batch_size=batch_size) if failed: logger.warning('%d targets had deploy errors', failed) diff --git a/scap/tasks.py b/scap/tasks.py index cc8998a..6a07327 100644 --- a/scap/tasks.py +++ b/scap/tasks.py @@ -598,7 +598,7 @@ Fetch a git repo to a location as a user if utils.is_git_dir(location): -git_remote_set(location, repo) +git_remote_set(location, repo, user=user) with utils.cd(location): cmd = '/usr/bin/git fetch' utils.sudo_check_call(user, cmd) -- To view, visit https://gerrit.wikimedia.org/r/233074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I105860d2acbfe25599f97f8846d70ca84ae3653f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: scap3 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add servicedeploy user; Modifiy keyholder service - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/232843 Change subject: Add servicedeploy user; Modifiy keyholder service .. Add servicedeploy user; Modifiy keyholder service These are changes necessary servicedeploy to work inside beta. servicedeploy user --- Creates a servicedeploy user that will be used to execute remote commands on RESTBase nodes in the RESTBase remote deploy directory (`/srv/deployment/restbase/deploy`). This user is for RESTBase hosts To ensure that this new user has full control over the remote repository (currently deployed via trebuchet) the ownership of the remote directory is modified via a puppet exec. The exec call (as well as deployment via trebuchet) will be removed as the scap3 project progresses. servicedeploy group --- Creates a servicedeploy group which has access to the ssh-agent proxy containing the private key for the servicedeploy user on RESTBase hosts. This group is for tin. Keyholder service modifications --- For mediawiki deploy the current user for remote execution is mwdeploy and the current group for ssh-agent access is wikidev. To make sure that the new deploy user key is available only to servicedeploy group members, a second keyholder agent and proxy pair is necessary. This patch changes the keyholder::agent class to a keyholder::agent resource. NOTE: old keyholder files and sockets should be cleaned: sudo service keyholder-agent stop sudo service keyholder-proxy stop sudo rm /etc/init/keyholder-agent sudo rm /etc/init/keyholder-proxy sudo rm /run/keyholder/proxy.sock sudo rm /run/keyholder/agent.sock Change-Id: I0a1da64658b4a9df4bb57897c890da105dba95d6 --- M hieradata/hosts/tin.yaml M manifests/role/deployment.pp M modules/admin/data/data.yaml M modules/beta/templates/pam-access.conf.erb D modules/keyholder/files/keyholder-agent.conf A modules/keyholder/manifests/agent.pp M modules/keyholder/manifests/init.pp A modules/keyholder/templates/keyholder-agent.conf.erb M modules/keyholder/templates/keyholder-proxy.conf.erb A modules/restbase/manifests/deploy.pp M modules/restbase/manifests/init.pp 11 files changed, 193 insertions(+), 91 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/232843/1 diff --git a/hieradata/hosts/tin.yaml b/hieradata/hosts/tin.yaml index 71b61c0..e7b376e 100644 --- a/hieradata/hosts/tin.yaml +++ b/hieradata/hosts/tin.yaml @@ -5,6 +5,7 @@ - codfw.wmnet admin::groups: - deployment + - servicedeploy - parsoid-admin - ocg-render-admins - wdqs-admins diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index b962df9..75865c1 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -5,10 +5,6 @@ } class role::deployment::server( -# Source of the key, change this if not in production, with hiera. -# lint:ignore:puppet_url_without_modules -$key_source = 'puppet:///private/ssh/tin/mwdeploy_rsa', -# lint:endignore $apache_fqdn = $::fqdn, $deployment_group = 'wikidev', ) { @@ -59,11 +55,8 @@ remote_branch = 'readonly/master' } -class { '::keyholder': trusted_group = $deployment_group, } - -class { '::keyholder::monitoring': } - -keyholder::private_key { 'mwdeploy_rsa': -source = $key_source, -} +include role::deployment::mediawiki +include role::deployment::services file { '/srv/deployment': ensure = directory, @@ -142,6 +135,30 @@ } } +class role::deployment::mediawiki( +$keyholder_user = 'mwdeploy', +$keyholder_group = 'wikidev', +) { +require ::keyholder +require ::keyholder::monitoring + +keyholder::agent{ $keyholder_user: +trusted_group = $keyholder_group, +} +} + +class role::deployment::services ( +$keyholder_user = 'servicedeploy', +$keyholder_group = 'servicedeploy', +) { +require ::keyholder +require ::keyholder::monitoring + +keyholder::agent{ $keyholder_user: +trusted_group = $keyholder_group, +} +} + class role::deployment::test { package { 'test/testrepo': provider = 'trebuchet', diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index d08cf5b..324fbaa 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -364,6 +364,12 @@ gid: 760 description: users who can login on fluorine and read mediawiki logs members: [tjones] + servicedeploy: +gid: 761 +description: Service deploy users +members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, dduvall] +privileges: [] + users: rush: ensure: present diff --git a/modules/beta/templates/pam-access.conf.erb b/modules/beta/templates/pam-access.conf.erb index a46decb..78d1ed6 100644 --- a/modules/beta/templates/pam-access.conf.erb +++
[MediaWiki-commits] [Gerrit] Bump wikidata to wmf/1.26wmf12 - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/221895 Change subject: Bump wikidata to wmf/1.26wmf12 .. Bump wikidata to wmf/1.26wmf12 Changed while I was cutting branch, made this patch to update https://gerrit.wikimedia.org/r/#/c/221795/1 Submodule extensions/Wikidata 8cd83a3..de91a1a: Update Wikibase to fix the SearchEntities api New deployment branch - wmf/1.26wmf12 Change-Id: I7bce3953487f6e2824a01524da54aa77d00bf2f8 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/95/221895/1 diff --git a/extensions/Wikidata b/extensions/Wikidata index 8cd83a3..de91a1a 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit 8cd83a390f93e8d2b1407b618264df69aa4928d7 +Subproject commit de91a1a984116283b4cc834e8cbdd4e4591fa7a1 -- To view, visit https://gerrit.wikimedia.org/r/221895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bce3953487f6e2824a01524da54aa77d00bf2f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf12 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group0 to php-1.26wmf12 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/221954 Change subject: group0 to php-1.26wmf12 .. group0 to php-1.26wmf12 Change-Id: I06722bfc1ed14798c3bbc4bbb0e3cf0edd4e7374 --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/54/221954/1 diff --git a/wikiversions.json b/wikiversions.json index 086a5f1..a420235 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Add 1.26wmf12 symlinks - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/221953 Change subject: Add 1.26wmf12 symlinks .. Add 1.26wmf12 symlinks Change-Id: I81dc974a8c2c5b1ed5ee5a1ff4b3f96fc8f58938 --- A docroot/bits/static/1.26wmf12/extensions A docroot/bits/static/1.26wmf12/resources A docroot/bits/static/1.26wmf12/skins A w/static/1.26wmf12/extensions A w/static/1.26wmf12/resources A w/static/1.26wmf12/skins 6 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/53/221953/1 diff --git a/docroot/bits/static/1.26wmf12/extensions b/docroot/bits/static/1.26wmf12/extensions new file mode 12 index 000..947ee23 --- /dev/null +++ b/docroot/bits/static/1.26wmf12/extensions @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/extensions \ No newline at end of file diff --git a/docroot/bits/static/1.26wmf12/resources b/docroot/bits/static/1.26wmf12/resources new file mode 12 index 000..9c97f64 --- /dev/null +++ b/docroot/bits/static/1.26wmf12/resources @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/resources \ No newline at end of file diff --git a/docroot/bits/static/1.26wmf12/skins b/docroot/bits/static/1.26wmf12/skins new file mode 12 index 000..5b33588 --- /dev/null +++ b/docroot/bits/static/1.26wmf12/skins @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/skins/ \ No newline at end of file diff --git a/w/static/1.26wmf12/extensions b/w/static/1.26wmf12/extensions new file mode 12 index 000..947ee23 --- /dev/null +++ b/w/static/1.26wmf12/extensions @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/extensions \ No newline at end of file diff --git a/w/static/1.26wmf12/resources b/w/static/1.26wmf12/resources new file mode 12 index 000..9c97f64 --- /dev/null +++ b/w/static/1.26wmf12/resources @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/resources \ No newline at end of file diff --git a/w/static/1.26wmf12/skins b/w/static/1.26wmf12/skins new file mode 12 index 000..5d33629 --- /dev/null +++ b/w/static/1.26wmf12/skins @@ -0,0 +1 @@ +/srv/mediawiki/php-1.26wmf12/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/221953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81dc974a8c2c5b1ed5ee5a1ff4b3f96fc8f58938 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add redis nutcracker group for beta - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/227770 Change subject: Add redis nutcracker group for beta .. Add redis nutcracker group for beta This change is already present on Wikitech's hiera:deployment-prep page. Moving configuration here since it seems like the place for long-stading hiera changes. Bug: T107288 Change-Id: Iefcecb70fd3e0b612cbc96711d7f4f51112ea429 --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/70/227770/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 7856648..0879893 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -75,6 +75,9 @@ mediawiki_memcached_servers: - 10.68.16.14:11211:1 - 10.68.16.15:11211:1 +mediawiki_session_redis_servers: +- 10.68.16.177:6379:1 +- 10.68.16.231:6379:1 varnish::packages::version: latest keyholder::trusted_group: wikidev base::environment::core_dump_pattern: '/data/project/cores/%{::instancename}-core.%h.%e.%p.%t' -- To view, visit https://gerrit.wikimedia.org/r/227770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefcecb70fd3e0b612cbc96711d7f4f51112ea429 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump Math extension submodule Submodule extensions/Math 9abd... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/225062 Change subject: Bump Math extension submodule Submodule extensions/Math 9abd1ab..2514a88:Fix: Undefined variable passed to hook .. Bump Math extension submodule Submodule extensions/Math 9abd1ab..2514a88: Fix: Undefined variable passed to hook Change-Id: I225a050ef5718f689a6cc8ebb422ff910d20de77 --- M extensions/Math 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/225062/1 diff --git a/extensions/Math b/extensions/Math index 9abd1ab..2514a88 16 --- a/extensions/Math +++ b/extensions/Math -Subproject commit 9abd1abd70fb0410eb107032b7dcebd03908ce68 +Subproject commit 2514a882b1b5f02c7b5dff3bc66b06617c9f7086 -- To view, visit https://gerrit.wikimedia.org/r/225062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I225a050ef5718f689a6cc8ebb422ff910d20de77 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf14 Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix /static 404s in beta - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/224511 Change subject: Fix /static 404s in beta .. Fix /static 404s in beta Since there is no www.wikimedia.org host in beta cluster, when the text-frontend cache sends a request to that host using the text-backend ip and port the result is a 404; however if you use a valid beta host the static directory works as expected. Bug: T105541 Change-Id: I7ad956fbe1f9f7c7fe524a2fa12efd164952f4ab --- M hieradata/labs.yaml M modules/role/manifests/cache/configuration.pp M templates/varnish/text-frontend.inc.vcl.erb 3 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/224511/1 diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index 46d34a1..9b2105d 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -44,6 +44,7 @@ role::cache::bits::bits_domain: 'bits.beta.wmflabs.org' role::cache::bits::top_domain: 'beta.wmflabs.org' role::cache::mobile::zero_site: 'http://zero.wikimedia.beta.wmflabs.org' +role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org' zookeeper_hosts: ${::fqdn}: 1 nrpe::allowed_hosts: '10.68.16.195' diff --git a/modules/role/manifests/cache/configuration.pp b/modules/role/manifests/cache/configuration.pp index 639a5c7..536f71c 100644 --- a/modules/role/manifests/cache/configuration.pp +++ b/modules/role/manifests/cache/configuration.pp @@ -2,6 +2,7 @@ include lvs::configuration $has_ganglia = hiera('has_ganglia', true) +$static_host = hiera('role::cache::text::static_host', 'www.wikimedia.org') $backends = { 'production' = { diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index be3e047..a1e3dcf 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -87,7 +87,7 @@ call mobile_redirect; # normalize all /static to the same hostname for caching - if (req.url ~ ^/static/) { set req.http.host = www.wikimedia.org; } + if (req.url ~ ^/static/) { set req.http.host = %= scope['role::cache::configuration::static_host'] %; } if (req.http.host ~ ^test\.) { set req.http.X-Wikimedia-Debug = 1; -- To view, visit https://gerrit.wikimedia.org/r/224511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ad956fbe1f9f7c7fe524a2fa12efd164952f4ab Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove urlencode from phabricator links - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/248049 Change subject: Remove urlencode from phabricator links .. Remove urlencode from phabricator links Change-Id: Id29b88fb89a0e50c799afdd9fa2c4ec27a660542 --- M docroot/noc/conf/highlight.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/49/248049/1 diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php index ceed34b..6b48b3c 100644 --- a/docroot/noc/conf/highlight.php +++ b/docroot/noc/conf/highlight.php @@ -95,8 +95,8 @@ if ( $selectedFilePath !== false ) : ?> ( -https://phabricator.wikimedia.org/diffusion/OMWC/history/master/">version control -https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/?blame=1">blame +https://phabricator.wikimedia.org/diffusion/OMWC/history/master/">version control +https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/?blame=1">blame raw text ) https://gerrit.wikimedia.org/r/248049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id29b88fb89a0e50c799afdd9fa2c4ec27a660542 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RESTBase configuration for scap3 deployment - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/252887 Change subject: RESTBase configuration for scap3 deployment .. RESTBase configuration for scap3 deployment Creates a RESTBase config class to allow configuration ownership to vary based on deployment method. Introduces the `$deployment` class parameter to the main `restbase` class. That parameter is used to determine: - Ownership of configuration files (via `restbase::config`) - Installation of scap (and dependencies on the scap target) - Creation and ownership of the `/srv/deployment/restbase/{deploy,deploy-cache}` directories Change-Id: I0e5b2a76edb45b0f21c42cd3ef2328307f0436dd --- M hieradata/labs/deployment-prep/common.yaml M hieradata/role/common/aqs.yaml A modules/restbase/manifests/config.pp D modules/restbase/manifests/deploy.pp A modules/restbase/manifests/deploy/scap.pp A modules/restbase/manifests/deploy/trebuchet.pp M modules/restbase/manifests/init.pp 7 files changed, 122 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/252887/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 0235c45..719091b 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -65,7 +65,7 @@ restbase::seeds: - 10.68.17.227 - 10.68.17.189 -restbase::config_template: restbase/config.labs.yaml.erb +restbase::config::config_template: restbase/config.labs.yaml.erb restbase::parsoid_uri: http://deployment-parsoid05.deployment-prep.eqiad.wmflabs:8000 restbase::statsd_host: labmon1001.eqiad.wmnet restbase::logstash_host: deployment-logstash2.deployment-prep.eqiad.wmflabs diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml index fe4d05a..d16117e 100644 --- a/hieradata/role/common/aqs.yaml +++ b/hieradata/role/common/aqs.yaml @@ -39,7 +39,7 @@ - aqs1001.eqiad.wmnet - aqs1002.eqiad.wmnet - aqs1003.eqiad.wmnet -restbase::config_template: restbase/config.aqs.yaml.erb +restbase::config::config_template: restbase/config.aqs.yaml.erb restbase::logstash_host: logstash1001.eqiad.wmnet restbase::cassandra_defaultConsistency: localQuorum restbase::cassandra_localDc: "%{::site}" diff --git a/modules/restbase/manifests/config.pp b/modules/restbase/manifests/config.pp new file mode 100644 index 000..e99864d --- /dev/null +++ b/modules/restbase/manifests/config.pp @@ -0,0 +1,35 @@ +#= Class restbase::config +# +# Add configuration files for restbase +# +# === Parameters +# +# [*owner*] +# User that should own the configuration directory +# [*group*] +# Group that should own the configuration directory +# [*config_template*] +# File to use as the configuration file template. +# Default: restbase/config.yaml.erb + +class restbase::config ( +$owner = 'root', +$group = 'root', +$config_template = 'restbase/config.yaml.erb', +) { +file { '/etc/restbase': +ensure => directory, +owner => $owner, +group => $group, +mode => '0755', +before => Service['restbase'], +} + +file { '/etc/restbase/config.yaml': +content => template($config_template), +owner => $owner, +group => $group, +mode=> '0444', +tag => 'restbase::config', +} +} diff --git a/modules/restbase/manifests/deploy.pp b/modules/restbase/manifests/deploy.pp deleted file mode 100644 index f5d7d89..000 --- a/modules/restbase/manifests/deploy.pp +++ /dev/null @@ -1,55 +0,0 @@ -# == Class restbase::deploy -# -# Creates user and permissions for deploy user -# on restbase hosts -# -# === Parameters -# -# [*public_key*] -# This is the public_key for the deploy-service user. The private part of this -# key should reside in the private puppet repo for the environment. By default -# this public key is set to the deploy-service user's public key for production -# private puppet—it should be overwritten using hiera in non-production -# environements. - -class restbase::deploy( -$public_key_file = 'puppet:///modules/restbase/servicedeploy_rsa.pub', -) { -$user = 'deploy-service' - -user { $user: -ensure => present, -shell => '/bin/bash', -home => '/var/lib/scap', -system => true, -managehome => true, -} - -ssh::userkey { $user: -source => $public_key_file, -} - -# Using trebuchet provider while scap service deployment is under -# development—chicken and egg things -# -# This should be removed once scap3 is in a final state -package { 'scap/scap': -provider => 'trebuchet', -} - -# Rather than futz with adding new functionality to allow a deployment -# user set per repository in trebuchet, I'm running an exec here -$dir =
[MediaWiki-commits] [Gerrit] Revert "deployment::server: move IPv6 int to role" - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/252732 Change subject: Revert "deployment::server: move IPv6 int to role" .. Revert "deployment::server: move IPv6 int to role" This reverts commit f39aea8daab5d39655c712245c845dcffc965d29. Breaks deployment-bastion puppet in beta cluster. Bug: T118422 Change-Id: Ieb481b7d383ba7779cd07ce7aee3598f900177f4 --- M manifests/site.pp M modules/role/manifests/deployment/server.pp 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/252732/1 diff --git a/manifests/site.pp b/manifests/site.pp index 899aa12..b0db50f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2436,6 +2436,10 @@ # deployment servers node 'tin.eqiad.wmnet', 'mira.codfw.wmnet' { role deployment::server, labsdb::manager + +interface::add_ip6_mapped { 'main': +interface => 'eth0', +} } # titanium hosts archiva.wikimedia.org diff --git a/modules/role/manifests/deployment/server.pp b/modules/role/manifests/deployment/server.pp index 8de3210..2b4b4af 100644 --- a/modules/role/manifests/deployment/server.pp +++ b/modules/role/manifests/deployment/server.pp @@ -4,10 +4,6 @@ ) { include standard -interface::add_ip6_mapped { 'main': -interface => 'eth0', -} - # Can't include this while scap is present on the deployment server: # include misc::deployment::scripts include role::deployment::mediawiki -- To view, visit https://gerrit.wikimedia.org/r/252732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb481b7d383ba7779cd07ce7aee3598f900177f4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move scap-specific items out of mediawiki class - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/252362 Change subject: Move scap-specific items out of mediawiki class .. Move scap-specific items out of mediawiki class Remove scap-python dependencies from the mediawiki module. Create a main scap class containing all python dependencies and scap package installation. Add a scap::target class that includes a ferm rule that allows for scap deployments. Bug: T116606 Change-Id: I3ffe759730cc934a9282be91383d9dbd19a6b275 --- M manifests/role/mediawiki.pp M modules/mediawiki/manifests/scap.pp A modules/scap/manifests/init.pp A modules/scap/manifests/target.pp 4 files changed, 35 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/252362/1 diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp index 36c2aae..aa44267 100644 --- a/manifests/role/mediawiki.pp +++ b/manifests/role/mediawiki.pp @@ -82,12 +82,6 @@ port=> 'http', } -# allow ssh from deployment hosts -ferm::rule { 'deployment-ssh': -ensure => present, -rule => 'proto tcp dport ssh saddr $DEPLOYMENT_HOSTS ACCEPT;', -} - # If a service check happens to run while we are performing a # graceful restart of Apache, we want to try again before declaring # defeat. See T103008. diff --git a/modules/mediawiki/manifests/scap.pp b/modules/mediawiki/manifests/scap.pp index 7a90e8c..99f09a4 100644 --- a/modules/mediawiki/manifests/scap.pp +++ b/modules/mediawiki/manifests/scap.pp @@ -7,24 +7,14 @@ # contains a copy of MediaWiki. # class mediawiki::scap { +include ::scap +include ::scap::target include ::mediawiki::users $mediawiki_deployment_dir = '/srv/mediawiki' $mediawiki_staging_dir= '/srv/mediawiki-staging' $scap_bin_dir = '/srv/deployment/scap/scap/bin' $mediawiki_web_user = $::mediawiki::users::web - -require_package('python-psutil') -require_package('python-netifaces') - -# 'scap' is the command-line tool we use to push MediaWiki changes -# to the webapp servers. The name stands for 'sync-common-all-php'. - -package { 'scap': -ensure => latest, -provider => 'trebuchet', -} - # /srv/mediawiki is the root path of the MediaWiki deployment tree. diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp new file mode 100644 index 000..8ce9d61 --- /dev/null +++ b/modules/scap/manifests/init.pp @@ -0,0 +1,22 @@ +# == Class scap +# +# Common role for scap masters and targets + +class scap { +# Using trebuchet provider while scap service deployment is under +# development—chicken and egg things +# +# This should be removed once scap3 is in a final state (i.e. packaged +# or deployed via another method) +package { 'scap': +provider => 'trebuchet', +} + +require_package([ +'python-psutil', +'python-netifaces', +'python-yaml', +'python-requests', +'python-jinja2', +]) +} diff --git a/modules/scap/manifests/target.pp b/modules/scap/manifests/target.pp new file mode 100644 index 000..241bfe5 --- /dev/null +++ b/modules/scap/manifests/target.pp @@ -0,0 +1,11 @@ +# = class: scap::master +# +# Sets up a scap target, i.e. any host to which scap will deploy + +class scap::target { +# allow ssh from deployment hosts +ferm::rule { 'deployment-ssh': +ensure => present, +rule => 'proto tcp dport ssh saddr $DEPLOYMENT_HOSTS ACCEPT;', +} +} -- To view, visit https://gerrit.wikimedia.org/r/252362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ffe759730cc934a9282be91383d9dbd19a6b275 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Publish scap docs without $ZUUL_UUID - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/251118 Change subject: Publish scap docs without $ZUUL_UUID .. Publish scap docs without $ZUUL_UUID Creates a new job for `mw-tools-scap-tox-doc-publish` so scap docs can be generated from the canonical repo on diffusion. Replaces the use of the `$ZUUL_UUID` in the doc publish docs with a uuid from `/proc/kernel/random/uuid` Bug: T117770 Change-Id: Ib4753ad493115682d902cf15136199fd2083b8e5 --- M jjb/mediawiki-tools.yaml M jjb/publish.yaml 2 files changed, 41 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/18/251118/1 diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index deb8285..48fd93d 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -5,12 +5,26 @@ docsrc: 'html' docdest: 'mw-tools-releng' -- project: -name: 'mw-tools-scap' -jobs: - - '{name}-tox-doc-publish': -docsrc: 'docs/_build/html' -docdest: 'mw-tools-scap' +# Job that updates scap docs on doc.wikimedia.org hourly +- job: +name: 'mw-tools-scap-tox-doc-publish' +node: contintLabsSlave && UbuntuPrecise +triggers: + - pollscm: + cron: '@hourly' + ignore-post-commit-hooks: True +scm: + - git: + url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap' + branches: +- 'origin/master' + wipe-workspace: true +builders: + - tox: + venv: doc + - doc-publish: + docsrc: 'docs/_build/html' + docdest: 'mw-tools-scap' # Job to run MW-CS patchsets against # mediwiki/core's includes/ directory for easier diff --git a/jjb/publish.yaml b/jjb/publish.yaml index 86dd5b3..0be5cf9 100644 --- a/jjb/publish.yaml +++ b/jjb/publish.yaml @@ -14,8 +14,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {docdest}" - [ $ZUUL_UUID ] - rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://doc.wikimedia.org/{docdest}/; - trigger-builds: @@ -25,6 +26,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/doc WMF_CI_PUB_DEST={docdest} + UUID=${UUID} # Sync files from a Jenkins slave in labs to a central rsync server from which # another job (executing on gallium) can pull in the files and publish them @@ -42,8 +44,9 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {dest}" - [ $ZUUL_UUID ] - rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + UUID=$(cat /proc/sys/kernel/random/uuid) + [ $UUID ] + rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$UUID" echo echo "Publishing to https://integration.wikimedia.org/cover/{dest}/; - trigger-builds: @@ -53,6 +56,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/integration WMF_CI_PUB_DEST=cover/{dest} + UUID=${UUID} # rsync a directory from integration-publisher.eqiad.wmflabs to a website on gallium. # @@ -66,7 +70,7 @@ # * docroot: org/wikimedia/integration # * dest: cover/PROJECT # -# Uses $ZUUL_UUID as a unique identifier. +# Uses $UUID as a unique identifier. - job: name: publish-on-gallium node: gallium @@ -84,17 +88,21 @@ # WILL be auto-created if non-existent. name: 'WMF_CI_PUB_DEST' description: 'Sub directory path under the chosen document root, such as "mediawiki-core/DOC_SUBPATH/js"' + - string: + # Passed from upstream jobs + name: 'UUID' + description: 'Directory on integration-publisher/doc rsync server from which generated documentation is fetched' triggers: - zuul builders: - shell: | set -u - echo "Publishing $ZUUL_PROJECT from labs to prod" - echo "Zuul UUID: $ZUUL_UUID" + echo "Publishing $WMF_CI_PUB_DEST from labs to prod" + echo "UUID: $UUID" echo "..." - [ $ZUUL_UUID ] + [ $UUID ] LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT" if [ ! -d $LOCAL_DOCROOT ]; then echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist, aborting." @@ -102,7 +110,7 @@ fi LOCAL_DEST="$LOCAL_DOCROOT/$WMF_CI_PUB_DEST" mkdir -p "$LOCAL_DEST" - rsync --recursive --delete-after "rsync://10.68.16.255/doc/$ZUUL_UUID"/
[MediaWiki-commits] [Gerrit] Revert "Publish scap docs without $ZUUL_UUID" - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/251160 Change subject: Revert "Publish scap docs without $ZUUL_UUID" .. Revert "Publish scap docs without $ZUUL_UUID" This reverts commit 017288a14b719afd6c5cb7e406bd91e50ac9c979. Change-Id: Ibd53de7639b5f5312495e7507bf016b9e16af66e --- M jjb/mediawiki-tools.yaml M jjb/publish.yaml 2 files changed, 19 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/60/251160/1 diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index dfdceb3..deb8285 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -5,24 +5,12 @@ docsrc: 'html' docdest: 'mw-tools-releng' -# Job that updates scap docs on doc.wikimedia.org hourly -- job: -name: 'mw-tools-scap-tox-doc-publish' -node: contintLabsSlave && UbuntuPrecise -triggers: - - pollscm: '@hourly' -scm: - - git: - url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap' - branches: -- 'origin/master' - wipe-workspace: true -builders: - - tox: - venv: doc - - doc-publish: - docsrc: 'docs/_build/html' - docdest: 'mw-tools-scap' +- project: +name: 'mw-tools-scap' +jobs: + - '{name}-tox-doc-publish': +docsrc: 'docs/_build/html' +docdest: 'mw-tools-scap' # Job to run MW-CS patchsets against # mediwiki/core's includes/ directory for easier diff --git a/jjb/publish.yaml b/jjb/publish.yaml index 3a93f6b..86dd5b3 100644 --- a/jjb/publish.yaml +++ b/jjb/publish.yaml @@ -14,9 +14,8 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {docdest}" - UUID=$(cat /proc/sys/kernel/random/uuid) - [ $UUID ] - rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$UUID" + [ $ZUUL_UUID ] + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" echo echo "Publishing to https://doc.wikimedia.org/{docdest}/; - trigger-builds: @@ -26,7 +25,6 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/doc WMF_CI_PUB_DEST={docdest} - UUID=$UUID # Sync files from a Jenkins slave in labs to a central rsync server from which # another job (executing on gallium) can pull in the files and publish them @@ -44,9 +42,8 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {dest}" - UUID=$(cat /proc/sys/kernel/random/uuid) - [ $UUID ] - rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$UUID" + [ $ZUUL_UUID ] + rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" echo echo "Publishing to https://integration.wikimedia.org/cover/{dest}/; - trigger-builds: @@ -56,7 +53,6 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/integration WMF_CI_PUB_DEST=cover/{dest} - UUID=$UUID # rsync a directory from integration-publisher.eqiad.wmflabs to a website on gallium. # @@ -70,7 +66,7 @@ # * docroot: org/wikimedia/integration # * dest: cover/PROJECT # -# Uses $UUID as a unique identifier. +# Uses $ZUUL_UUID as a unique identifier. - job: name: publish-on-gallium node: gallium @@ -88,21 +84,17 @@ # WILL be auto-created if non-existent. name: 'WMF_CI_PUB_DEST' description: 'Sub directory path under the chosen document root, such as "mediawiki-core/DOC_SUBPATH/js"' - - string: - # Passed from upstream jobs - name: 'UUID' - description: 'Directory on integration-publisher/doc rsync server from which generated documentation is fetched' triggers: - zuul builders: - shell: | set -u - echo "Publishing $WMF_CI_PUB_DEST from labs to prod" - echo "UUID: $UUID" + echo "Publishing $ZUUL_PROJECT from labs to prod" + echo "Zuul UUID: $ZUUL_UUID" echo "..." - [ $UUID ] + [ $ZUUL_UUID ] LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT" if [ ! -d $LOCAL_DOCROOT ]; then echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist, aborting." @@ -110,7 +102,7 @@ fi LOCAL_DEST="$LOCAL_DOCROOT/$WMF_CI_PUB_DEST" mkdir -p "$LOCAL_DEST" - rsync --recursive --delete-after "rsync://10.68.16.255/doc/$UUID"/ "$LOCAL_DEST" + rsync --recursive --delete-after "rsync://10.68.16.255/doc/$ZUUL_UUID"/ "$LOCAL_DEST" LOCAL_VHOST=$(echo $WMF_CI_PUB_DOCROOT | awk -F'/' '{ print $3"."$2"."$1 }') echo @@ -120,18 +112,18 @@
[MediaWiki-commits] [Gerrit] mw-tools-scap doc generation listen for publish - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/250847 Change subject: mw-tools-scap doc generation listen for publish .. mw-tools-scap doc generation listen for publish Change-Id: I9759959c62fd9794e9c5f594cacbcbbf8e9ee872 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/47/250847/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 36170c6..5e3ff35 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2530,7 +2530,7 @@ - tox-jessie gate-and-submit: - tox-jessie -postmerge: +publish: - mw-tools-scap-tox-doc-publish - name: mediawiki/vagrant -- To view, visit https://gerrit.wikimedia.org/r/250847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9759959c62fd9794e9c5f594cacbcbbf8e9ee872 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use $JOB_NAME-$BUILD_NUMBER in place of $ZUUL_UUID - change (integration/config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/251442 Change subject: Use $JOB_NAME-$BUILD_NUMBER in place of $ZUUL_UUID .. Use $JOB_NAME-$BUILD_NUMBER in place of $ZUUL_UUID Removes the need for $ZUUL_UUID as a unique identifier for each python documentation build. Eases the transition to using diffusion and differential for scap. Bug: T117770 Change-Id: I037d2e8dc74b990935fcdda897c28a9627786a14 --- M jjb/mediawiki-tools.yaml M jjb/publish.yaml 2 files changed, 35 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/42/251442/1 diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index deb8285..0e622d7 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -5,12 +5,23 @@ docsrc: 'html' docdest: 'mw-tools-releng' -- project: -name: 'mw-tools-scap' -jobs: - - '{name}-tox-doc-publish': -docsrc: 'docs/_build/html' -docdest: 'mw-tools-scap' +- job: +name: 'mw-tools-scap-tox-doc-publish' +node: contintLabsSlave && UbuntuTrusty +triggers: + - pollscm: '@hourly' +scm: +- git: +url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap' +branches: +- 'origin/master' +wipe-workspace: true +builders: + - tox: + venv: doc + - doc-publish: + docsrc: 'docs/_build/html' + docdest: 'mw-tools-scap' # Job to run MW-CS patchsets against # mediwiki/core's includes/ directory for easier diff --git a/jjb/publish.yaml b/jjb/publish.yaml index 86dd5b3..66daac8 100644 --- a/jjb/publish.yaml +++ b/jjb/publish.yaml @@ -14,8 +14,7 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {docdest}" - [ $ZUUL_UUID ] - rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$JOB_NAME-$BUILD_NUMBER" echo echo "Publishing to https://doc.wikimedia.org/{docdest}/; - trigger-builds: @@ -25,6 +24,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/doc WMF_CI_PUB_DEST={docdest} + PUBLISHER_PATH=$JOB_NAME-$BUILD_NUMBER # Sync files from a Jenkins slave in labs to a central rsync server from which # another job (executing on gallium) can pull in the files and publish them @@ -42,8 +42,7 @@ - shell: | set -u echo "Making sure that destination does not contain unset variables (like DOC_SUBPATH, see zuul/doc_functions.py): {dest}" - [ $ZUUL_UUID ] - rsync --recursive "{src}/" "rsync://10.68.16.255/doc/$ZUUL_UUID" + rsync --recursive "{docsrc}/" "rsync://10.68.16.255/doc/$JOB_NAME-$BUILD_NUMBER" echo echo "Publishing to https://integration.wikimedia.org/cover/{dest}/; - trigger-builds: @@ -53,6 +52,7 @@ predefined-parameters: | WMF_CI_PUB_DOCROOT=org/wikimedia/integration WMF_CI_PUB_DEST=cover/{dest} + PUBLISHER_PATH=$JOB_NAME-$BUILD_NUMBER # rsync a directory from integration-publisher.eqiad.wmflabs to a website on gallium. # @@ -66,35 +66,37 @@ # * docroot: org/wikimedia/integration # * dest: cover/PROJECT # -# Uses $ZUUL_UUID as a unique identifier. +# Uses $PUBLISHER_PATH as a unique identifier. - job: name: publish-on-gallium node: gallium - parameters: - - string: + - string: + # MUST exist on integration-publisher + # Should have been created/passed by upstream job + name: 'PUBLISHER_PATH' + description: 'Unique path under which to publish docs' + - string: # MUST NOT have leading slash. # MUST NOT have trailing slash. # MUST exist on gallium. name: 'WMF_CI_PUB_DOCROOT' description: 'A document root under /srv, such as "org/wikimedia/doc"' - - string: + - string: # MUST NOT have leading slash. # MUST NOT have trailing slash. # WILL be auto-created if non-existent. name: 'WMF_CI_PUB_DEST' description: 'Sub directory path under the chosen document root, such as "mediawiki-core/DOC_SUBPATH/js"' - triggers: - zuul builders: - shell: | set -u - echo "Publishing $ZUUL_PROJECT from labs to prod" - echo "Zuul UUID: $ZUUL_UUID" + echo "Publishing $WMF_CI_PUB_DEST from labs to prod" + echo "Publisher Path: $PUBLISHER_PATH" echo "..." - [ $ZUUL_UUID ] LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT" if [ ! -d $LOCAL_DOCROOT ]; then echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist,
[MediaWiki-commits] [Gerrit] Remove trebuchet user from wikidev group - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/247721 Change subject: Remove trebuchet user from wikidev group .. Remove trebuchet user from wikidev group Since user is subsequently removed from the wikidev group by admin::groupmembers. Bug: T115760 Change-Id: Ia76c63dda9452569002330ce526d39bba7635d55 --- M manifests/role/deployment.pp M modules/deployment/manifests/deployment_server.pp 2 files changed, 12 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/247721/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index 21ce358..6048e6e 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -14,7 +14,7 @@ include role::deployment::services class { 'deployment::deployment_server': -deployer_groups => [$deployment_group], +deployment_group => $deployment_group, } # set umask for wikidev users so that newly-created files are g+w diff --git a/modules/deployment/manifests/deployment_server.pp b/modules/deployment/manifests/deployment_server.pp index 919712a..4c0941a 100644 --- a/modules/deployment/manifests/deployment_server.pp +++ b/modules/deployment/manifests/deployment_server.pp @@ -3,9 +3,12 @@ # Provision a trebuchet deployment server. # # == Parameters: -# - $deployer_groups: Array of unix groups to add to the trebuchet user +# - $deployment_group: Default value for group ownership of any trebuchet- +# deployed repositories # -class deployment::deployment_server($deployer_groups=[]) { +class deployment::deployment_server( +$deployment_group = undef, +) { include ::redis::client::python ensure_packages([ @@ -34,11 +37,10 @@ } file { '/srv/patches': - ensure => 'directory', - owner=> 'root', - group=> $deployer_groups[0], # FIXME: why is this even an array? -# in practice it's always ['wikidev'] - mode => '0775', +ensure => 'directory', +owner => 'root', +group => $deployment_group, +mode => '0775', } if $::realm != 'labs' { @@ -52,9 +54,8 @@ user { 'trebuchet': shell => '/bin/false', home => '/nonexistent', - managehome => true, + managehome => false, gid=> 'trebuchet', - groups => $deployer_groups, system => true, } } @@ -73,7 +74,7 @@ salt::grain { 'deployment_repo_group': grain => 'deployment_repo_group', -value => $deployer_groups[0], +value => $deployment_group, replace => true, } -- To view, visit https://gerrit.wikimedia.org/r/247721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia76c63dda9452569002330ce526d39bba7635d55 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Set $wgUploadNavigationUrl to use uselang=$lang for ... - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/245897 Change subject: Revert "Set $wgUploadNavigationUrl to use uselang=$lang for commonsuploads wikis by default" .. Revert "Set $wgUploadNavigationUrl to use uselang=$lang for commonsuploads wikis by default" This reverts commit 42fd9196c6986a256efdb433de5aa605369dc30e. Change-Id: I121e9fb0ad0ac8ed34cfa05f24074d41a19914e5 --- M wmf-config/InitialiseSettings.php 1 file changed, 18 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/245897/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index e87628e..f3cc3ca 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -1206,21 +1206,8 @@ 'wgUploadNavigationUrl' => array( // Projects 'default' => false, - 'commonsuploads' => "//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=$lang", + 'commonsuploads' => '//commons.wikimedia.org/wiki/Special:UploadWizard', 'wikinews' => '//commons.wikimedia.org/wiki/Special:UploadWizard', - - // These are commonsuploads wikis (not specified below) where $lang does not work - 'betawikiversity' => '//commons.wikimedia.org/wiki/Special:UploadWizard', - 'simplewiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard', - 'simplewiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard', - 'bhwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=bho', - 'crhwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=crh-latn', - 'fiu_vrowiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=vro', - 'roa_rupwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=rup', - 'roa_rupwiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=rup', - 'zh_classicalwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=lzh', - 'zh_min_nanwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nan', - 'zh_min_nanwiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nan', // Individual wikis // NOTE: Use relative paths for same-wiki links so the SSL converter can tweak them correctly @@ -1229,6 +1216,14 @@ 'bgwiki' => '/wiki/MediaWiki:Uploadtext', // T16836 'bnwiki' => '/wiki/উইকিপিডিয়া:আপলোড', 'bswiki' => '/wiki/Wikipedia:Upload', // T14044 + 'ckbwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ckb', + 'cswiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswikibooks' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswikinews' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswikiquote' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswikisource' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswikiversity' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', + 'cswiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs', 'dawiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=da=dk', // T39662 'dewikisource' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=de', 'enwiki' => '/wiki/Wikipedia:File_Upload_Wizard', // T44263 @@ -1239,6 +1234,7 @@ 'eswiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=es', 'eswikibooks' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=es', 'eswikivoyage' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=es', // T44933 + 'eswiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=es', // T9152 'euwiki' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=eu', 'fawiki' => '/wiki/ویکیپدیا:بارگذاری', 'fawikivoyage' => '/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D8%B3%D9%81%D8%B1:%D8%A8%D8%A7%D8%B1%DA%AF%D8%B0%D8%A7%D8%B1%DB%8C', // T102714 @@ -1249,19 +1245,25 @@ 'hiwiki' => '/wiki/विकिपीडिया:अपलोड', 'hrwiki' => '/wiki/Wikipedija:Upload', 'huwikibooks' => false, // T74231 + 'huwiktionary' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=hu', 'incubatorwiki' => '/wiki/Special:MyLanguage/Incubator:Upload', 'iswiki' => '/wiki/Wikipedia:Hlaða_inn_skrá', // T95089 'iswiktionary' => '/wiki/Wikior%C3%B0ab%C3%B3k:Hla%C3%B0a_inn_skr%C3%A1', // T13187 'itwikiquote' => '//commons.wikimedia.org/wiki/Special:UploadWizard', + 'itwikivoyage' => '//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=it', // T75439 'jawiki' =>
[MediaWiki-commits] [Gerrit] Add service deploy via scap - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/224374 Change subject: Add service deploy via scap .. Add service deploy via scap Preliminary rough concept for deploying services via git from scap. The command would looks something like: `deploy rev` run from /srv/deployment/restbase/deploy (or other service directory: like git-deploy now) and would require a `.scaprc` file at the root of the repository being deployed with the following information: [global] git_server: tin.eqiad.wmnet git_repo: restbase/deploy git_deploy_dir: /srv/deployment dsh_targets: restbase-installation [wmflabs] git_server: staging-test-tin.staging.eqiad.wmflabs Change-Id: I542bb9acc0f65360452fb4f0b0c92dec4894e5d8 --- A bin/deploy A bin/deploy-local M scap/__init__.py M scap/config.py M scap/main.py M scap/tasks.py M scap/utils.py 7 files changed, 157 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/74/224374/1 diff --git a/bin/deploy b/bin/deploy new file mode 100755 index 000..e048d76 --- /dev/null +++ b/bin/deploy @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Sync MW source and config to cluster. +# +# Copyright © 2014 Wikimedia Foundation and contributors + +import os +import sys + +# Add scap package to search path +script = os.path.realpath(sys.argv[0]) +scap_src = os.path.dirname(os.path.dirname(script)) +sys.path.append(scap_src) + +import scap +scap.Deploy.run() diff --git a/bin/deploy-local b/bin/deploy-local new file mode 100755 index 000..09e0ac1 --- /dev/null +++ b/bin/deploy-local @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Sync MW source and config to cluster. +# +# Copyright © 2014 Wikimedia Foundation and contributors + +import os +import sys + +# Add scap package to search path +script = os.path.realpath(sys.argv[0]) +scap_src = os.path.dirname(os.path.dirname(script)) +sys.path.append(scap_src) + +import scap +scap.DeployLocal.run() diff --git a/scap/__init__.py b/scap/__init__.py index 84af164..98607eb 100644 --- a/scap/__init__.py +++ b/scap/__init__.py @@ -21,6 +21,8 @@ SyncFile, SyncWikiversions, UpdateL10n, +DeployLocal, +Deploy, ) __all__ = ( @@ -38,6 +40,8 @@ 'SyncFile', 'SyncWikiversions', 'UpdateL10n', +'DeployLocal', +'Deploy', ) any(( @@ -54,4 +58,7 @@ SyncDocroot, SyncFile, SyncWikiversions, -UpdateL10n)) # Ignore unused import warning +UpdateL10n, +DeployLocal, +Deploy +)) # Ignore unused import warning diff --git a/scap/config.py b/scap/config.py index b4a4348..ba32e8d 100644 --- a/scap/config.py +++ b/scap/config.py @@ -30,6 +30,10 @@ 'apache_pid_file': '/var/run/apache2/apache2.pid', 'pybal_interface': 'lo:LVS', 'dsh_targets': 'mediawiki-installation', +'git_deploy_dir': '/srv/deployments', +'git_repo_user': 'mwdeploy', +'git_server': 'tin.eqiad.wmnet', +'git_scheme': 'http', } @@ -68,11 +72,18 @@ parser.readfp(cfg_file) else: -parser.read([ +cfg_paths = [ os.path.join(os.path.dirname(__file__), '..', 'scap.cfg'), '/srv/scap/scap.cfg', '/etc/scap.cfg', -]) +] + +local_cfg = os.path.join(os.getcwd(), .scaprc) + +if os.access(local_cfg, os.R_OK): +cfg_paths += [local_cfg] + +parser.read(cfg_paths) fqdn = socket.getfqdn().split('.') sections = ['global'] diff --git a/scap/main.py b/scap/main.py index 70402b0..f938387 100644 --- a/scap/main.py +++ b/scap/main.py @@ -559,3 +559,67 @@ self.get_stats().increment('deploy.restart') return exit_code + + +class DeployLocal(cli.Application): +Fetch new restbase code from gerrit + +def main(self, *extra_args): +repo = self.config['git_repo'] +repo_user = self.config['git_repo_user'] +server = self.config['git_server'] +rev = self.config['git_rev'] + +location = os.path.normpath({0}/{1}.format(self.config['git_deploy_dir'], repo)) + +if self.config['git_scheme'] == 'git' or self.config['git_scheme'] == 'http': +scheme = 'http' + +url = os.path.normpath('{0}/{1}'.format(server, repo)) +url = {0}://{1}.format(scheme, url) + +# Fetch +tasks.git_fetch(location, url, repo_user) + +# Checkout +tasks.git_co(location, rev, repo_user) + + +class Deploy(cli.Application): + +@cli.argument('rev', help='Revision to deploy') +def main(self, *extra_args): + +in_deploy_dir = os.path.commonprefix([ +os.getcwd(), +self.config['git_deploy_dir'] +]) == self.config['git_deploy_dir'] + +if not in_deploy_dir: +raise IOError(1, +'Your path is not a part of the git deploy
[MediaWiki-commits] [Gerrit] Add config deployment - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/235385 Change subject: Add config deployment .. Add config deployment Adds a section inside the local scap/scap.cfg for configuration files to be deployed, formatted like: [config_files] /path/to/dest_config.file: template: file_in_the_template_dir.yaml.j2 vars_file: /path/to/vars_file.yaml The deploy command renders a json file in a known location on tin that is later fetched by each deploy target. The deploy target loops through the config files and grabs the `template` and renders it using the `vars_file` (which is put into place by puppet on the target and contains puppet private repo information) Current limitations: - Files created are created by the ssh_user specified in the config and therefore must be created in locations to which that user has read access Change-Id: I64aa464039c0471f156795a3042ea44d48c8622a --- A bin/deploy-local-config M scap/__init__.py M scap/config.py M scap/main.py M scap/tasks.py A scap/template.py M scap/utils.py 7 files changed, 227 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/85/235385/1 diff --git a/bin/deploy-local-config b/bin/deploy-local-config new file mode 100755 index 000..f555f4b --- /dev/null +++ b/bin/deploy-local-config @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Deploy service to localhost. +# +# Copyright © 2015 Wikimedia Foundation and contributors + +import os +import sys + +# Add scap package to search path +script = os.path.realpath(sys.argv[0]) +scap_src = os.path.dirname(os.path.dirname(script)) +sys.path.append(scap_src) + +import scap +scap.DeployLocalConfig.run() diff --git a/scap/__init__.py b/scap/__init__.py index 70baa76..4d68bc9 100644 --- a/scap/__init__.py +++ b/scap/__init__.py @@ -9,6 +9,7 @@ from .main import ( CompileWikiversions, DeployLocal, +DeployLocalConfig, Deploy, HHVMGracefulAll, MWVersionsInUse, @@ -28,6 +29,7 @@ __all__ = ( 'CompileWikiversions', 'DeployLocal', +'DeployLocalConfig', 'Deploy', 'HHVMGracefulAll', 'MWVersionsInUse', @@ -47,6 +49,7 @@ any(( CompileWikiversions, DeployLocal, +DeployLocalConfig, Deploy, HHVMGracefulAll, MWVersionsInUse, diff --git a/scap/config.py b/scap/config.py index 3ef9463..340e7bb 100644 --- a/scap/config.py +++ b/scap/config.py @@ -9,6 +9,9 @@ import getpass import os import socket +import yaml + +from . import utils DEFAULT_CONFIG = { @@ -35,6 +38,7 @@ 'git_server': 'tin.eqiad.wmnet', 'git_scheme': 'http', 'git_submodules': False, +'config_deploy': False, } @@ -63,6 +67,8 @@ :param overrides: Dict of configuration values :returns: dict of configuration values """ +local_cfg = os.path.join(os.getcwd(), 'scap') + parser = ConfigParser.SafeConfigParser() if cfg_file: try: @@ -77,7 +83,7 @@ os.path.join(os.path.dirname(__file__), '..', 'scap.cfg'), '/srv/scap/scap.cfg', '/etc/scap.cfg', -os.path.join(os.getcwd(), 'scap.cfg'), +os.path.join(local_cfg, 'scap.cfg'), ]) fqdn = socket.getfqdn().split('.') @@ -95,4 +101,23 @@ if overrides: config.update(overrides) +# Grab the config file +# config file section example: +# [config_files] +# /path/to/dest_config.file: +#template: file_in_the_template_dir.yaml.j2 +#vars_file: /path/to/vars_file.yaml +if parser.has_section('config_files'): +config['config_files'] = [] +for config_file in parser.items('config_files', True): +name = config_file[0] +info = yaml.load(config_file[1]) +template = utils.get_realm_specific_filename( +os.path.join(local_cfg, 'templates', info['template']), +config['wmf_realm'], +config['datacenter'] +) +info['template'] = template +config['config_files'].append({'name': name, 'info': info}) + return config diff --git a/scap/main.py b/scap/main.py index fb6e37d..e6f4f86 100644 --- a/scap/main.py +++ b/scap/main.py @@ -11,12 +11,14 @@ import netifaces import os import psutil +import requests import subprocess from . import cli from . import log from . import ssh from . import tasks +from . import template from . import utils @@ -575,8 +577,51 @@ return exit_code +class DeployLocalConfig(cli.Application): +"""Creates config files +#. Pull config_files.json (generated during deploy on tin) +#. Loop through config files and render template from variables in + final location +""" + +def main(self, *extra_args): +"""Looks only in the scap directory for the repo being
[MediaWiki-commits] [Gerrit] Create ssh-agent-proxy internal permissions - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/233850 Change subject: Create ssh-agent-proxy internal permissions .. Create ssh-agent-proxy internal permissions Patch creates an internal method for permissions rather than using proxy socket group/ownership to determine agent/proxy permissions. This allows ssh-agent-proxy to scale to many keys available in many combinations to many groups without the overhead of many additional sockets. Also, this makes it possible for 2 groups to share a single key. Uses SO_PEERCRED in ssh-agent-proxy to determine the groups to which a requesting user belongs. Uses that group list along with yaml permission files in `/etc/keyholder-auth.d` to determine if a requesting user can use the key that's fingerprint is passed as part of SSH2_AGENTC_SIGN_REQUEST. Change-Id: I41cea32766e82fa3754c21a36da5031d9ecc9572 --- M manifests/role/deployment.pp R modules/keyholder/files/keyholder-proxy.conf M modules/keyholder/files/ssh-agent-proxy A modules/keyholder/manifests/agent.pp M modules/keyholder/manifests/init.pp M modules/scap/manifests/master.pp 6 files changed, 163 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/233850/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index b962df9..d337773 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -5,15 +5,12 @@ } class role::deployment::server( -# Source of the key, change this if not in production, with hiera. -# lint:ignore:puppet_url_without_modules -$key_source = 'puppet:///private/ssh/tin/mwdeploy_rsa', -# lint:endignore $apache_fqdn = $::fqdn, $deployment_group = 'wikidev', ) { # Can't include this while scap is present on tin: # include misc::deployment::scripts +include role::deployment::mediawiki class { 'deployment::deployment_server': deployer_groups = [$deployment_group], @@ -57,12 +54,6 @@ dir = '/srv/mediawiki-staging/', user = 'root', remote_branch = 'readonly/master' -} - -class { '::keyholder': trusted_group = $deployment_group, } - -class { '::keyholder::monitoring': } - -keyholder::private_key { 'mwdeploy_rsa': -source = $key_source, } file { '/srv/deployment': @@ -142,6 +133,20 @@ } } +class role::deployment::mediawiki( +$keyholder_user = 'mwdeploy', +$keyholder_group = 'wikidev', +$key_fingerprint = 'f5:18:a3:44:77:a2:31:23:cb:7b:44:e1:4b:45:27:11', +) { +require ::keyholder +require ::keyholder::monitoring + +keyholder::agent{ $keyholder_user: +trusted_group = $keyholder_group, +key_fingerprint = $key_fingerprint, +} +} + class role::deployment::test { package { 'test/testrepo': provider = 'trebuchet', diff --git a/modules/keyholder/templates/keyholder-proxy.conf.erb b/modules/keyholder/files/keyholder-proxy.conf similarity index 78% rename from modules/keyholder/templates/keyholder-proxy.conf.erb rename to modules/keyholder/files/keyholder-proxy.conf index 5271516..dab6b29 100644 --- a/modules/keyholder/templates/keyholder-proxy.conf.erb +++ b/modules/keyholder/files/keyholder-proxy.conf @@ -10,12 +10,12 @@ stop on stopped keyholder-agent setuid keyholder -setgid %= @trusted_group % +setgid keyholder -umask 007 +umask 111 pre-start exec /bin/rm -f /run/keyholder/proxy.sock -exec /usr/local/bin/ssh-agent-proxy +exec /usr/local/bin/ssh-agent-proxy --bind /run/keyholder/proxy.sock --connect /run/keyholder/agent.sock post-stop exec /bin/rm -f /run/keyholder/proxy.sock # vim: set ft=upstart: diff --git a/modules/keyholder/files/ssh-agent-proxy b/modules/keyholder/files/ssh-agent-proxy index 4b7ab7d..43d3527 100644 --- a/modules/keyholder/files/ssh-agent-proxy +++ b/modules/keyholder/files/ssh-agent-proxy @@ -5,13 +5,16 @@ Creates a UNIX domain socket that proxies connections to an ssh-agent(1) socket, disallowing any operations except listing identities and signing - requests. + requests. Request signing is only permitted if group is allowed to use + the requested public key fingerprint. - usage: ssh-agent-proxy [--bind ADDRESS] [--connect ADDRESS] + usage: ssh-agent-proxy [--bind ADDRESS] [--connect ADDRESS] [--auth-dir DIR] Options: ---bind ADDRESS Bind the proxy to the UNIX domain socket at this address ---connect ADDRESS Proxy connects to the ssh-agent socket at this address +--bind ADDRESSBind the proxy to the UNIX domain socket at this address +--connect ADDRESS Proxy connects to the ssh-agent socket at this address +--auth-dir DIRDirectory where yaml files containing group:[key(s)] + access can be found Copyright 2014 Ori Livneh o...@wikimedia.org @@ -30,7 +33,9 @@ import
[MediaWiki-commits] [Gerrit] Add pattern-matching arg to limit deploy hosts - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/238208 Change subject: Add pattern-matching arg to limit deploy hosts .. Add pattern-matching arg to limit deploy hosts Adds a flag to the deploy command `--limit-hosts` or `-l` that accepts a pattern in one of the following formats: - `~[regex]` - if the pattern starts with ~ it is interpreted as a regular expression, this is not combined with any other option - `![pattern]` - can be combined with any other pattern to negate that pattern. May be combined with other pattern matching options. - `host[01:10]` - range matching, works for ascii chars and numbers, including numbers with a leading 0, may be combined with other pattern-matching options. - `host*` - Matches 0 or more characters in the set A-z, '_', '.', or '-'. May be combined with other pattern matching options. This pattern is applied to the `dsh_targets` file to return a sub-set of hosts to use as a deployment target. Change-Id: I3ec5574c987ac576acc6cf23958542480a63ae66 --- M scap/main.py M scap/utils.py M tests/utils_test.py 3 files changed, 137 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/08/238208/1 diff --git a/scap/main.py b/scap/main.py index fe03aee..c12d64c 100644 --- a/scap/main.py +++ b/scap/main.py @@ -616,6 +616,8 @@ """ @cli.argument('-r', '--rev', default='HEAD', help='Revision to deploy') +@cli.argument('-l', '--limit-hosts', default='all', + help='Limit deploy to hosts matching expression') def main(self, *extra_args): logger = self.get_logger() repo = self.config['git_repo'] @@ -633,7 +635,16 @@ 'Script must be run from deployment repository under {}' .format(deploy_dir)) -targets = utils.read_dsh_hosts_file(self.config['dsh_targets']) +targets = utils.get_target_hosts( +self.arguments.limit_hosts, +utils.read_dsh_hosts_file(self.config['dsh_targets']) +) + +logger.info( +'Deploy will run on the following targets: \n\t- {}'.format( +'\n\t- '.join(targets) +) +) # batch_size not required, don't allow a batch_size > 80 if set batch_size = self.config.get('batch_size', 80) diff --git a/scap/utils.py b/scap/utils.py index 9a65569..78e3746 100644 --- a/scap/utils.py +++ b/scap/utils.py @@ -9,6 +9,7 @@ import errno import fcntl import hashlib +import inspect import json import logging import os @@ -16,10 +17,10 @@ import random import re import socket +import string import struct import subprocess import tempfile -import inspect from . import ansi from datetime import datetime @@ -560,3 +561,75 @@ } return (tag, tag_info) + + +def get_target_hosts(pattern, hosts): +"""Returns a subset of hosts based on wildcards + +if the pattern can specify a range of the format '[start:end]' + +if the supplied pattern begins with ``~`` then it is treated as a +regular expression. + +If the pattern begins with ``!`` then it is negated. +""" +# Return early if there's no special pattern +if pattern == '*' or pattern == 'all': +return hosts + +# If pattern is a regex, handle that and return +if pattern[0] == '~': +regex = re.compile(pattern[1:]) +return [target for target in hosts if regex.match(target)] + +# Handle replacements of anything like [*:*] in pattern +has_range = lambda x: 0 <= x.find('[') < x.find(':') < x.find(']') + +patterns = [] +rpattern = pattern +while(has_range(rpattern)): +head, nrange, tail = rpattern.replace( +'[', '|', 1).replace(']', '|', 1).split('|') + +beg, end = nrange.split(':') +zfill = len(end) if (len(beg) > 0 and beg.startswith('0')) else 0 + +if (zfill != 0 and len(beg) != len(end)) or beg > end: +raise ValueError("Host range incorrectly specified") + +try: +asc = string.ascii_letters +seq = asc[asc.index(beg):asc.index(end) + 1] +except ValueError: # numeric range +seq = range(int(beg), int(end) + 1) + +patterns = [''.join([head, str(i).zfill(zfill), tail]) for i in seq] +rpattern = rpattern[rpattern.find(']') + 1:] + +# If there weren't range replacements, make pattern an array +if len(patterns) == 0: +patterns = [pattern] + +targets = [] +for pattern in patterns: +# remove any leading '!' +test_pattern = pattern.lstrip('!') + +# change '.' to literal period +test_pattern = test_pattern.replace('.', '\.') + +# convert '*' to match a-Z, 0-9, _, -, or . +test_pattern = test_pattern.replace('*', '[\w\.-]*') + +# Add
[MediaWiki-commits] [Gerrit] Add --environment flag to cli.Application - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/238211 Change subject: Add --environment flag to cli.Application .. Add --environment flag to cli.Application Adds an `--environment` or `-e` flag to the main cli.Application. The environment specified by the `-e` flag directs `config.py` to use a specific environment inside the `./scap` directory. An example scap directory layout looks like: scap ├── environments │ └── staging-restbase │ └── scap.cfg └── scap.cfg In the above example calling any scap bin file with the `-e staging-restbase` flag would cause the config under `./scap/environments/staging-restbase` to be used. Change-Id: I706b8365dcfaf616a45fc67de879b7e4d4d92a15 --- M scap/cli.py M scap/config.py M scap/utils.py A tests/env-test/README A tests/env-test/environments/test/README M tests/utils_test.py 6 files changed, 114 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/11/238211/1 diff --git a/scap/cli.py b/scap/cli.py index 241ec3f..c9a14a1 100644 --- a/scap/cli.py +++ b/scap/cli.py @@ -144,6 +144,8 @@ parser.add_argument('--no-shared-authsock', dest='shared_authsock', action='store_false', help='Ignore any shared ssh-auth configuration') +parser.add_argument('-e', '--environment', default=None, + help='environment in which to execute scap') return parser @@ -165,7 +167,11 @@ defines = None if self.arguments.defines: defines = dict(self.arguments.defines) -self.config = config.load(self.arguments.conf_file, defines) +self.config = config.load( +cfg_file=self.arguments.conf_file, +environment=self.arguments.environment, +overrides=defines +) def _setup_loggers(self): """Setup logging.""" diff --git a/scap/config.py b/scap/config.py index 3ef9463..b7a7d81 100644 --- a/scap/config.py +++ b/scap/config.py @@ -10,6 +10,8 @@ import os import socket +from . import utils + DEFAULT_CONFIG = { 'bin_dir': '/srv/deployment/scap/scap/bin', @@ -38,7 +40,7 @@ } -def load(cfg_file=None, overrides=None): +def load(cfg_file=None, environment=None, overrides=None): """Load configuration. A configuration file consists of sections, led by a ``[section]`` header @@ -53,16 +55,27 @@ ``eqiad.wmnet``, ``wmnet`` or ``global``. Sections not present in the configuration file will be ignored. -Configuration values are loaded either from a given file or from the -default locations of ``/../scap.cfg``, -``/srv/scap/scap.cfg`` and ``/etc/scap.cfg``. When the default -configuration files are used and both are found, the vaules in -``/etc/scap.cfg`` will replace any values loaded from earlier files. +Configuration values are loaded from a file specified by the ``-c`` or +``--conf`` command-line options or from the default locations with the +following hierarchy, sorted by override priority: + +#. ``$(pwd)/scap/environments//scap.cfg`` or + ``$(pwd)/scap/scap.cfg`` (if no environment was specified) +#. ``/etc/scap.cfg`` +#. ``/srv/scap/scap.cfg`` +#. ``/../scap.cfg`` + +For example, if a configuration parameter is set in ``/srv/scap/scap.cfg`` +and that same parameter is set in ``/etc/scap.cfg`` the value for that +parameter set in ``/etc/scap.cfg`` will be used during execution. :param cfg_file: Alternate configuration file +:param environment: the string path under which scap.cfg is found :param overrides: Dict of configuration values :returns: dict of configuration values """ +local_cfg = os.path.join(os.getcwd(), 'scap') + parser = ConfigParser.SafeConfigParser() if cfg_file: try: @@ -77,7 +90,10 @@ os.path.join(os.path.dirname(__file__), '..', 'scap.cfg'), '/srv/scap/scap.cfg', '/etc/scap.cfg', -os.path.join(os.getcwd(), 'scap.cfg'), +utils.get_env_specific_filename( +os.path.join(local_cfg, 'scap.cfg'), +environment +) ]) fqdn = socket.getfqdn().split('.') diff --git a/scap/utils.py b/scap/utils.py index 78e3746..1e659be 100644 --- a/scap/utils.py +++ b/scap/utils.py @@ -92,6 +92,22 @@ return get_username() +def get_env_specific_filename(path, env=None): +"""Find a file specific to the environment in which scap is running""" +if env is None: +return path + +base = os.path.dirname(path) +filename = os.path.basename(path) + +env_filename = os.path.join(base, 'environments', env, filename) + +if os.path.isfile(env_filename): +return env_filename + +return path + + def get_realm_specific_filename(filename, realm, datacenter):
[MediaWiki-commits] [Gerrit] Allow full path to hosts file - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/238213 Change subject: Allow full path to hosts file .. Allow full path to hosts file Allow the use of a full path to hosts file to be specified. Makes troubleshooting and development easier. Rename the `utils.read_dsh_hosts_file` to be more-accurate `utils.read_hosts_file` Change-Id: I8b9c54caf8526c01ac014f977c734ca408001bfc --- M scap/main.py M scap/ssh.py M scap/utils.py 3 files changed, 16 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/13/238213/1 diff --git a/scap/main.py b/scap/main.py index c12d64c..6bec135 100644 --- a/scap/main.py +++ b/scap/main.py @@ -80,7 +80,7 @@ def _get_proxy_list(self): """Get list of sync proxy hostnames that should be updated before the rest of the cluster.""" -return utils.read_dsh_hosts_file(self.config['dsh_proxies']) +return utils.read_hosts_file(self.config['dsh_proxies']) def _proxy_sync_command(self): """Synchronization command to run on the proxy hosts.""" @@ -91,7 +91,7 @@ def _get_target_list(self): """Get list of hostnames that should be updated from the proxies.""" -return utils.read_dsh_hosts_file(self.config['dsh_targets']) +return utils.read_hosts_file(self.config['dsh_targets']) def _apache_sync_command(self, proxies): """Synchronization command to run on the apache hosts. @@ -469,7 +469,7 @@ err_msg = 'l10n cache missing for %s' % version utils.check_file_exists(cache_file, err_msg) -mw_install_hosts = utils.read_dsh_hosts_file( +mw_install_hosts = utils.read_hosts_file( self.config['dsh_targets']) tasks.sync_wikiversions(mw_install_hosts, self.config) @@ -557,7 +557,7 @@ exit_code = 0 self.announce('Restarting HHVM: %s', self.arguments.message) -target_hosts = utils.read_dsh_hosts_file(self.config['dsh_targets']) +target_hosts = utils.read_hosts_file(self.config['dsh_targets']) succeeded, failed = tasks.restart_hhvm( target_hosts, self.config, # Use a batch size of 5% of the total target list @@ -637,7 +637,7 @@ targets = utils.get_target_hosts( self.arguments.limit_hosts, -utils.read_dsh_hosts_file(self.config['dsh_targets']) +utils.read_hosts_file(self.config['dsh_targets']) ) logger.info( diff --git a/scap/ssh.py b/scap/ssh.py index e9f4656..e21d688 100644 --- a/scap/ssh.py +++ b/scap/ssh.py @@ -44,7 +44,7 @@ def role(self, role): """Set hosts to run command on by network role.""" -return self.hosts(utils.read_dsh_hosts_file(role)) +return self.hosts(utils.read_hosts_file(role)) def shuffle(self): """Randomize order of target hosts.""" diff --git a/scap/utils.py b/scap/utils.py index 1e659be..3277a22 100644 --- a/scap/utils.py +++ b/scap/utils.py @@ -307,13 +307,21 @@ return crc.hexdigest() -def read_dsh_hosts_file(path): +def read_hosts_file(path): """Reads hosts from a file into a list. + +if passed an absolute file path, this function treats that path as the +host list, otherwise, uses /etc/dsh/group/[path] Blank lines and comments are ignored. """ +final_path = os.path.join('/etc/dsh/group', path) + +if os.path.isabs(path): +final_path = path + try: -with open(os.path.join('/etc/dsh/group', path)) as hosts_file: +with open(final_path) as hosts_file: return re.findall(r'^[\w\.\-]+', hosts_file.read(), re.MULTILINE) except IOError as e: raise IOError(e.errno, e.strerror, path) -- To view, visit https://gerrit.wikimedia.org/r/238213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b9c54caf8526c01ac014f977c734ca408001bfc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Checkout revs to repo-cache, link to repo - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/241684 Change subject: Checkout revs to repo-cache, link to repo .. Checkout revs to repo-cache, link to repo Rollback added the directories cache, revs, and current under the repo directory. Current Codebase Example: git_deploy_dir: /srv/deployment git_repo: mockbase/deploy creates: /srv/deployment/mockbase/deploy/{cache,revs,current} This breaks backwards compatibility with trebuchet. This patch puts caches, revs, and current under [git_deploy_dir]/[git_repo]-cache. Given the same git_deploy_dir and git_repo as above: creates: /srv/deployment/mockbase/deploy-cache/{cache,revs,current} Then, as a final step in the `promote` phase, it symlinks [repo]-cache/current to [repo]: /srv/deployment/mockbase/deploy -> /srv/deployment/mockbase/deploy-cache/current Also preserves any old checkout that may be at [git_repo] to [git_repo].trebuchet. This keeps rollback and backwards compatibility with trebuchet. Bug: T113107 Change-Id: I58ed5c3b057cc3c012e9d1bb202251c3ab958ef6 --- M scap/main.py 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/84/241684/1 diff --git a/scap/main.py b/scap/main.py index 627ccf0..605b7f4 100644 --- a/scap/main.py +++ b/scap/main.py @@ -594,9 +594,12 @@ def main(self, *extra_args): self.rev = self.config['git_rev'] -root_deploy_dir = os.path.normpath("{0}/{1}".format( +self.root_dir = os.path.normpath("{0}/{1}".format( self.config['git_deploy_dir'], self.config['git_repo'])) +# cache, revs, and current directory go under [repo]-cache and are +# linked to [repo] as a final step +root_deploy_dir = '{}-cache'.format(self.root_dir) deploy_dir = lambda subdir: os.path.join(root_deploy_dir, subdir) self.cache_dir = deploy_dir('cache') @@ -661,6 +664,7 @@ service = self.config.get('service_name', None) self._link_rev_dir(self.cur_link) +self._link_final_to_current() if service is not None: tasks.restart_service(service, user=self.config['git_repo_user']) @@ -721,6 +725,18 @@ self.promote() self._remove_progress_link() +def _link_final_to_current(self): +"""Link the current checkout to final location at [repo] + +This should really only be needed the first time that scap03 is +run. It links the [repo]-cache/current directory to [repo]. +""" +if (not os.path.islink(self.root_dir) and + (os.path.isfile(self.root_dir) or os.path.isdir(self.root_dir))): +os.rename(self.root_dir, '{}.trebuchet'.format(self.root_dir)) + +tasks.move_symlink(self.cur_link, self.root_dir, user=self.user) + def _link_rev_dir(self, symlink_path): tasks.move_symlink(self.rev_dir, symlink_path, user=self.user) -- To view, visit https://gerrit.wikimedia.org/r/241684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58ed5c3b057cc3c012e9d1bb202251c3ab958ef6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make deployment rev represent config state - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/243009 Change subject: Make deployment rev represent config state .. Make deployment rev represent config state Deployments of the same codebase with different configs will now checkout to different rev directories. This makes config deployment rollback without code deployment possible. Change-Id: I62ffdaf2b98527ff69480556bef2a03578a80f5c --- M scap/main.py 1 file changed, 32 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/09/243009/1 diff --git a/scap/main.py b/scap/main.py index 8eb2c26..7d8e6d0 100644 --- a/scap/main.py +++ b/scap/main.py @@ -7,6 +7,7 @@ """ import argparse import errno +import hashlib import multiprocessing import netifaces import os @@ -610,8 +611,16 @@ self.cache_dir = deploy_dir('cache') self.revs_dir = deploy_dir('revs') self.tmp_dir = deploy_dir('tmp') +self.cfg_digest = os.path.join(self.tmp_dir, '.config-digest') -self.rev_dir = os.path.join(self.revs_dir, self.rev) +rev_dir = self.rev +try: +with open(self.cfg_digest, 'r') as f: +rev_dir = '{}-{}'.format(f.read(), self.rev) +except IOError: +pass + +self.rev_dir = os.path.join(self.revs_dir, rev_dir) self.cur_link = deploy_dir('current') self.progress_flag = deploy_dir('.in-progress') @@ -654,6 +663,7 @@ source_basepath = os.path.join(self.tmp_dir, self.rev, 'config-files') logger.debug('Source basepath: {}'.format(source_basepath)) utils.mkdir_p(source_basepath) +config_file_tree = {} for config_file in config_files['files']: name = config_file['name'] @@ -675,7 +685,17 @@ logger.debug('Rendering config_file: {}'.format(source)) with open(source, 'w') as f: -f.write(tmpl.render()) +output_file = tmpl.render() +s = hashlib.sha1() +s.update('blob {}\0'.format(len(output_file))) +s.update(output_file) +config_file_tree[source] = s.hexdigest() +f.write(output_file) + +with open(self.cfg_digest, 'w') as f: +s = hashlib.sha1() +s.update(repr(config_file_tree)) +f.write(s.hexdigest()) def fetch(self): """Fetch the specified revision of the remote repo. @@ -744,7 +764,7 @@ # move .done flag and remove the .in-progress flag self._link_rev_dir(self.done_flag) -self._remove_progress_link() +self._cleanup() def rollback(self): """Performs a rollback to the last deployed revision. @@ -784,7 +804,7 @@ # Config re-evaluation no longer necessary or desirable at this point self.config['config_deploy'] = False self.promote() -self._remove_progress_link() +self._cleanup() def _link_final_to_current(self): """Link the current checkout to final location at [repo] @@ -828,9 +848,17 @@ def _link_rev_dir(self, symlink_path): tasks.move_symlink(self.rev_dir, symlink_path, user=self.user) +def _cleanup(self): +self._remove_progress_link() +self._remove_config_digest() + def _remove_progress_link(self): tasks.remove_symlink(self.progress_flag, user=self.user) +def _remove_config_digest(self): +if os.path.exists(self.cfg_digest): +os.unlink(self.cfg_digest) + class Deploy(cli.Application): """Sync new service code across cluster -- To view, visit https://gerrit.wikimedia.org/r/243009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62ffdaf2b98527ff69480556bef2a03578a80f5c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix mkdir_p relative paths - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/241576 Change subject: Fix mkdir_p relative paths .. Fix mkdir_p relative paths In the case where two directories common_path is more than 2 layers apart, the current version of mkdir_p behaves badly. Example; given: source = '/srv/deployment' dest = '/mnt/deployment' OLD: common path = '/' relative source = 'srv/deployment' relative dest = 'mnt/deployment' cd / (common path) ln -sfT srv/deployment mnt/deployment ls -l /mnt/deployment lrwxrwxrwx 1 user:user /mnt/deployment -> srv/deployment ^ Relative path is incorrect NEW: dirname of dest = '/mnt' relative source = '../srv/deployment' relative destination = 'deployment' # make the parent of the link (in case it doesn't exist mkdir -p /mnt cd /mnt ln -sfT ../srv/deployment deployment ls -l /mnt/deployment lrwxrwxrwx 1 user:user /mnt/deployment -> ../srv/deployment ^ Relative path is correct Change-Id: I2e3c72fcd8f45775a774f2a2e3b2d02933ac8328 --- M scap/tasks.py 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/76/241576/1 diff --git a/scap/tasks.py b/scap/tasks.py index b5c17ec..7724d4e 100644 --- a/scap/tasks.py +++ b/scap/tasks.py @@ -668,11 +668,14 @@ def move_symlink(source, dest, user='mwdeploy'): -common_path = os.path.commonprefix([source, dest]) -rsource = os.path.relpath(source, common_path) -rdest = os.path.relpath(dest, common_path) +dest_dir = os.path.dirname(dest) +rsource = os.path.relpath(source, dest_dir) +rdest = os.path.relpath(dest, dest_dir) -with utils.cd(common_path): +# Make link target's parent directory if it doesn't exist +utils.mkdir_p(dest_dir, user=user) + +with utils.cd(dest_dir): utils.sudo_check_call(user, "ln -sfT '{}' '{}'".format(rsource, rdest)) -- To view, visit https://gerrit.wikimedia.org/r/241576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e3c72fcd8f45775a774f2a2e3b2d02933ac8328 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop executing on failure - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/239521 Change subject: Stop executing on failure .. Stop executing on failure Stops executing a stage on new hosts after the first failure. Since each "batch" represents parallel rolling execution (i.e. run "batch_size" hosts in parallel until hosts is empty), this will stop any new hosts from running a particular stage, but will not disrupt any currently executing hosts. Change-Id: I4f6ad8d692fbcb135c6d50f824629f55371f2ead --- M scap/main.py M scap/ssh.py 2 files changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/21/239521/1 diff --git a/scap/main.py b/scap/main.py index 566f2e2..e707533 100644 --- a/scap/main.py +++ b/scap/main.py @@ -738,6 +738,8 @@ """ MAX_BATCH_SIZE = 80 +# Stop executing on new hosts after failure +MAX_FAILURES = 0 DEPLOY_CONF = [ 'git_deploy_dir', @@ -846,6 +848,7 @@ logger.debug('Running cmd {}'.format(deploy_stage_cmd)) deploy_stage = ssh.Job( hosts=self.targets, user=self.config['ssh_user']) +deploy_stage.max_failure = self.MAX_FAILURES deploy_stage.command(deploy_stage_cmd) deploy_stage.progress('deploy_{}_{}'.format(self.repo, stage)) succeeded, failed = deploy_stage.run(batch_size=batch_size) @@ -858,5 +861,5 @@ def _get_batch_size(self, stage): default = self.config.get('batch_size', self.MAX_BATCH_SIZE) -size = self.config.get('{}_batch_size'.format(stage), default) +size = int(self.config.get('{}_batch_size'.format(stage), default)) return min(size, self.MAX_BATCH_SIZE) diff --git a/scap/ssh.py b/scap/ssh.py index e21d688..0954269 100644 --- a/scap/ssh.py +++ b/scap/ssh.py @@ -30,6 +30,7 @@ self._command = command self._reporter = None self._user = user +self.max_failure = len(hosts) def get_logger(self): """Lazy getter for a logger instance.""" @@ -91,7 +92,7 @@ return self._run_with_reporter(batch_size) else: return list(cluster_ssh(self._hosts, self._command, self._user, -batch_size)) +batch_size, self.max_failure)) def _run_with_reporter(self, batch_size): """Run job and feed results to a :class:`log.ProgressReporter` as they @@ -99,8 +100,9 @@ self._reporter.expect(len(self._hosts)) self._reporter.start() -for host, status, output in cluster_ssh( -self._hosts, self._command, self._user, batch_size): +for host, status, output in cluster_ssh(self._hosts, self._command, +self._user, batch_size, +self.max_failure): if status == 0: self._reporter.add_success() else: @@ -111,17 +113,20 @@ return self._reporter.ok, self._reporter.failed -def cluster_ssh(hosts, command, user=None, limit=80): +def cluster_ssh(hosts, command, user=None, limit=80, max_fail=None): """Run a command via SSH on multiple hosts concurrently.""" hosts = set(hosts) # Ensure a minimum batch size of 1 limit = max(limit, 1) + +max_failure = len(hosts) if max_fail is None else max_fail try: command = shlex.split(command) except AttributeError: pass +failures = 0 procs = {} fds = {} poll = select.epoll() @@ -158,9 +163,13 @@ if pid: status = -(status & 255) or (status >> 8) +if status != 0: +failures = failures + 1 proc, host = procs.pop(pid) poll.unregister(proc.stdout) output = fds.pop(proc.stdout.fileno(), '') +if failures > max_failure: +hosts = [] yield host, status, output finally: poll.close() -- To view, visit https://gerrit.wikimedia.org/r/239521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f6ad8d692fbcb135c6d50f824629f55371f2ead Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not filter affected pages by namespace. - change (mediawiki...Wikibase)
Thcipriani has submitted this change and it was merged. Change subject: Do not filter affected pages by namespace. .. Do not filter affected pages by namespace. Affected pages must not be filtered by namespace. Usage tracking and external change handling must apply to all pages, even if wikibase is not "enabled". "Enabled" just refers to automatic language links, arbitrary access should be unaffected. Bug: T113456 Change-Id: Iab9800d9322bba9943b11b82ba23eebb08838137 (cherry picked from commit 4d2ff6c0cd1db83d6d49c427cffb9ff257cca77b) --- M client/includes/Changes/AffectedPagesFinder.php M client/includes/WikibaseClient.php M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php 4 files changed, 10 insertions(+), 35 deletions(-) Approvals: Thcipriani: Verified; Looks good to me, approved diff --git a/client/includes/Changes/AffectedPagesFinder.php b/client/includes/Changes/AffectedPagesFinder.php index 827ca0f..b8d1376 100644 --- a/client/includes/Changes/AffectedPagesFinder.php +++ b/client/includes/Changes/AffectedPagesFinder.php @@ -24,7 +24,6 @@ use Wikibase\EntityChange; use Wikibase\ItemChange; use Wikibase\Lib\Store\StorageException; -use Wikibase\NamespaceChecker; /** * @licence GNU GPL v2+ @@ -37,11 +36,6 @@ * @var UsageLookup */ private $usageLookup; - - /** -* @var NamespaceChecker -*/ - private $namespaceChecker; /** * @var TitleFactory @@ -65,7 +59,6 @@ /** * @param UsageLookup $usageLookup -* @param NamespaceChecker $namespaceChecker * @param TitleFactory $titleFactory * @param string $siteId * @param string $contentLanguageCode @@ -75,7 +68,6 @@ */ public function __construct( UsageLookup $usageLookup, - NamespaceChecker $namespaceChecker, TitleFactory $titleFactory, $siteId, $contentLanguageCode, @@ -94,7 +86,6 @@ } $this->usageLookup = $usageLookup; - $this->namespaceChecker = $namespaceChecker; $this->titleFactory = $titleFactory; $this->siteId = $siteId; $this->contentLanguageCode = $contentLanguageCode; @@ -305,13 +296,7 @@ continue; } - $ns = $title->getNamespace(); - - if ( !$this->namespaceChecker->isWikibaseEnabled( $ns ) ) { - continue; - } - - $key = $title->getArticleID(); + $key = $pageEntityUsages->getPageId(); $titlesToUpdate[$key] = $pageEntityUsages; } diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 8f3d1ed..3007e40 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -871,7 +871,6 @@ public function getAffectedPagesFinder() { return new AffectedPagesFinder( $this->getStore()->getUsageLookup(), - $this->getNamespaceChecker(), new TitleFactory(), $this->settings->getSetting( 'siteGlobalID' ), $this->getContentLanguage()->getCode() diff --git a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php index 2365d83..fd8784e 100644 --- a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php +++ b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php @@ -76,7 +76,6 @@ $affectedPagesFinder = new AffectedPagesFinder( $usageLookup, - $this->getNamespaceChecker(), $this->getTitleFactory(), 'enwiki', 'en', @@ -84,17 +83,6 @@ ); return $affectedPagesFinder; - } - - private function getNamespaceChecker() { - $namespaceChecker = $this->getMockBuilder( 'Wikibase\NamespaceChecker' ) - ->disableOriginalConstructor()->getMock(); - - $namespaceChecker->expects( $this->any() ) - ->method( 'isWikibaseEnabled' ) - ->will( $this->returnValue( true ) ); - - return $namespaceChecker; } public function getChangedAspectsProvider() { @@ -450,7 +438,6 @@ $affectedPagesFinder = new AffectedPagesFinder( $this->getSiteLinkUsageLookup( $pageTitle ), - $this->getNamespaceChecker(), new
[MediaWiki-commits] [Gerrit] Update Wikidata - Do not filter affected pages by namespace. - change (mediawiki/core)
Thcipriani has submitted this change and it was merged. Change subject: Update Wikidata - Do not filter affected pages by namespace. .. Update Wikidata - Do not filter affected pages by namespace. Affected pages must not be filtered by namespace. Usage tracking and external change handling must apply to all pages, even if wikibase is not "enabled". "Enabled" just refers to automatic language links, arbitrary access should be unaffected. Bug: T113456 Build-For: Change-Id: Iab9800d9322bba9943b11b82ba23eebb08838137 (cherry picked from commit 4d2ff6c0cd1db83d6d49c427cffb9ff257cca77b) Submodule-Update-For: Change-Id: Ic9074fb52bbd23e31bf77e80413e8f763f986dbb Change-Id: Ic4a7c7bc9c61eaf6951e1c62a050f2f3c7286202 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Thcipriani: Verified; Looks good to me, approved diff --git a/extensions/Wikidata b/extensions/Wikidata index 9e5e7f5..36e6275 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit 9e5e7f5cc9a88a88487f9e582736c7795f0621da +Subproject commit 36e6275115b32cf2a5787c3599e96a125010eed4 -- To view, visit https://gerrit.wikimedia.org/r/240727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4a7c7bc9c61eaf6951e1c62a050f2f3c7286202 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf23 Gerrit-Owner: JanZerebeckiGerrit-Reviewer: Thcipriani ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add config deployment - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/240292 Change subject: Add config deployment .. Add config deployment What happens on tin --- 1. Looks for environment-specific `./scap/config-files.yaml` with target files in the format: /path/to/target: template: env-specific-template.yaml.j2 remote_vars: /optional/remote/variable/file.yaml 2. Looks for environment-specific `./scap/vars.yaml` that includes variables used to render the template. These variables will be overridden by any conflicting variables in the file specified by `remote_vars` 3. Variables from any environment-specific `vars.yaml` file are combined with variables from the root `vars.yaml` file. 4. A json file is created at `[repo]/.git/config-files/[revision].json` that contains the final path to any environment-specific templates as well as a final list of combined variables. What happens on targets --- 1. Download the file from `tin/[repo]/.git/config-files/[revision].json` 2. Loop through the config files, and render each template using the variables from the downloaded json file and the variables from the (now) local remove_vars file 3. Links rendered file (in `[repo]/.git/config-files/[path]`) to final location Bug: T109512 Change-Id: I3a7c116aa90a0cc3e470931bfd7423634f075b19 --- M scap/config.py M scap/main.py M scap/tasks.py A scap/template.py M scap/utils.py 5 files changed, 258 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/92/240292/1 diff --git a/scap/config.py b/scap/config.py index b7a7d81..34d8f26 100644 --- a/scap/config.py +++ b/scap/config.py @@ -37,6 +37,7 @@ 'git_server': 'tin.eqiad.wmnet', 'git_scheme': 'http', 'git_submodules': False, +'config_deploy': False, } diff --git a/scap/main.py b/scap/main.py index e707533..f2aab49 100644 --- a/scap/main.py +++ b/scap/main.py @@ -7,17 +7,22 @@ """ import argparse import errno +import json import multiprocessing import netifaces import os import psutil +import requests import subprocess +import yaml from . import cli from . import log from . import ssh from . import tasks +from . import template from . import utils + from datetime import datetime @@ -578,7 +583,7 @@ class DeployLocal(cli.Application): """Deploy service code via git""" -STAGES = ['fetch', 'promote', 'check'] +STAGES = ['fetch', 'config_deploy', 'promote', 'check'] EX_STAGES = ['rollback'] rev = None @@ -611,6 +616,15 @@ self.user = self.config['git_repo_user'] +# only supports http from tin for the moment +scheme = 'http' +repo = self.config['git_repo'] +server = self.config['git_server'] + +url = os.path.normpath('{0}/{1}'.format(server, repo)) + +self.server_url = "{0}://{1}".format(scheme, url) + getattr(self, self.arguments.stage)() def fetch(self): @@ -625,23 +639,17 @@ logger = self.get_logger() -repo = self.config['git_repo'] -server = self.config['git_server'] has_submodules = self.config['git_submodules'] # create deployment directories if they don't already exist for d in [self.cache_dir, self.revs_dir]: utils.mkdir_p(d, logger=logger) -# only supports http from tin for the moment -scheme = 'http' - -url = os.path.normpath('{0}/{1}'.format(server, repo)) -url = "{0}://{1}/.git".format(scheme, url) -self.get_logger().debug('Fetching from: {}'.format(url)) +git_remote = os.path.join(self.server_url, '.git') +self.get_logger().debug('Fetching from: {}'.format(git_remote)) # clone/fetch from the repo to the cache directory -tasks.git_fetch(self.cache_dir, url, user=self.user) +tasks.git_fetch(self.cache_dir, git_remote, user=self.user) # clone/fetch from the local cache directory to the revision directory tasks.git_fetch(self.rev_dir, self.cache_dir, user=self.user) @@ -654,6 +662,61 @@ # link the .in-progress flag to the rev directory self._link_rev_dir(self.progress_flag) +def config_deploy(self): +"""Renders config files + +Grabs the current config json file from the deploy git server, and +renders the final template inside the current revision's +`.git/config-files` directory +""" +logger = self.get_logger() +if not self.config['config_deploy']: +return + +deploy_dir = self.config['deploy_dir'] +config_url = os.path.join(self.server_url, '.git', 'config-files', +'{}.json'.format(self.rev)) + +logger.debug('Get config json: {}'.format(config_url)) +r = requests.get(config_url) +if r.status_code != requests.codes.ok: +raise IOError(errno.ENOENT,
[MediaWiki-commits] [Gerrit] [WIP] Add optional canary deploy group and check - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/241066 Change subject: [WIP] Add optional canary deploy group and check .. [WIP] Add optional canary deploy group and check Adds optional `canary_dsh_targets` config variable that behaves the same as `dsh_targets` (if it's an abolute path, use it, otherwise look for `/etc/dsh/groups/[file]`). Adds a `canary_check` stage to `DeployLocal` that is yet to be implemented, but happens post canary-fetch, -promote, and -check and can be used for extended canary checks. Currently, after canary deploy, it waits for input from user; however, idealy, `cannary_check` could continue to run while waiting for user input. Bug: T113073 Change-Id: I7d1235197356201626a88056fefa344ddf92d2dd --- M scap/main.py 1 file changed, 72 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/66/241066/1 diff --git a/scap/main.py b/scap/main.py index e707533..548a536 100644 --- a/scap/main.py +++ b/scap/main.py @@ -579,7 +579,7 @@ class DeployLocal(cli.Application): """Deploy service code via git""" STAGES = ['fetch', 'promote', 'check'] -EX_STAGES = ['rollback'] +EX_STAGES = ['rollback', 'canary_check'] rev = None cache_dir = None @@ -724,6 +724,10 @@ self.promote() self._remove_progress_link() +def canary_check(self): +"""Extended checks, only preformed on canary deployment machines""" +pass + def _link_rev_dir(self, symlink_path): tasks.move_symlink(self.rev_dir, symlink_path, user=self.user) @@ -788,11 +792,29 @@ utils.read_hosts_file(self.config['dsh_targets']) ) -logger.info( -'Deploy will run on the following targets: \n\t- {}'.format( -'\n\t- '.join(self.targets) -) -) +self.canary_targets = utils.read_hosts_file( +self.config.get('canary_dsh_targets', '/dev/null')) + +self.all_targets = self.canary_targets + self.targets + +# Remove any canary targets from other targets +self.targets = list(set(self.targets) - set(self.canary_targets)) + +if not len(self.all_targets): +logger.warn('No targets selected, check limits and dsh_targets') +return 1 + +canary_target_msg = '' +if len(self.canary_targets): +canary_target_msg = '\n== CANARIES ==\n:*{}'.format( +'\n:* '.join(self.canary_targets)) + +target_msg = '' +if len(self.targets): +target_msg = '\n\n== TARGETS ==\n:* {}\n'.format( +'\n:* '.join(self.targets)) + +logger.info('{}{}'.format(canary_target_msg, target_msg)) with utils.lock(self.config['lock_file']): with log.Timer('deploy_' + self.repo): @@ -817,26 +839,63 @@ # apache server tasks.git_update_server_info(self.config['git_submodules']) -for stage in stages: -ret = self.execute_stage(stage) -if ret > 0: -self.execute_rollback(stage) -return ret +deploy_groups = [ +{'name': 'Canary', + 'targets': self.canary_targets, + 'stages': stages + ['canary_check'], + 'check': True}, +{'name': 'Normal', + 'targets': self.targets, + 'stages': stages, + 'check': False}, +] + +return self._execute_for_groups(deploy_groups) +return 0 + +def _execute_for_groups(self, deploy_groups): +logger = self.get_logger() +for group in deploy_groups: +if not len(group['targets']): +continue + +logger.info('== {} deploy group =='.format(group['name'])) + +ret = self._execute_stages(group['stages'], group['targets']) +if ret != 0: +return ret + +prompt = '{} deploy successful. Continue?'.format( +group['name']) + +if group['check'] and utils.ask(prompt, 'y') != 'y': +break return 0 + +def _execute_stages(self, stages, targets): +for stage in stages: +job = ssh.Job(hosts=targets, user=self.config['ssh_user']) +ret = self.execute_stage(stage, job) +if ret > 0: +self.execute_rollback(stage) +return ret +return ret def execute_rollback(self, stage): prompt = "Stage '{}' failed. Perform rollback?".format(stage) +job = ssh.Job(hosts=self.all_targets, user=self.config['ssh_user']) if utils.ask(prompt, 'y') == 'y': -return
[MediaWiki-commits] [Gerrit] De-decorate inside_git_dir - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/240912 Change subject: De-decorate inside_git_dir .. De-decorate inside_git_dir Moves inside_git_dir from fragile decorator to `ensure_git_dir` utility function. Saves an import, saves SLOC, saves brainpower. Change-Id: Ic85b0534869f656008db6279294634ae68150acc --- M scap/tasks.py M scap/utils.py 2 files changed, 11 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/12/240912/1 diff --git a/scap/tasks.py b/scap/tasks.py index 111..122a48f 100644 --- a/scap/tasks.py +++ b/scap/tasks.py @@ -574,17 +574,17 @@ return restart.progress('restart_hhvm').run(batch_size=batch_size) -@utils.inside_git_dir def git_remote_exists(location, remote): """Check if remote exists in location""" +utils.ensure_git_dir(location) with utils.cd(location): cmd = '/usr/bin/git config --local --get remote.{}.url'.format(remote) return subprocess.call(cmd, shell=True) == 0 -@utils.inside_git_dir def git_remote_set(location, repo, remote='origin', user='mwdeploy'): """set the remote at location to repo""" +utils.ensure_git_dir(location) with utils.cd(location): if git_remote_exists(location, remote): cmd = '/usr/bin/git remote rm {}'.format(remote) @@ -607,10 +607,11 @@ utils.sudo_check_call(user, cmd) -@utils.inside_git_dir def git_checkout(location, rev, submodules=False, user="mwdeploy"): """Checkout a git repo sha at a location as a user """ +utils.ensure_git_dir(location) + logger = logging.getLogger('git_checkout') with utils.cd(location): logger.debug( @@ -638,13 +639,13 @@ subprocess.check_call(cmd, shell=True) -@utils.inside_git_dir def git_update_deploy_head(deploy_info, location): """updates .git/DEPLOY_HEAD file :param deploy_info: current deploy info to write to file as JSON :param (optional) location: git directory location (default cwd) """ +utils.ensure_git_dir(location) logger = logging.getLogger('git_deploy_file') with utils.cd(location): @@ -655,10 +656,10 @@ f.close() -@utils.inside_git_dir def git_tag_repo(deploy_info, location=os.getcwd()): """creates new tag in deploy repo""" +utils.ensure_git_dir(location) with utils.cd(location): cmd = """ /usr/bin/git tag -fa \\ diff --git a/scap/utils.py b/scap/utils.py index 77eccd2..b356406 100644 --- a/scap/utils.py +++ b/scap/utils.py @@ -9,7 +9,6 @@ import errno import fcntl import hashlib -import inspect import json import logging import os @@ -550,32 +549,9 @@ raise IOError(e.errno, e.strerror, path) -def inside_git_dir(func): -"""Decorator to determine if the "location" argument is a git directory""" -def wrapper(*args, **kwargs): -argspec = inspect.getargspec(func) -try: -l = args[argspec.args.index('location')] -except IndexError: -l = None - -if l is None: -d = None - -if argspec.defaults is not None: -defaults = dict(zip( -argspec.args[-len(argspec.defaults):], -argspec.defaults -)) -d = defaults.get('location') - -l = kwargs.get('location', d) - -if l is None or not is_git_dir(l): -raise IOError(errno.ENOENT, 'Location is not a git repo', l) - -return func(*args, **kwargs) -return wrapper +def ensure_git_dir(location): +if location is None or not is_git_dir(location): +raise IOError(errno.ENOENT, 'Location is not a git repo', location) def is_git_dir(path): @@ -594,17 +570,17 @@ sudo_check_call(user, "mkdir -p '{}'".format(path), logger=logger) -@inside_git_dir def git_sha(location, rev): """Returns SHA1 for things like HEAD or HEAD~~""" +ensure_git_dir(location) with cd(location): cmd = '/usr/bin/git rev-parse --verify {}'.format(rev) return subprocess.check_output(cmd, shell=True).strip() -@inside_git_dir def git_next_deploy_tag(location, user=get_real_username()): """Calculates the scap/sync/{date}/{n} tag to use for this deployment""" +ensure_git_dir(location) with cd(location): timestamp = datetime.utcnow() date = timestamp.strftime('%F') -- To view, visit https://gerrit.wikimedia.org/r/240912 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic85b0534869f656008db6279294634ae68150acc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Fix log_context to detect positional argument - change (mediawiki...scap)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/241076 Change subject: Fix log_context to detect positional argument .. Fix log_context to detect positional argument If you add the `@log_context` decorator to a function with a logger argument and then pass logger as a positional argument you get: "[fn name] got multiple values for keyword argument 'logger'" This makes sure that keyword and positional arguments for logger are checked before passing logger as a keyword argument. Change-Id: Ibd36464538e7b0cdbb3e588f6761eb56f67e5bdc --- M scap/utils.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/76/241076/1 diff --git a/scap/utils.py b/scap/utils.py index 33ddd89..e811caf 100644 --- a/scap/utils.py +++ b/scap/utils.py @@ -9,6 +9,7 @@ import errno import fcntl import hashlib +import inspect import json import logging import os @@ -313,7 +314,19 @@ def arg_wrapper(func): @wraps(func) def context_wrapper(*args, **kwargs): -if 'logger' in kwargs: +argspec = inspect.getargspec(func) + +# Check if logger was passed as a positional argument +try: +l = args[argspec.args.index('logger')] +except IndexError: +l = None + +# Check if logger was passed as a keywork argument +if l is None: +l = kwargs.get('logger', None) + +if l is not None: return func(*args, **kwargs) with context_logger(context_name) as logger: -- To view, visit https://gerrit.wikimedia.org/r/241076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd36464538e7b0cdbb3e588f6761eb56f67e5bdc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Roll out RESTBase usage to Android Beta app: 10% - change (mediawiki...MobileApp)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257365 Change subject: Roll out RESTBase usage to Android Beta app: 10% .. Roll out RESTBase usage to Android Beta app: 10% Added config value for restbaseBetaPercent. Initially set to 10%. Valid values are [0, 100]. Bug: T118965 Change-Id: I5de7276e28ddbe1b4e220b16d2bf1cfec7daab75 (cherry picked from commit f378bc09dff79746459bec874fb2b29b2be891fb) --- M config/config.json 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp refs/changes/65/257365/1 diff --git a/config/config.json b/config/config.json index eabe4f4..1c31381 100644 --- a/config/config.json +++ b/config/config.json @@ -3,5 +3,6 @@ "eventLogSampleRate": 0, "disableFullTextSearch": false, "searchLogSampleRate": 100, -"tocLogSampleRate": 100 +"tocLogSampleRate": 100, +"restbaseBetaPercent": 10 } -- To view, visit https://gerrit.wikimedia.org/r/257365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5de7276e28ddbe1b4e220b16d2bf1cfec7daab75 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: wmf/1.27.0-wmf.7 Gerrit-Owner: ThciprianiGerrit-Reviewer: BearND ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add skipped branched extensions - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257693 Change subject: Add skipped branched extensions .. Add skipped branched extensions make-wmf-branch was tripped-up on the Gather extension. To continue cutting the branch, I removed the extensions in `config.json` that were in the list before the Gather extension. As a result, they were not added as submodules to the new wmf/1.27.0-wmf.8 branch. This patch adds those missed submodules back. Change-Id: I45aafd46bbd502e1e9d779e65f9962119a058834 --- M .gitmodules A extensions/AbuseFilter A extensions/AccountAudit A extensions/ActiveAbstract A extensions/AntiSpoof A extensions/ApiFeatureUsage A extensions/ApiSandbox A extensions/Babel A extensions/BetaFeatures A extensions/BounceHandler A extensions/Calendar A extensions/Campaigns A extensions/Cards A extensions/CategoryTree A extensions/CentralAuth A extensions/CharInsert A extensions/CheckUser A extensions/CirrusSearch A extensions/Cite A extensions/CiteThisPage A extensions/Citoid A extensions/CleanChanges A extensions/CodeEditor A extensions/CodeReview A extensions/Collection A extensions/CommonsMetadata A extensions/ConfirmEdit A extensions/ContactPage A extensions/ContentTranslation A extensions/ContributionTracking A extensions/CreditsSource A extensions/CustomData A extensions/DisableAccount A extensions/Disambiguator A extensions/DismissableSiteNotice A extensions/DonationInterface A extensions/DoubleWiki A extensions/DynamicSidebar A extensions/Echo A extensions/EducationProgram A extensions/Elastica A extensions/EventLogging A extensions/ExtensionDistributor A extensions/FeaturedFeeds A extensions/FlaggedRevs A extensions/Flow A extensions/FundraiserLandingPage A extensions/FundraisingTranslateWorkflow A extensions/Gadgets A extensions/cldr 50 files changed, 196 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/257693/1 diff --git a/.gitmodules b/.gitmodules index 1a1c777..cacc158 100644 --- a/.gitmodules +++ b/.gitmodules @@ -445,3 +445,199 @@ path = vendor url = https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git branch = wmf/1.27.0-wmf.8 +[submodule "extensions/AbuseFilter"] + path = extensions/AbuseFilter + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AbuseFilter.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/AccountAudit"] + path = extensions/AccountAudit + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AccountAudit.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/ActiveAbstract"] + path = extensions/ActiveAbstract + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ActiveAbstract.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/AntiSpoof"] + path = extensions/AntiSpoof + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AntiSpoof.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/ApiFeatureUsage"] + path = extensions/ApiFeatureUsage + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiFeatureUsage.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/ApiSandbox"] + path = extensions/ApiSandbox + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiSandbox.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/Babel"] + path = extensions/Babel + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Babel.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/BetaFeatures"] + path = extensions/BetaFeatures + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BetaFeatures.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/BounceHandler"] + path = extensions/BounceHandler + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BounceHandler.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/Calendar"] + path = extensions/Calendar + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Calendar.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/Campaigns"] + path = extensions/Campaigns + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Campaigns.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/Cards"] + path = extensions/Cards + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cards.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/CategoryTree"] + path = extensions/CategoryTree + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CategoryTree.git + branch = wmf/1.27.0-wmf.8 +[submodule "extensions/CentralAuth"] + path = extensions/CentralAuth + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CentralAuth.git + branch = wmf/1.27.0-wmf.8 +[submodule
[MediaWiki-commits] [Gerrit] Bump MediaWikiGadgetsDefinitionRepo cache version - change (mediawiki...Gadgets)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257788 Change subject: Bump MediaWikiGadgetsDefinitionRepo cache version .. Bump MediaWikiGadgetsDefinitionRepo cache version Needed by 519f30355ec2 Change-Id: Ic67893500f2865a46b67b701a3b418631ded5137 (cherry picked from commit 3b9c1774009b5ca1c35a1e1de040f172e20d5675) --- M includes/MediaWikiGadgetsDefinitionRepo.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets refs/changes/88/257788/1 diff --git a/includes/MediaWikiGadgetsDefinitionRepo.php b/includes/MediaWikiGadgetsDefinitionRepo.php index 45277d9..6cbae5a 100644 --- a/includes/MediaWikiGadgetsDefinitionRepo.php +++ b/includes/MediaWikiGadgetsDefinitionRepo.php @@ -5,7 +5,7 @@ */ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo { - const CACHE_VERSION = 1; + const CACHE_VERSION = 2; private $definitionCache; -- To view, visit https://gerrit.wikimedia.org/r/257788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic67893500f2865a46b67b701a3b418631ded5137 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gadgets Gerrit-Branch: wmf/1.27.0-wmf.8 Gerrit-Owner: ThciprianiGerrit-Reviewer: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add cards extensions to appease l10nupdate - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257768 Change subject: Add cards extensions to appease l10nupdate .. Add cards extensions to appease l10nupdate Change-Id: Ied0b9abb834afe09a1309f6f0f0a3897511628f3 --- M .gitmodules A extensions/Cards 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/257768/1 diff --git a/.gitmodules b/.gitmodules index e495f49..dd1d8e0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -646,3 +646,7 @@ path = vendor url = https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git branch = wmf/1.27.0-wmf.7 +[submodule "extensions/Cards"] + path = extensions/Cards + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cards.git + branch = wmf/1.27.0-wmf.8 diff --git a/extensions/Cards b/extensions/Cards new file mode 16 index 000..9bde02f --- /dev/null +++ b/extensions/Cards +Subproject commit 9bde02f038912a0d903a1dd18a3158672978d307 -- To view, visit https://gerrit.wikimedia.org/r/257768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied0b9abb834afe09a1309f6f0f0a3897511628f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.7 Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group0 to php-1.27.0-wmf.8 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257757 Change subject: group0 to php-1.27.0-wmf.8 .. group0 to php-1.27.0-wmf.8 Change-Id: Id289ed61e8a5236764389d203f812c0393bc0056 --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/57/257757/1 diff --git a/wikiversions.json b/wikiversions.json index fdb1b24..829094f 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Add 1.27.0-wmf.8 symlinks - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257756 Change subject: Add 1.27.0-wmf.8 symlinks .. Add 1.27.0-wmf.8 symlinks Change-Id: I0bf4fd42f0c46c730bed73719d5786711fadea22 --- M docroot/bits/static M docroot/bits/static-current A w/static/1.27.0-wmf.8/extensions A w/static/1.27.0-wmf.8/resources A w/static/1.27.0-wmf.8/skins 5 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/56/257756/1 diff --git a/docroot/bits/static b/docroot/bits/static index 5134fa2..65c84b9 12 --- a/docroot/bits/static +++ b/docroot/bits/static @@ -1 +1 @@ -/srv/mediawiki/w/static \ No newline at end of file +../../w/static \ No newline at end of file diff --git a/docroot/bits/static-current b/docroot/bits/static-current index 22169e7..c5e4f4d 12 --- a/docroot/bits/static-current +++ b/docroot/bits/static-current @@ -1 +1 @@ -/srv/mediawiki/w/static/current \ No newline at end of file +../../w/static/current \ No newline at end of file diff --git a/w/static/1.27.0-wmf.8/extensions b/w/static/1.27.0-wmf.8/extensions new file mode 12 index 000..b8e47ce --- /dev/null +++ b/w/static/1.27.0-wmf.8/extensions @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.8/extensions \ No newline at end of file diff --git a/w/static/1.27.0-wmf.8/resources b/w/static/1.27.0-wmf.8/resources new file mode 12 index 000..6a9bab4 --- /dev/null +++ b/w/static/1.27.0-wmf.8/resources @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.8/resources \ No newline at end of file diff --git a/w/static/1.27.0-wmf.8/skins b/w/static/1.27.0-wmf.8/skins new file mode 12 index 000..8c85a82 --- /dev/null +++ b/w/static/1.27.0-wmf.8/skins @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.8/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/257756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0bf4fd42f0c46c730bed73719d5786711fadea22 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group1 wikis to 1.27.0-wmf.8 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257967 Change subject: group1 wikis to 1.27.0-wmf.8 .. group1 wikis to 1.27.0-wmf.8 Change-Id: Icc80dc9de358ccd70d58feb6b7da57d25221ec72 --- M php M w/static/current/extensions M w/static/current/resources M w/static/current/skins M wikiversions.json 5 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/67/257967/1 diff --git a/php b/php index 9f47169..c226656 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.27.0-wmf.7 \ No newline at end of file +php-1.27.0-wmf.8 \ No newline at end of file diff --git a/w/static/current/extensions b/w/static/current/extensions index bb4d389..b8e47ce 12 --- a/w/static/current/extensions +++ b/w/static/current/extensions @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.7/extensions \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.8/extensions \ No newline at end of file diff --git a/w/static/current/resources b/w/static/current/resources index 361d3f8..6a9bab4 12 --- a/w/static/current/resources +++ b/w/static/current/resources @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.7/resources \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.8/resources \ No newline at end of file diff --git a/w/static/current/skins b/w/static/current/skins index 861671a..8c85a82 12 --- a/w/static/current/skins +++ b/w/static/current/skins @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.7/skins \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.8/skins \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index 829094f..2f760da 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Update hieradata for trebuchet module - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/256261 Change subject: Update hieradata for trebuchet module .. Update hieradata for trebuchet module trebuchet was recently moved from a role to a module. This update is needed so that labs gets the correct `trebuchet_master` grain which is needed by the puppet trebuchet provider. Bug: T119988 Change-Id: I87f919ff6b666ec4969aa95e5db079661f3f2d59 --- M hieradata/labs/deployment-prep/common.yaml M hieradata/labs/staging/common.yaml 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/256261/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 0235c45..7c899f0 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -117,7 +117,7 @@ "beta::syncsiteresources::user": www-data "role::url_downloader::url_downloader_ip": 10.68.16.135 "zotero::http_proxy": deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080 -"role::trebuchet::deployment_server": deployment-bastion.eqiad.wmflabs +"trebuchet::deployment_server": deployment-bastion.deployment-prep.eqiad.wmflabs "scap::dsh::group_source": 'puppet:///modules/beta/dsh/group' "mediawiki::users::mwdeploy_pub_key": 'ssh-rsa B3NzaC1yc2EDAQABAAABAQDFwlmBBBJAr1GI+vuYjFh5vq0YIVa5fqE5DZdpzUZISlQ0Kt+9bIr2qNHIj+Jl5Bc6ZY1mkh8l693tAHVx+8tayoiFWYNs9IVsxR+iHgOOhAdDIBXaHaUattdiye5bQmdvJVXaVegckNX2gbmUCOc09jvZvlk3blKFTSEpZRU8dmpXQzKdZgaAq2VTajAegoFnuN9FbC7hzBPA+1NxFNKn94eIeFPSlo5rWr44OEb5Uy3O0B5c6WPM+IgfiygetP+yGL4cKv7qEjZ0Sxok/Rh1lBh1vP1YQ/Mc6tMV0s+kOv7Wz+P88bfU1/uWvy479OZdfh3NQqDTrLzqHwVW1vef root@deployment-salt' # NOTE: these elasticsearch settings will need to be overloaded on a per-host diff --git a/hieradata/labs/staging/common.yaml b/hieradata/labs/staging/common.yaml index ac93afe..8644a7b 100644 --- a/hieradata/labs/staging/common.yaml +++ b/hieradata/labs/staging/common.yaml @@ -7,7 +7,7 @@ salt::master::salt_module_roots: { base: [ '/srv/salt/_modules' ] } salt::master::salt_returner_roots: { base: [ '/srv/salt/_returners' ] } role::deployment::salt_masters::deployment_server: staging-tin.eqiad.wmflabs -role::trebuchet::deployment_server: staging-tin.eqiad.wmflabs +trebuchet::deployment_server: staging-tin.staging.eqiad.wmflabs elasticsearch::expected_nodes: 3 elasticsearch::minimum_master_nodes: 3 elasticsearch::heap_memory: 4G -- To view, visit https://gerrit.wikimedia.org/r/256261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87f919ff6b666ec4969aa95e5db079661f3f2d59 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure changes to an extension's .gitreview file - change (mediawiki...release)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/258030 Change subject: Ensure changes to an extension's .gitreview file .. Ensure changes to an extension's .gitreview file If the string 'defaultbranch=master' is not present in a .gitreview file for a branched extension, then no update is made to the .gitreview file. If no update is made to the .gitreview file then make-wmf-branch will fail because the git commit of the new branch will fail. Change-Id: I46ae7a591f824f6035c5942fe94e57f61490f96d --- M make-wmf-branch/MakeWmfBranch.php 1 file changed, 29 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/30/258030/1 diff --git a/make-wmf-branch/MakeWmfBranch.php b/make-wmf-branch/MakeWmfBranch.php index 8da0714..001192b 100644 --- a/make-wmf-branch/MakeWmfBranch.php +++ b/make-wmf-branch/MakeWmfBranch.php @@ -252,9 +252,35 @@ } function fixGitReview() { - $s = file_get_contents( ".gitreview" ); - $s = str_replace( "defaultbranch=master", "defaultbranch={$this->branchPrefix}{$this->newVersion}", $s ); - file_put_contents( ".gitreview", $s ); + $lines = file( '.gitreview', FILE_IGNORE_NEW_LINES ); + $outputFile = []; + $changed = false; + + foreach ( $lines as $line ) { + $arr = explode( '=', $line ); + + if ( count( $arr ) < 2 ) { + $outputFile[] = $line; + continue; + } + + list( $k, $v ) = $arr; + + if ( trim($k) === 'defaultbranch' ) { + $v = "{$this->branchPrefix}{$this->newVersion}"; + $changed = true; + } + + $outputFile[] = implode( '=', array( $k, $v ) ); + } + + $final = implode( "\n", $outputFile ); + $final .= "\n"; + + if ( !$changed ) + $final .= '# Updated ' . date( 'c' ) . "\n"; + + file_put_contents( '.gitreview', $final ); } } -- To view, visit https://gerrit.wikimedia.org/r/258030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46ae7a591f824f6035c5942fe94e57f61490f96d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Better usage. No positional args. - change (mediawiki...release)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/258074 Change subject: Better usage. No positional args. .. Better usage. No positional args. Use getopt to parse options instead of relying on positional arguments. Also adds a `--help` option. Outputs help on STDERR. Change-Id: Ie200ff7f419f4caec99762bac0480b12a4270306 --- M make-wmf-branch/make-wmf-branch 1 file changed, 51 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/74/258074/1 diff --git a/make-wmf-branch/make-wmf-branch b/make-wmf-branch/make-wmf-branch index cd9a5c6..dfddb75 100755 --- a/make-wmf-branch/make-wmf-branch +++ b/make-wmf-branch/make-wmf-branch @@ -2,11 +2,57 @@ \n"; - echo "Example: make-wmf-branch 1.20wmf2 1.20wmf1\n"; - echo " , if given, is a local clone on disk to use\n"; - exit( 1 ); +const USAGE = << -o [-p wmf-clone-path] + +Example: make-wmf-branch -o 1.27.0-wmf.8 -n 1.27.0-wmf.9 + +Arguments: +-h, --help Show this message +-n, --new-branchNew branch +-o, --old-branchOld branch +-p, --path Path on local disk from which to +branch mediawiki-core + +EOF; + +$passedArgs = getopt( 'hn:o:p:', array( +'help', +'new:', +'old:', +'path:', +) ); + +if ( isset( $passedArgs['help'] ) || isset( $passedArgs['h'] ) ) { +fwrite( STDERR, USAGE ); +exit( 0 ); +} + +$storedArgs = array( +array( 'n', 'new', 'newVersion', true ), +array( 'o', 'old', 'oldVersion', true ), +array( 'p', 'path', 'clonePath', false ), +); + +foreach ( $storedArgs as $args ) { +list( $short, $long, $var, $required ) = $args; + +$set = isset( $passedArgs[$short] ) || isset( $passedArgs[$long] ); + +if ( !$set && $required ) { +fprintf( STDERR, "'-%s' or '--%s' must be set.\n", $short, $long ); +fprintf( STDERR, USAGE ); +exit( 1 ); +} + +if ( !$set && !$required ) { +$$var = null; +continue; +} + +$$var = isset( $passedArgs[$short] ) +? $passedArgs[$short] +: $passedArgs[$long]; } $current_branch = trim(`git symbolic-ref HEAD`); @@ -40,10 +86,6 @@ echo "Warning: You have local changes in your tools/release checkout:\n"; echo $changes."\n\n"; } - -$newVersion = $argv[1]; -$oldVersion = $argv[2]; -$clonePath = isset( $argv[3] ) ? $argv[3] : null; require_once( __DIR__ . '/MakeWmfBranch.php' ); -- To view, visit https://gerrit.wikimedia.org/r/258074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie200ff7f419f4caec99762bac0480b12a4270306 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] all wikis to 1.27.0-wmf.8 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/258190 Change subject: all wikis to 1.27.0-wmf.8 .. all wikis to 1.27.0-wmf.8 Change-Id: I6574aa426e5aa63029f1134d271f278c96f246bd --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/90/258190/1 diff --git a/wikiversions.json b/wikiversions.json index 5837842..2fbc8d1 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Add flag to resume branching from named extension - change (mediawiki...release)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/258203 Change subject: Add flag to resume branching from named extension .. Add flag to resume branching from named extension Adds the [-c|--continue-from] optional flag to `make-wmf-branch`. Setting this flag to the name of an extension in the `config.json` file will resume cutting new branches on branched extensions from that extension forward. Currently, if branching of extensions fails on a particular extension the workflow is: 0. Figure out why branching that extension failed, fix it. 1. Delete the extension names from `make-wmf-branch/config.json` that occur before the extension that failed. 2. Re-run `make-wmf-branch/make-wmf-branch`. 3. Checkout the new branch of mediawiki-core. 4. Add submodules for all the extensions you deleted from the config in step 1. 5. Add a new patch for the new branch of core in gerrit, +2, and merge. New workflow would be: 0. Figure out why branching that extension failed, fix it. 1. Run `make-wmf-branch/make-wmf-branch -n -o -c `. Change-Id: Icf1f2f9a98dcd390d8a187ce11ebe6b3e2219204 --- M make-wmf-branch/MakeWmfBranch.php M make-wmf-branch/make-wmf-branch 2 files changed, 67 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/03/258203/1 diff --git a/make-wmf-branch/MakeWmfBranch.php b/make-wmf-branch/MakeWmfBranch.php index 8da0714..24569ac 100644 --- a/make-wmf-branch/MakeWmfBranch.php +++ b/make-wmf-branch/MakeWmfBranch.php @@ -31,11 +31,53 @@ $this->branchedSubmodules = $branchLists['submodules']; $this->branchedSkins = $branchLists['skins']; $this->specialExtensions = $branchLists['special_extensions']; + $this->alreadyBranched = array(); $this->noisy = $noisy; $this->patches = $patches; $this->baseRepoPath = $baseRepoPath; $this->anonRepoPath = $anonRepoPath; $this->branchPrefix = $branchPrefix; + } + + /** +* setup an alreadyBranched array that has the names of all extensions +* up-to the extension from which we would like to start branching +* +* @param String/null $extName - name of extension from which to start branching +*/ + function setStartExtension( $extName ) { + if ( $extName === null ) + return; + + $foundKey = false; + foreach ( array( + $this->branchedExtensions, + $this->branchedSkins, + array( 'vendor' ), + ) as $branchedArr ) { + $key = array_search( $extName, $branchedArr); + + if ( $key !== false ) { + array_splice( $branchedArr, $key ); + $foundKey = true; + } + + $this->alreadyBranched = array_merge( + $this->alreadyBranched, + $branchedArr + ); + + if ( $foundKey ) + break; + } + + if ( !$foundKey ) + $this->croak( + "Could not find extension '{$extName}' in any branched Extension list" + ); + + // Should make searching array easier + $this->alreadyBranched = array_flip( $this->alreadyBranched ); } function runCmd( /*...*/ ) { @@ -80,7 +122,10 @@ } function croak( $msg ) { - fwrite( STDERR, "$msg\n" ); + $red = `tput setaf 1`; + $reset = `tput sgr0`; + + fprintf( STDERR, "[{$red}ERROR{$reset}] %s\n", $msg ); exit( 1 ); } @@ -125,6 +170,11 @@ function branchRepo( $path ) { $repo = basename( $path ); + + // repo has already been branched, so just bail out + if ( isset( $this->alreadyBranched[$repo] ) ) + return; + $this->runCmd( 'git', 'clone', '-q', "{$this->baseRepoPath}/{$path}.git", $repo ); $this->chdir( $repo ); $newVersion = $this->branchPrefix . $this->newVersion; diff --git a/make-wmf-branch/make-wmf-branch b/make-wmf-branch/make-wmf-branch index 3e613ca..ae329b0 100755 --- a/make-wmf-branch/make-wmf-branch +++ b/make-wmf-branch/make-wmf-branch @@ -4,6 +4,7 @@ const USAGE = << -o [-p wmf-clone-path] +[-c extension-name] Example: make-wmf-branch -o 1.27.0-wmf.8 -n 1.27.0-wmf.9 @@ -13,14 +14,24 @@ -o, --old Old branch -p, --path Path on
[MediaWiki-commits] [Gerrit] group1 wikis to 1.27.0-wmf.9 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259538 Change subject: group1 wikis to 1.27.0-wmf.9 .. group1 wikis to 1.27.0-wmf.9 Change-Id: I150b73e2ef793b60f00db23df045ec64ae6a2b33 --- M php M w/static/current/extensions M w/static/current/resources M w/static/current/skins M wikiversions.json 5 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/38/259538/1 diff --git a/php b/php index c226656..d3d9245 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.27.0-wmf.8 \ No newline at end of file +php-1.27.0-wmf.9 \ No newline at end of file diff --git a/w/static/current/extensions b/w/static/current/extensions index b8e47ce..54bd541 12 --- a/w/static/current/extensions +++ b/w/static/current/extensions @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.8/extensions \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.9/extensions \ No newline at end of file diff --git a/w/static/current/resources b/w/static/current/resources index 6a9bab4..7a2f888 12 --- a/w/static/current/resources +++ b/w/static/current/resources @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.8/resources \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.9/resources \ No newline at end of file diff --git a/w/static/current/skins b/w/static/current/skins index 8c85a82..3f6c9f6 12 --- a/w/static/current/skins +++ b/w/static/current/skins @@ -1 +1 @@ -/srv/mediawiki/php-1.27.0-wmf.8/skins \ No newline at end of file +/srv/mediawiki/php-1.27.0-wmf.9/skins \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index 436f1e5..e47e6b6 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] mw.UploadWizardDetails: Don't fail when 'description' is giv... - change (mediawiki...UploadWizard)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259006 Change subject: mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't .. mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't Follow-up to c339bb6e109dc0ee493292c0b91841faff7c033c. Bug: T121340 Change-Id: I9528e796ee1c3a49492a9c2173a4d0d8df0c3e95 (cherry picked from commit 21dc1a4d3e8fa702c31bb0bed9e1ffc75bd43b68) --- M resources/mw.UploadWizardDetails.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/06/259006/1 diff --git a/resources/mw.UploadWizardDetails.js b/resources/mw.UploadWizardDetails.js index 9423dd4..80b88f4 100644 --- a/resources/mw.UploadWizardDetails.js +++ b/resources/mw.UploadWizardDetails.js @@ -194,7 +194,9 @@ this.descriptionsDetails.setSerialized( { descriptions: [ { - language: uw.DescriptionDetailsWidget.static.getClosestAllowedLanguage( uri.query.descriptionlang ), + language: uri.query.descriptionlang ? + uw.DescriptionDetailsWidget.static.getClosestAllowedLanguage( uri.query.descriptionlang ) : + uw.DescriptionDetailsWidget.static.getDefaultLanguage(), description: mw.UploadWizard.config.defaults.description } ] -- To view, visit https://gerrit.wikimedia.org/r/259006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9528e796ee1c3a49492a9c2173a4d0d8df0c3e95 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: wmf/1.27.0-wmf.8 Gerrit-Owner: ThciprianiGerrit-Reviewer: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "mw.UploadWizardDetails: Don't fail when 'description... - change (mediawiki...UploadWizard)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259014 Change subject: Revert "mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't" .. Revert "mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't" This reverts commit 21dc1a4d3e8fa702c31bb0bed9e1ffc75bd43b68. Change-Id: I3c01cbc1f55dd1b23d58a86a577e4660c3a6d39f --- M resources/mw.UploadWizardDetails.js 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/14/259014/1 diff --git a/resources/mw.UploadWizardDetails.js b/resources/mw.UploadWizardDetails.js index 80b88f4..9423dd4 100644 --- a/resources/mw.UploadWizardDetails.js +++ b/resources/mw.UploadWizardDetails.js @@ -194,9 +194,7 @@ this.descriptionsDetails.setSerialized( { descriptions: [ { - language: uri.query.descriptionlang ? - uw.DescriptionDetailsWidget.static.getClosestAllowedLanguage( uri.query.descriptionlang ) : - uw.DescriptionDetailsWidget.static.getDefaultLanguage(), + language: uw.DescriptionDetailsWidget.static.getClosestAllowedLanguage( uri.query.descriptionlang ), description: mw.UploadWizard.config.defaults.description } ] -- To view, visit https://gerrit.wikimedia.org/r/259014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c01cbc1f55dd1b23d58a86a577e4660c3a6d39f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] all wikis to 1.27.0-wmf.9 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259779 Change subject: all wikis to 1.27.0-wmf.9 .. all wikis to 1.27.0-wmf.9 Change-Id: Iab5584f71ff6d07cda99bf25c22d9250a73f0d33 --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/79/259779/1 diff --git a/wikiversions.json b/wikiversions.json index e47e6b6..a123f2d 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Add 1.27.0-wmf.9 symlinks - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259336 Change subject: Add 1.27.0-wmf.9 symlinks .. Add 1.27.0-wmf.9 symlinks Change-Id: Idd635bc5451d1bcfbf1f2849c4e42c720c21f35a --- A w/static/1.27.0-wmf.9/extensions A w/static/1.27.0-wmf.9/resources A w/static/1.27.0-wmf.9/skins 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/36/259336/1 diff --git a/w/static/1.27.0-wmf.9/extensions b/w/static/1.27.0-wmf.9/extensions new file mode 12 index 000..54bd541 --- /dev/null +++ b/w/static/1.27.0-wmf.9/extensions @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.9/extensions \ No newline at end of file diff --git a/w/static/1.27.0-wmf.9/resources b/w/static/1.27.0-wmf.9/resources new file mode 12 index 000..7a2f888 --- /dev/null +++ b/w/static/1.27.0-wmf.9/resources @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.9/resources \ No newline at end of file diff --git a/w/static/1.27.0-wmf.9/skins b/w/static/1.27.0-wmf.9/skins new file mode 12 index 000..3f6c9f6 --- /dev/null +++ b/w/static/1.27.0-wmf.9/skins @@ -0,0 +1 @@ +/srv/mediawiki/php-1.27.0-wmf.9/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/259336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd635bc5451d1bcfbf1f2849c4e42c720c21f35a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group0 to php-1.27.0-wmf.9 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/259337 Change subject: group0 to php-1.27.0-wmf.9 .. group0 to php-1.27.0-wmf.9 Change-Id: I77423893e915ed02f5403bc41566387b74340426 --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/37/259337/1 diff --git a/wikiversions.json b/wikiversions.json index 2fbc8d1..436f1e5 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Add hewiki and cawiki to group1 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257973 Change subject: Add hewiki and cawiki to group1 .. Add hewiki and cawiki to group1 Since processing of a dblist file stops after a line that beings with '%%', create a separate dblist for wikipedias that wish to be part of group1. Change-Id: Ia7bcbad043988274fcef24f147a40688570d3321 --- A dblists/group1-wikipedia.dblist M dblists/group1.dblist 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/73/257973/1 diff --git a/dblists/group1-wikipedia.dblist b/dblists/group1-wikipedia.dblist new file mode 100644 index 000..f0fdaed --- /dev/null +++ b/dblists/group1-wikipedia.dblist @@ -0,0 +1,2 @@ +hewiki +cawiki diff --git a/dblists/group1.dblist b/dblists/group1.dblist index 531f3d5..f79b86c 100644 --- a/dblists/group1.dblist +++ b/dblists/group1.dblist @@ -1,3 +1 @@ -%% all.dblist - group0.dblist - wikipedia.dblist -hewiki -cawiki +%% all.dblist - group0.dblist - wikipedia.dblist + group1-wikipedia.dblist -- To view, visit https://gerrit.wikimedia.org/r/257973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7bcbad043988274fcef24f147a40688570d3321 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hewiki and cawiki to php-1.27.0-wmf.8 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257977 Change subject: hewiki and cawiki to php-1.27.0-wmf.8 .. hewiki and cawiki to php-1.27.0-wmf.8 Change-Id: Ib7867825d5a2327c59f3cf5f4b74b8d49d01de77 --- M wikiversions.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/257977/1 diff --git a/wikiversions.json b/wikiversions.json index 2f760da..5837842 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] Submodule bump for Wikidata Submodule extensions/Wikidata a5... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/257930 Change subject: Submodule bump for Wikidata Submodule extensions/Wikidata a5d36c7..f6585e0: > Update Wikibase: .. Submodule bump for Wikidata Submodule extensions/Wikidata a5d36c7..f6585e0: > Update Wikibase: Change-Id: Ie60bb5a06d4e2b1f74530d7382eca852d4282742 --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/257930/1 diff --git a/extensions/Wikidata b/extensions/Wikidata index a5d36c7..f6585e0 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit a5d36c7f83ee3533eb85db9a1564952c805b1565 +Subproject commit f6585e0fd6708da86d67268fc340ac3475590876 -- To view, visit https://gerrit.wikimedia.org/r/257930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie60bb5a06d4e2b1f74530d7382eca852d4282742 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.8 Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] all wikis to 1.28.0-wmf.4 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/292420 Change subject: all wikis to 1.28.0-wmf.4 .. all wikis to 1.28.0-wmf.4 Change-Id: I6a7749eae3f5fd6abc95662b8af565b328a292d7 --- M wikiversions.json 1 file changed, 297 insertions(+), 297 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/20/292420/1 diff --git a/wikiversions.json b/wikiversions.json index 92ffef5..9741395 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1,39 +1,39 @@ { -"aawiki": "php-1.28.0-wmf.3", +"aawiki": "php-1.28.0-wmf.4", "aawikibooks": "php-1.28.0-wmf.4", "aawiktionary": "php-1.28.0-wmf.4", -"abwiki": "php-1.28.0-wmf.3", +"abwiki": "php-1.28.0-wmf.4", "abwiktionary": "php-1.28.0-wmf.4", -"acewiki": "php-1.28.0-wmf.3", +"acewiki": "php-1.28.0-wmf.4", "advisorywiki": "php-1.28.0-wmf.4", -"adywiki": "php-1.28.0-wmf.3", -"afwiki": "php-1.28.0-wmf.3", +"adywiki": "php-1.28.0-wmf.4", +"afwiki": "php-1.28.0-wmf.4", "afwikibooks": "php-1.28.0-wmf.4", "afwikiquote": "php-1.28.0-wmf.4", "afwiktionary": "php-1.28.0-wmf.4", -"akwiki": "php-1.28.0-wmf.3", +"akwiki": "php-1.28.0-wmf.4", "akwikibooks": "php-1.28.0-wmf.4", "akwiktionary": "php-1.28.0-wmf.4", -"alswiki": "php-1.28.0-wmf.3", +"alswiki": "php-1.28.0-wmf.4", "alswikibooks": "php-1.28.0-wmf.4", "alswikiquote": "php-1.28.0-wmf.4", "alswiktionary": "php-1.28.0-wmf.4", -"amwiki": "php-1.28.0-wmf.3", +"amwiki": "php-1.28.0-wmf.4", "amwikiquote": "php-1.28.0-wmf.4", "amwiktionary": "php-1.28.0-wmf.4", -"angwiki": "php-1.28.0-wmf.3", +"angwiki": "php-1.28.0-wmf.4", "angwikibooks": "php-1.28.0-wmf.4", "angwikiquote": "php-1.28.0-wmf.4", "angwikisource": "php-1.28.0-wmf.4", "angwiktionary": "php-1.28.0-wmf.4", -"anwiki": "php-1.28.0-wmf.3", +"anwiki": "php-1.28.0-wmf.4", "anwiktionary": "php-1.28.0-wmf.4", -"arbcom_dewiki": "php-1.28.0-wmf.3", -"arbcom_enwiki": "php-1.28.0-wmf.3", -"arbcom_fiwiki": "php-1.28.0-wmf.3", -"arbcom_nlwiki": "php-1.28.0-wmf.3", -"arcwiki": "php-1.28.0-wmf.3", -"arwiki": "php-1.28.0-wmf.3", +"arbcom_dewiki": "php-1.28.0-wmf.4", +"arbcom_enwiki": "php-1.28.0-wmf.4", +"arbcom_fiwiki": "php-1.28.0-wmf.4", +"arbcom_nlwiki": "php-1.28.0-wmf.4", +"arcwiki": "php-1.28.0-wmf.4", +"arwiki": "php-1.28.0-wmf.4", "arwikibooks": "php-1.28.0-wmf.4", "arwikimedia": "php-1.28.0-wmf.4", "arwikinews": "php-1.28.0-wmf.4", @@ -41,80 +41,80 @@ "arwikisource": "php-1.28.0-wmf.4", "arwikiversity": "php-1.28.0-wmf.4", "arwiktionary": "php-1.28.0-wmf.4", -"arzwiki": "php-1.28.0-wmf.3", -"astwiki": "php-1.28.0-wmf.3", +"arzwiki": "php-1.28.0-wmf.4", +"astwiki": "php-1.28.0-wmf.4", "astwikibooks": "php-1.28.0-wmf.4", "astwikiquote": "php-1.28.0-wmf.4", "astwiktionary": "php-1.28.0-wmf.4", -"aswiki": "php-1.28.0-wmf.3", +"aswiki": "php-1.28.0-wmf.4", "aswikibooks": "php-1.28.0-wmf.4", "aswikisource": "php-1.28.0-wmf.4", "aswiktionary": "php-1.28.0-wmf.4", "auditcomwiki": "php-1.28.0-wmf.4", -"avwiki": "php-1.28.0-wmf.3", +"avwiki": "php-1.28.0-wmf.4", "avwiktionary": "php-1.28.0-wmf.4", -"aywiki": "php-1.28.0-wmf.3", +"aywiki": "php-1.28.0-wmf.4", "aywikibooks": "php-1.28.0-wmf.4", "aywiktionary": "php-1.28.0-wmf.4", -"azbwiki": "php-1.28.0-wmf.3", -"azwiki": "php-1.28.0-wmf.3", +"azbwiki": "php-1.28.0-wmf.4", +"azwiki": "php-1.28.0-wmf.4", "azwikibooks": "php-1.28.0-wmf.4", "azwikiquote": "php-1.28.0-wmf.4", "azwikisource": "php-1.28.0-wmf.4", "azwiktionary": "php-1.28.0-wmf.4", -"barwiki": "php-1.28.0-wmf.3", -"bat_smgwiki": "php-1.28.0-wmf.3", -"bawiki": "php-1.28.0-wmf.3", +"barwiki": "php-1.28.0-wmf.4", +"bat_smgwiki": "php-1.28.0-wmf.4", +"bawiki": "php-1.28.0-wmf.4", "bawikibooks": "php-1.28.0-wmf.4", -"bclwiki": "php-1.28.0-wmf.3", +"bclwiki": "php-1.28.0-wmf.4", "bdwikimedia": "php-1.28.0-wmf.4", -"be_x_oldwiki": "php-1.28.0-wmf.3", +"be_x_oldwiki": "php-1.28.0-wmf.4", "betawikiversity": "php-1.28.0-wmf.4", -"bewiki": "php-1.28.0-wmf.3", +"bewiki": "php-1.28.0-wmf.4", "bewikibooks": "php-1.28.0-wmf.4", "bewikimedia": "php-1.28.0-wmf.4", "bewikiquote": "php-1.28.0-wmf.4", "bewikisource": "php-1.28.0-wmf.4", "bewiktionary": "php-1.28.0-wmf.4", -"bgwiki": "php-1.28.0-wmf.3", +"bgwiki": "php-1.28.0-wmf.4", "bgwikibooks": "php-1.28.0-wmf.4", "bgwikinews": "php-1.28.0-wmf.4", "bgwikiquote": "php-1.28.0-wmf.4", "bgwikisource": "php-1.28.0-wmf.4", "bgwiktionary": "php-1.28.0-wmf.4", -"bhwiki": "php-1.28.0-wmf.3", +"bhwiki":
[MediaWiki-commits] [Gerrit] group1 wikis to 1.28.0-wmf.5 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293427 Change subject: group1 wikis to 1.28.0-wmf.5 .. group1 wikis to 1.28.0-wmf.5 Change-Id: Ie01b55f93d5de5c8e1c41edba95424f4771f2d3f --- M php M wikiversions.json 2 files changed, 595 insertions(+), 595 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/27/293427/1 diff --git a/php b/php index c189251..f79be62 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.28.0-wmf.4 \ No newline at end of file +php-1.28.0-wmf.5 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index 30efcde..b558dce 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1,898 +1,898 @@ { "aawiki": "php-1.28.0-wmf.4", -"aawikibooks": "php-1.28.0-wmf.4", -"aawiktionary": "php-1.28.0-wmf.4", +"aawikibooks": "php-1.28.0-wmf.5", +"aawiktionary": "php-1.28.0-wmf.5", "abwiki": "php-1.28.0-wmf.4", -"abwiktionary": "php-1.28.0-wmf.4", +"abwiktionary": "php-1.28.0-wmf.5", "acewiki": "php-1.28.0-wmf.4", -"advisorywiki": "php-1.28.0-wmf.4", +"advisorywiki": "php-1.28.0-wmf.5", "adywiki": "php-1.28.0-wmf.4", "afwiki": "php-1.28.0-wmf.4", -"afwikibooks": "php-1.28.0-wmf.4", -"afwikiquote": "php-1.28.0-wmf.4", -"afwiktionary": "php-1.28.0-wmf.4", +"afwikibooks": "php-1.28.0-wmf.5", +"afwikiquote": "php-1.28.0-wmf.5", +"afwiktionary": "php-1.28.0-wmf.5", "akwiki": "php-1.28.0-wmf.4", -"akwikibooks": "php-1.28.0-wmf.4", -"akwiktionary": "php-1.28.0-wmf.4", +"akwikibooks": "php-1.28.0-wmf.5", +"akwiktionary": "php-1.28.0-wmf.5", "alswiki": "php-1.28.0-wmf.4", -"alswikibooks": "php-1.28.0-wmf.4", -"alswikiquote": "php-1.28.0-wmf.4", -"alswiktionary": "php-1.28.0-wmf.4", +"alswikibooks": "php-1.28.0-wmf.5", +"alswikiquote": "php-1.28.0-wmf.5", +"alswiktionary": "php-1.28.0-wmf.5", "amwiki": "php-1.28.0-wmf.4", -"amwikiquote": "php-1.28.0-wmf.4", -"amwiktionary": "php-1.28.0-wmf.4", +"amwikiquote": "php-1.28.0-wmf.5", +"amwiktionary": "php-1.28.0-wmf.5", "angwiki": "php-1.28.0-wmf.4", -"angwikibooks": "php-1.28.0-wmf.4", -"angwikiquote": "php-1.28.0-wmf.4", -"angwikisource": "php-1.28.0-wmf.4", -"angwiktionary": "php-1.28.0-wmf.4", +"angwikibooks": "php-1.28.0-wmf.5", +"angwikiquote": "php-1.28.0-wmf.5", +"angwikisource": "php-1.28.0-wmf.5", +"angwiktionary": "php-1.28.0-wmf.5", "anwiki": "php-1.28.0-wmf.4", -"anwiktionary": "php-1.28.0-wmf.4", +"anwiktionary": "php-1.28.0-wmf.5", "arbcom_dewiki": "php-1.28.0-wmf.4", "arbcom_enwiki": "php-1.28.0-wmf.4", "arbcom_fiwiki": "php-1.28.0-wmf.4", "arbcom_nlwiki": "php-1.28.0-wmf.4", "arcwiki": "php-1.28.0-wmf.4", "arwiki": "php-1.28.0-wmf.4", -"arwikibooks": "php-1.28.0-wmf.4", -"arwikimedia": "php-1.28.0-wmf.4", -"arwikinews": "php-1.28.0-wmf.4", -"arwikiquote": "php-1.28.0-wmf.4", -"arwikisource": "php-1.28.0-wmf.4", -"arwikiversity": "php-1.28.0-wmf.4", -"arwiktionary": "php-1.28.0-wmf.4", +"arwikibooks": "php-1.28.0-wmf.5", +"arwikimedia": "php-1.28.0-wmf.5", +"arwikinews": "php-1.28.0-wmf.5", +"arwikiquote": "php-1.28.0-wmf.5", +"arwikisource": "php-1.28.0-wmf.5", +"arwikiversity": "php-1.28.0-wmf.5", +"arwiktionary": "php-1.28.0-wmf.5", "arzwiki": "php-1.28.0-wmf.4", "astwiki": "php-1.28.0-wmf.4", -"astwikibooks": "php-1.28.0-wmf.4", -"astwikiquote": "php-1.28.0-wmf.4", -"astwiktionary": "php-1.28.0-wmf.4", +"astwikibooks": "php-1.28.0-wmf.5", +"astwikiquote": "php-1.28.0-wmf.5", +"astwiktionary": "php-1.28.0-wmf.5", "aswiki": "php-1.28.0-wmf.4", -"aswikibooks": "php-1.28.0-wmf.4", -"aswikisource": "php-1.28.0-wmf.4", -"aswiktionary": "php-1.28.0-wmf.4", -"auditcomwiki": "php-1.28.0-wmf.4", +"aswikibooks": "php-1.28.0-wmf.5", +"aswikisource": "php-1.28.0-wmf.5", +"aswiktionary": "php-1.28.0-wmf.5", +"auditcomwiki": "php-1.28.0-wmf.5", "avwiki": "php-1.28.0-wmf.4", -"avwiktionary": "php-1.28.0-wmf.4", +"avwiktionary": "php-1.28.0-wmf.5", "aywiki": "php-1.28.0-wmf.4", -"aywikibooks": "php-1.28.0-wmf.4", -"aywiktionary": "php-1.28.0-wmf.4", +"aywikibooks": "php-1.28.0-wmf.5", +"aywiktionary": "php-1.28.0-wmf.5", "azbwiki": "php-1.28.0-wmf.4", "azwiki": "php-1.28.0-wmf.4", -"azwikibooks": "php-1.28.0-wmf.4", -"azwikiquote": "php-1.28.0-wmf.4", -"azwikisource": "php-1.28.0-wmf.4", -"azwiktionary": "php-1.28.0-wmf.4", +"azwikibooks": "php-1.28.0-wmf.5", +"azwikiquote": "php-1.28.0-wmf.5", +"azwikisource": "php-1.28.0-wmf.5", +"azwiktionary": "php-1.28.0-wmf.5", "barwiki": "php-1.28.0-wmf.4", "bat_smgwiki": "php-1.28.0-wmf.4", "bawiki":
[MediaWiki-commits] [Gerrit] tilerator to scap3 deployment - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293518 Change subject: tilerator to scap3 deployment .. tilerator to scap3 deployment Change-Id: Ie5c239f78a991609e06d329d9b31d290bf496957 --- M hieradata/common/role/deployment.yaml M hieradata/common/scap/server.yaml M modules/tilerator/manifests/init.pp 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/293518/1 diff --git a/hieradata/common/role/deployment.yaml b/hieradata/common/role/deployment.yaml index bf59741..5b92a1e 100644 --- a/hieradata/common/role/deployment.yaml +++ b/hieradata/common/role/deployment.yaml @@ -91,9 +91,6 @@ checkout_submodules: true sentry/sentry: upstream: https://gerrit.wikimedia.org/r/operations/software/sentry - tilerator/deploy: -upstream: https://gerrit.wikimedia.org/r/maps/tilerator/deploy -checkout_submodules: true cassandra/logstash-logback-encoder: gitfat_enabled: true upstream: https://gerrit.wikimedia.org/r/operations/software/logstash-logback-encoder diff --git a/hieradata/common/scap/server.yaml b/hieradata/common/scap/server.yaml index 5530687..5387b08 100644 --- a/hieradata/common/scap/server.yaml +++ b/hieradata/common/scap/server.yaml @@ -56,6 +56,8 @@ kartotherian/deploy: {} + tilerator/deploy: {} + # cxserver is the ContentTranslation server. cxserver/deploy: repository: cxserver/deploy diff --git a/modules/tilerator/manifests/init.pp b/modules/tilerator/manifests/init.pp index a211c4a..4a7bff9 100644 --- a/modules/tilerator/manifests/init.pp +++ b/modules/tilerator/manifests/init.pp @@ -22,6 +22,7 @@ # So there will never be LVS or anything else than health check requests to # this port service::node { 'tilerator': +deployment => 'scap3', port => 6534, config => template('tilerator/config.yaml.erb'), no_workers => $::processorcount / 2, -- To view, visit https://gerrit.wikimedia.org/r/293518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5c239f78a991609e06d329d9b31d290bf496957 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Group0 to 1.28.0-wmf.5 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293148 Change subject: Group0 to 1.28.0-wmf.5 .. Group0 to 1.28.0-wmf.5 Change-Id: I3c3d35aba35d4ab628e719576e419376698a1d4b --- M wikiversions.json 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/48/293148/1 diff --git a/wikiversions.json b/wikiversions.json index 9741395..30efcde 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -478,7 +478,7 @@ "maiwiki": "php-1.28.0-wmf.4", "map_bmswiki": "php-1.28.0-wmf.4", "mdfwiki": "php-1.28.0-wmf.4", -"mediawikiwiki": "php-1.28.0-wmf.4", +"mediawikiwiki": "php-1.28.0-wmf.5", "metawiki": "php-1.28.0-wmf.4", "mgwiki": "php-1.28.0-wmf.4", "mgwikibooks": "php-1.28.0-wmf.4", @@ -745,9 +745,9 @@ "tawikisource": "php-1.28.0-wmf.4", "tawiktionary": "php-1.28.0-wmf.4", "tenwiki": "php-1.28.0-wmf.4", -"test2wiki": "php-1.28.0-wmf.4", -"testwiki": "php-1.28.0-wmf.4", -"testwikidatawiki": "php-1.28.0-wmf.4", +"test2wiki": "php-1.28.0-wmf.5", +"testwiki": "php-1.28.0-wmf.5", +"testwikidatawiki": "php-1.28.0-wmf.5", "tetwiki": "php-1.28.0-wmf.4", "tewiki": "php-1.28.0-wmf.4", "tewikibooks": "php-1.28.0-wmf.4", @@ -877,7 +877,7 @@ "zawikiquote": "php-1.28.0-wmf.4", "zawiktionary": "php-1.28.0-wmf.4", "zeawiki": "php-1.28.0-wmf.4", -"zerowiki": "php-1.28.0-wmf.4", +"zerowiki": "php-1.28.0-wmf.5", "zh_classicalwiki": "php-1.28.0-wmf.4", "zh_min_nanwiki": "php-1.28.0-wmf.4", "zh_min_nanwikibooks": "php-1.28.0-wmf.4", -- To view, visit https://gerrit.wikimedia.org/r/293148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c3d35aba35d4ab628e719576e419376698a1d4b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for I0109a93a41b0387199a0424b60a26a41539... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/292942 Change subject: Update VisualEditor for I0109a93a41b0387199a0424b60a26a415393bc5d .. Update VisualEditor for I0109a93a41b0387199a0424b60a26a415393bc5d Change-Id: Ief00df933bc90dff4e9c55064b83524870d52a08 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/292942/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 78f8120..d076ae2 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 78f81200912b79827b720bb7298bc67582003d28 +Subproject commit d076ae23f6d1c3707f56350db821042151de1b5c -- To view, visit https://gerrit.wikimedia.org/r/292942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief00df933bc90dff4e9c55064b83524870d52a08 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for I0109a93a41b0387199a0424b60a26a41539... - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/292944 Change subject: Update VisualEditor for I0109a93a41b0387199a0424b60a26a415393bc5d .. Update VisualEditor for I0109a93a41b0387199a0424b60a26a415393bc5d Change-Id: Ief00df933bc90dff4e9c55064b83524870d52a08 --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/292944/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 78f8120..d076ae2 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 78f81200912b79827b720bb7298bc67582003d28 +Subproject commit d076ae23f6d1c3707f56350db821042151de1b5c -- To view, visit https://gerrit.wikimedia.org/r/292944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief00df933bc90dff4e9c55064b83524870d52a08 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] all wikis to 1.28.0-wmf.5 - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293634 Change subject: all wikis to 1.28.0-wmf.5 .. all wikis to 1.28.0-wmf.5 Change-Id: Ie382e68a1253b252395f624d37fc3b4715374d71 --- M wikiversions.json 1 file changed, 297 insertions(+), 297 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/34/293634/1 diff --git a/wikiversions.json b/wikiversions.json index b558dce..ba0fe99 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1,39 +1,39 @@ { -"aawiki": "php-1.28.0-wmf.4", +"aawiki": "php-1.28.0-wmf.5", "aawikibooks": "php-1.28.0-wmf.5", "aawiktionary": "php-1.28.0-wmf.5", -"abwiki": "php-1.28.0-wmf.4", +"abwiki": "php-1.28.0-wmf.5", "abwiktionary": "php-1.28.0-wmf.5", -"acewiki": "php-1.28.0-wmf.4", +"acewiki": "php-1.28.0-wmf.5", "advisorywiki": "php-1.28.0-wmf.5", -"adywiki": "php-1.28.0-wmf.4", -"afwiki": "php-1.28.0-wmf.4", +"adywiki": "php-1.28.0-wmf.5", +"afwiki": "php-1.28.0-wmf.5", "afwikibooks": "php-1.28.0-wmf.5", "afwikiquote": "php-1.28.0-wmf.5", "afwiktionary": "php-1.28.0-wmf.5", -"akwiki": "php-1.28.0-wmf.4", +"akwiki": "php-1.28.0-wmf.5", "akwikibooks": "php-1.28.0-wmf.5", "akwiktionary": "php-1.28.0-wmf.5", -"alswiki": "php-1.28.0-wmf.4", +"alswiki": "php-1.28.0-wmf.5", "alswikibooks": "php-1.28.0-wmf.5", "alswikiquote": "php-1.28.0-wmf.5", "alswiktionary": "php-1.28.0-wmf.5", -"amwiki": "php-1.28.0-wmf.4", +"amwiki": "php-1.28.0-wmf.5", "amwikiquote": "php-1.28.0-wmf.5", "amwiktionary": "php-1.28.0-wmf.5", -"angwiki": "php-1.28.0-wmf.4", +"angwiki": "php-1.28.0-wmf.5", "angwikibooks": "php-1.28.0-wmf.5", "angwikiquote": "php-1.28.0-wmf.5", "angwikisource": "php-1.28.0-wmf.5", "angwiktionary": "php-1.28.0-wmf.5", -"anwiki": "php-1.28.0-wmf.4", +"anwiki": "php-1.28.0-wmf.5", "anwiktionary": "php-1.28.0-wmf.5", -"arbcom_dewiki": "php-1.28.0-wmf.4", -"arbcom_enwiki": "php-1.28.0-wmf.4", -"arbcom_fiwiki": "php-1.28.0-wmf.4", -"arbcom_nlwiki": "php-1.28.0-wmf.4", -"arcwiki": "php-1.28.0-wmf.4", -"arwiki": "php-1.28.0-wmf.4", +"arbcom_dewiki": "php-1.28.0-wmf.5", +"arbcom_enwiki": "php-1.28.0-wmf.5", +"arbcom_fiwiki": "php-1.28.0-wmf.5", +"arbcom_nlwiki": "php-1.28.0-wmf.5", +"arcwiki": "php-1.28.0-wmf.5", +"arwiki": "php-1.28.0-wmf.5", "arwikibooks": "php-1.28.0-wmf.5", "arwikimedia": "php-1.28.0-wmf.5", "arwikinews": "php-1.28.0-wmf.5", @@ -41,80 +41,80 @@ "arwikisource": "php-1.28.0-wmf.5", "arwikiversity": "php-1.28.0-wmf.5", "arwiktionary": "php-1.28.0-wmf.5", -"arzwiki": "php-1.28.0-wmf.4", -"astwiki": "php-1.28.0-wmf.4", +"arzwiki": "php-1.28.0-wmf.5", +"astwiki": "php-1.28.0-wmf.5", "astwikibooks": "php-1.28.0-wmf.5", "astwikiquote": "php-1.28.0-wmf.5", "astwiktionary": "php-1.28.0-wmf.5", -"aswiki": "php-1.28.0-wmf.4", +"aswiki": "php-1.28.0-wmf.5", "aswikibooks": "php-1.28.0-wmf.5", "aswikisource": "php-1.28.0-wmf.5", "aswiktionary": "php-1.28.0-wmf.5", "auditcomwiki": "php-1.28.0-wmf.5", -"avwiki": "php-1.28.0-wmf.4", +"avwiki": "php-1.28.0-wmf.5", "avwiktionary": "php-1.28.0-wmf.5", -"aywiki": "php-1.28.0-wmf.4", +"aywiki": "php-1.28.0-wmf.5", "aywikibooks": "php-1.28.0-wmf.5", "aywiktionary": "php-1.28.0-wmf.5", -"azbwiki": "php-1.28.0-wmf.4", -"azwiki": "php-1.28.0-wmf.4", +"azbwiki": "php-1.28.0-wmf.5", +"azwiki": "php-1.28.0-wmf.5", "azwikibooks": "php-1.28.0-wmf.5", "azwikiquote": "php-1.28.0-wmf.5", "azwikisource": "php-1.28.0-wmf.5", "azwiktionary": "php-1.28.0-wmf.5", -"barwiki": "php-1.28.0-wmf.4", -"bat_smgwiki": "php-1.28.0-wmf.4", -"bawiki": "php-1.28.0-wmf.4", +"barwiki": "php-1.28.0-wmf.5", +"bat_smgwiki": "php-1.28.0-wmf.5", +"bawiki": "php-1.28.0-wmf.5", "bawikibooks": "php-1.28.0-wmf.5", -"bclwiki": "php-1.28.0-wmf.4", +"bclwiki": "php-1.28.0-wmf.5", "bdwikimedia": "php-1.28.0-wmf.5", -"be_x_oldwiki": "php-1.28.0-wmf.4", +"be_x_oldwiki": "php-1.28.0-wmf.5", "betawikiversity": "php-1.28.0-wmf.5", -"bewiki": "php-1.28.0-wmf.4", +"bewiki": "php-1.28.0-wmf.5", "bewikibooks": "php-1.28.0-wmf.5", "bewikimedia": "php-1.28.0-wmf.5", "bewikiquote": "php-1.28.0-wmf.5", "bewikisource": "php-1.28.0-wmf.5", "bewiktionary": "php-1.28.0-wmf.5", -"bgwiki": "php-1.28.0-wmf.4", +"bgwiki": "php-1.28.0-wmf.5", "bgwikibooks": "php-1.28.0-wmf.5", "bgwikinews": "php-1.28.0-wmf.5", "bgwikiquote": "php-1.28.0-wmf.5", "bgwikisource": "php-1.28.0-wmf.5", "bgwiktionary": "php-1.28.0-wmf.5", -"bhwiki": "php-1.28.0-wmf.4", +"bhwiki":
[MediaWiki-commits] [Gerrit] Revert "Map dummy language codes in sites" - change (mediawiki/core)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293631 Change subject: Revert "Map dummy language codes in sites" .. Revert "Map dummy language codes in sites" This is causing duplicate English Wikipedia interwiki links. The second link is supposed to be for Simple English, but instead is linked to English Wikipedia. This reverts commit 1c1c74adef8a2f5597472e8c049010ff4d42ff64. Bug: T137404 Change-Id: Ibc1c53ec1b8e643b47ad52f38a8496acfb399d65 --- M includes/ServiceWiring.php M includes/site/DBSiteStore.php M includes/site/FileBasedSiteLookup.php M tests/phpunit/includes/site/DBSiteStoreTest.php M tests/phpunit/includes/site/FileBasedSiteLookupTest.php 5 files changed, 5 insertions(+), 68 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/293631/1 diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 338f306..b076d07 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -61,9 +61,6 @@ 'SiteStore' => function( MediaWikiServices $services ) { $rawSiteStore = new DBSiteStore( $services->getDBLoadBalancer() ); - $rawSiteStore->setLanguageCodeMapping( - $services->getMainConfig()->get( 'DummyLanguageCodes' ) ?: [] - ); // TODO: replace wfGetCache with a CacheFactory service. // TODO: replace wfIsHHVM with a capabilities service. diff --git a/includes/site/DBSiteStore.php b/includes/site/DBSiteStore.php index c1c10c2..974789f 100644 --- a/includes/site/DBSiteStore.php +++ b/includes/site/DBSiteStore.php @@ -41,11 +41,6 @@ private $dbLoadBalancer; /** -* @var string[] -*/ - private $languageCodeMapping = []; - - /** * @since 1.27 * * @todo: inject some kind of connection manager that is aware of the target wiki, @@ -101,17 +96,15 @@ ); foreach ( $res as $row ) { - $languageCode = $row->site_language === '' ? null : $row->site_language; - if ( isset( $this->languageCodeMapping[ $languageCode ] ) ) { - $languageCode = $this->languageCodeMapping[ $languageCode ]; - } - $site = Site::newForType( $row->site_type ); $site->setGlobalId( $row->site_global_key ); $site->setInternalId( (int)$row->site_id ); $site->setForward( (bool)$row->site_forward ); $site->setGroup( $row->site_group ); - $site->setLanguageCode( $languageCode ); + $site->setLanguageCode( $row->site_language === '' + ? null + : $row->site_language + ); $site->setSource( $row->site_source ); $site->setExtraData( unserialize( $row->site_data ) ); $site->setExtraConfig( unserialize( $row->site_config ) ); @@ -292,15 +285,6 @@ $this->reset(); return $ok; - } - - /** -* Provide an array that maps language codes -* -* @param string[] $newMapping -*/ - public function setLanguageCodeMapping( array $newMapping ) { - $this->languageCodeMapping = $newMapping; } } diff --git a/includes/site/FileBasedSiteLookup.php b/includes/site/FileBasedSiteLookup.php index 424d8e6..9654440 100644 --- a/includes/site/FileBasedSiteLookup.php +++ b/includes/site/FileBasedSiteLookup.php @@ -43,11 +43,6 @@ private $cacheFile; /** -* @var string[] -*/ - private $languageCodeMapping = []; - - /** * @param string $cacheFile */ public function __construct( $cacheFile ) { @@ -123,18 +118,13 @@ * @return Site */ private function newSiteFromArray( array $data ) { - $languageCode = $data['language']; - if ( isset( $this->languageCodeMapping[ $languageCode ] ) ) { - $languageCode = $this->languageCodeMapping[ $languageCode ]; - } - $siteType = array_key_exists( 'type', $data ) ? $data['type'] : Site::TYPE_UNKNOWN; $site = Site::newForType( $siteType ); $site->setGlobalId( $data['globalid'] ); $site->setForward( $data['forward'] ); $site->setGroup( $data['group'] ); - $site->setLanguageCode( $languageCode ); + $site->setLanguageCode( $data['language'] ); $site->setSource( $data['source'] ); $site->setExtraData( $data['data'] ); $site->setExtraConfig(
[MediaWiki-commits] [Gerrit] Deploy Graphoid with Scap3 - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/294357 Change subject: Deploy Graphoid with Scap3 .. Deploy Graphoid with Scap3 Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0 --- M hieradata/common/role/deployment.yaml M hieradata/common/scap/server.yaml M modules/graphoid/manifests/init.pp 3 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/294357/1 diff --git a/hieradata/common/role/deployment.yaml b/hieradata/common/role/deployment.yaml index 5b92a1e..94f5135 100644 --- a/hieradata/common/role/deployment.yaml +++ b/hieradata/common/role/deployment.yaml @@ -44,10 +44,6 @@ service_name: zotero zotero/translators: upstream: https://gerrit.wikimedia.org/r/mediawiki/services/zotero/translators - graphoid/deploy: -upstream: https://gerrit.wikimedia.org/r/mediawiki/services/graphoid/deploy -service_name: graphoid -checkout_submodules: true rcstream/rcstream: upstream: https://gerrit.wikimedia.org/r/mediawiki/services/rcstream service_name: rcstream diff --git a/hieradata/common/scap/server.yaml b/hieradata/common/scap/server.yaml index 5387b08..c9579c0 100644 --- a/hieradata/common/scap/server.yaml +++ b/hieradata/common/scap/server.yaml @@ -55,8 +55,8 @@ mobileapps/deploy: {} kartotherian/deploy: {} - tilerator/deploy: {} + graphoid/deploy: {} # cxserver is the ContentTranslation server. cxserver/deploy: diff --git a/modules/graphoid/manifests/init.pp b/modules/graphoid/manifests/init.pp index c00bd24..652f526 100644 --- a/modules/graphoid/manifests/init.pp +++ b/modules/graphoid/manifests/init.pp @@ -48,6 +48,7 @@ }, has_spec=> true, healthcheck_url => '', +deployment => 'scap3', } } -- To view, visit https://gerrit.wikimedia.org/r/294357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use master DB when touching the user to signal rename end - change (mediawiki...Renameuser)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/293383 Change subject: Use master DB when touching the user to signal rename end .. Use master DB when touching the user to signal rename end Since the user object is updated in the process of the rename, fetching from a lagged slave might result in and outdated user_touched value and thus a CAS error. Bug: T135656 Change-Id: I14e3615ccbcabfdf0dcbf7c098eb0e152ec4a18a (cherry picked from commit 2c9b3f10e2d40df9e3b9b90cd67b159526886a93) --- M RenameuserSQL.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Renameuser refs/changes/83/293383/1 diff --git a/RenameuserSQL.php b/RenameuserSQL.php index 3112490..12c1a69 100755 --- a/RenameuserSQL.php +++ b/RenameuserSQL.php @@ -341,6 +341,7 @@ $dbw->setFlag( DBO_TRX ); // Clear caches and inform authentication plugins $user = User::newFromId( $that->uid ); + $user->load( User::READ_LATEST ); // Call $wgAuth for backwards compatibility if ( class_exists( AuthManager::class ) ) { AuthManager::callLegacyAuthPlugin( 'updateExternalDB', [ $user ] ); -- To view, visit https://gerrit.wikimedia.org/r/293383 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14e3615ccbcabfdf0dcbf7c098eb0e152ec4a18a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Renameuser Gerrit-Branch: wmf/1.28.0-wmf.5 Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Group0 to 1.28.0-wmf.4" - change (operations/mediawiki-config)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/292027 Change subject: Revert "Group0 to 1.28.0-wmf.4" .. Revert "Group0 to 1.28.0-wmf.4" This reverts commit d9b69bb25278cf5b0c6508463a7477c656f19d8f. Change-Id: Ie94cfdc1bb5446b8782e50d93e6a74837797b360 --- M wikiversions.json 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/27/292027/1 diff --git a/wikiversions.json b/wikiversions.json index f370c3d..ec1fc8b 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -478,7 +478,7 @@ "maiwiki": "php-1.28.0-wmf.3", "map_bmswiki": "php-1.28.0-wmf.3", "mdfwiki": "php-1.28.0-wmf.3", -"mediawikiwiki": "php-1.28.0-wmf.4", +"mediawikiwiki": "php-1.28.0-wmf.3", "metawiki": "php-1.28.0-wmf.3", "mgwiki": "php-1.28.0-wmf.3", "mgwikibooks": "php-1.28.0-wmf.3", @@ -745,9 +745,9 @@ "tawikisource": "php-1.28.0-wmf.3", "tawiktionary": "php-1.28.0-wmf.3", "tenwiki": "php-1.28.0-wmf.3", -"test2wiki": "php-1.28.0-wmf.4", -"testwiki": "php-1.28.0-wmf.4", -"testwikidatawiki": "php-1.28.0-wmf.4", +"test2wiki": "php-1.28.0-wmf.3", +"testwiki": "php-1.28.0-wmf.3", +"testwikidatawiki": "php-1.28.0-wmf.3", "tetwiki": "php-1.28.0-wmf.3", "tewiki": "php-1.28.0-wmf.3", "tewikibooks": "php-1.28.0-wmf.3", @@ -877,7 +877,7 @@ "zawikiquote": "php-1.28.0-wmf.3", "zawiktionary": "php-1.28.0-wmf.3", "zeawiki": "php-1.28.0-wmf.3", -"zerowiki": "php-1.28.0-wmf.4", +"zerowiki": "php-1.28.0-wmf.3", "zh_classicalwiki": "php-1.28.0-wmf.3", "zh_min_nanwiki": "php-1.28.0-wmf.3", "zh_min_nanwikibooks": "php-1.28.0-wmf.3", -- To view, visit https://gerrit.wikimedia.org/r/292027 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie94cfdc1bb5446b8782e50d93e6a74837797b360 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits