Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/59981
Change subject: Set MPLCONFIGDIR env var for Matplotlib
......................................................................
Set MPLCONFIGDIR env var for Matplotlib
matplotlib attempts to write configuration data to MPLCONFIGDIR, which is
currently unset. This change adds it as a class parameter and instructs Puppet
to ensure the directory exist.
Change-Id: Ib34147cf8befd8bfcd81a57c2b211942d37cd286
---
M modules/eventlogging/manifests/notebook.pp
M modules/eventlogging/templates/notebook.conf.erb
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/81/59981/1
diff --git a/modules/eventlogging/manifests/notebook.pp
b/modules/eventlogging/manifests/notebook.pp
index c28161a..36e9d74 100644
--- a/modules/eventlogging/manifests/notebook.pp
+++ b/modules/eventlogging/manifests/notebook.pp
@@ -33,6 +33,7 @@
$ipython_dir = '/var/lib/ipython',
$ipython_profile = 'nbserver',
$ipython_user = 'ipython',
+ $graph_dir = '/var/lib/ipython/graphs',
$notebook_dir = '/var/lib/ipython/notebooks',
$notebook_ip = '*',
$notebook_port = 8888,
@@ -63,6 +64,14 @@
require => Systemuser[$ipython_user],
}
+ file { $graph_dir:
+ ensure => directory,
+ owner => $ipython_user,
+ group => $ipython_user,
+ mode => '0664',
+ require => Systemuser[$ipython_user],
+ }
+
exec { "Create IPython profile ${ipython_profile}":
command => "/usr/bin/ipython profile create
${ipython_profile} --ipython-dir=\"${ipython_dir}\"",
creates => "${ipython_dir}/profile_${ipython_profile}",
@@ -82,7 +91,7 @@
file { '/etc/supervisor/conf.d/notebook.conf':
content => template('eventlogging/notebook.conf.erb'),
- require => [ Package['ipython-notebook'], File[$notebook_dir] ],
+ require => [ Package['ipython-notebook'], File[$notebook_dir],
File[$graph_dir] ],
notify => Service['supervisor'],
mode => '0444',
}
diff --git a/modules/eventlogging/templates/notebook.conf.erb
b/modules/eventlogging/templates/notebook.conf.erb
index 89ddff2..e90b128 100644
--- a/modules/eventlogging/templates/notebook.conf.erb
+++ b/modules/eventlogging/templates/notebook.conf.erb
@@ -8,4 +8,4 @@
redirect_stderr = true
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = NONE
-environment = IPYTHONDIR=<%= ipython_dir %>
+environment = IPYTHONDIR=<%= ipython_dir %>,MPLCONFIGDIR=<%= graph_dir %>
--
To view, visit https://gerrit.wikimedia.org/r/59981
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib34147cf8befd8bfcd81a57c2b211942d37cd286
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits