Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319700

Change subject: statistics: Bring in R debs from upstream
......................................................................

statistics: Bring in R debs from upstream

Bug: T149949
Change-Id: Ief13e4d7e9652ee1e0da090559b32626e5e4c8fc
---
A modules/statistics/files/r-debs.gpg
M modules/statistics/manifests/packages.pp
A modules/statistics/manifests/r.pp
3 files changed, 32 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/319700/1

diff --git a/modules/statistics/files/r-debs.gpg 
b/modules/statistics/files/r-debs.gpg
new file mode 100644
index 0000000..4c7aa5f
--- /dev/null
+++ b/modules/statistics/files/r-debs.gpg
Binary files differ
diff --git a/modules/statistics/manifests/packages.pp 
b/modules/statistics/manifests/packages.pp
index 092ada3..f67d7ec 100644
--- a/modules/statistics/manifests/packages.pp
+++ b/modules/statistics/manifests/packages.pp
@@ -5,6 +5,7 @@
     include mysql
     include geoip
     include ::imagemagick::install
+    include ::statistics::r
 
     ensure_packages([
         'emacs23',
@@ -83,14 +84,6 @@
         'libcairo2',
         'libcairo2-dev',
         'libxt-dev'
-    ])
-
-    # R packages
-    ensure_packages([
-        'r-base',
-        'r-base-dev',      # Needed for R packages that have to compile C++ 
code; see T147682
-        'r-cran-rmysql',
-        'r-recommended'    # CRAN-recommended packages (e.g. MASS, Matrix, 
boot)
     ])
 
     # spell checker/dictionary packages for research (halfak)
diff --git a/modules/statistics/manifests/r.pp 
b/modules/statistics/manifests/r.pp
new file mode 100644
index 0000000..45719a7
--- /dev/null
+++ b/modules/statistics/manifests/r.pp
@@ -0,0 +1,31 @@
+# = Class: statistics::r
+#
+# Sets up R from upstream for statistics users
+class statistics::r {
+    apt::repository { 'cran-rstudio':
+        uri        => 'http://cran.rstudio.com/bin/linux/debian',
+        dist       => 'jessie-cran3',
+        source     => false,
+        keyfile    => 'puppet:///modules/statistics/r-debs.gpg',
+    }
+
+    $proxy_ensure = $proxy ? {
+        undef   => 'absent',
+        default => 'present'
+    }
+
+    apt::conf { 'cran-org-proxy':
+        ensure   => $proxy_ensure,
+        priority => '80',
+        key      => 'Acquire::http::Proxy::cran.rstudio.com',
+        value    => $proxy,
+    }
+
+    ensure_packages([
+        'r-base',
+        'r-base-dev',      # Needed for R packages that have to compile C++ 
code; see T147682
+        'r-cran-rmysql',
+        'r-recommended'    # CRAN-recommended packages (e.g. MASS, Matrix, 
boot)
+    ])
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief13e4d7e9652ee1e0da090559b32626e5e4c8fc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <yuvipa...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to