Faidon Liambotis has submitted this change and it was merged.

Change subject: contint: hourly auto update of wikimedia packages
......................................................................


contint: hourly auto update of wikimedia packages

Debian has a system to automatically upgrade packages on a daily basis.
On labs that is only enabled for security updates.

* Craft an apt configuration to allow automatic upgrading of
  '-wikimedia packages.
* Reduce the random sleep() from 30 minutes to 5 minutes since we run
  the updates more often.
* Link the daily apt cronjob to be run hourly.

Should cause hhvm to be updated automatically on CI slaves.

Change-Id: Ib3f2b4c63ca232058132ec970a9cde2f7ce1790e
---
M modules/contint/manifests/packages/labs.pp
1 file changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/contint/manifests/packages/labs.pp 
b/modules/contint/manifests/packages/labs.pp
index 5956c2c..40b51b1 100644
--- a/modules/contint/manifests/packages/labs.pp
+++ b/modules/contint/manifests/packages/labs.pp
@@ -9,6 +9,26 @@
     # Fonts needed for browser tests screenshots (bug 69535)
     include mediawiki::packages::fonts
 
+    # Self update the wikimedia packages (such as hhvm) on an hourly basis
+    include apt::unattendedupgrades
+
+    apt::conf { 'unattended-upgrades-wikimedia':
+        priority => '51',
+        key      => 'Unattended-Upgrade::Allowed-Origins',
+        value    => 'Wikimedia:${distro_codename}-wikimedia',
+    }
+    apt::conf { 'lower-periodic-randomsleep':
+        priority => '51',
+        key      => 'APT::Periodic::RandomSleep',
+        value    => '300',
+    }
+
+    file { '/etc/cron.hourly/apt':
+        ensure  => link,
+        target  => '/etc/cron.daily/apt',
+        require => Package['unattended-upgrades'],
+    }
+
     # Shell script wrappers to ease package building
     # Package generated via the mirror operations/debs/jenkins-debian-glue.git
 

-- 
To view, visit https://gerrit.wikimedia.org/r/183019
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3f2b4c63ca232058132ec970a9cde2f7ce1790e
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to