Page MenuHomePhabricator

Add environment configuration file
Closed, ResolvedPublic

Description

There are three commits in wsexport production that do not exist in the codebase we've been working from.

commit 1801ceafc3a0b02e3455aea93a14cb906e4af5bf
Author: tools.wsexport <tools.wsexport@tools-sgebastion-07.tools.eqiad.wmflabs>
Date:   Tue Mar 26 17:10:45 2019 +0000

    Avoids using grid for Calibre calls

commit c39e0120f052fdb9882296062810c93eb90ac641
Author: tools.wsexport <tools.wsexport@tools-bastion-03.tools.eqiad.wmflabs>
Date:   Wed Apr 19 12:46:27 2017 +0000

    Ignore calibre stdout outputs

commit 35425a109242be251bb1656eccbeac836221f27b
Author: tools.wsexport <tools.wsexport@tools-bastion-03.tools.eqiad.wmflabs>
Date:   Wed Jun 29 19:55:03 2016 +0000

    Set ebook-converter config

The diff between the last common commit and master-in-production is:

tools.wsexport@tools-sgebastion-07:~/tool$ git diff 0597fc2cc HEAD
diff --git a/http/book.php b/http/book.php
index 2c56961..4dc1311 100644
--- a/http/book.php
+++ b/http/book.php
@@ -1,6 +1,9 @@
 <?php
 $wsexportConfig = [
-       'basePath' => '..', 'tempPath' => __DIR__ . '/../temp', 'stat' => true
+       'basePath' => '..',
+       'tempPath' => __DIR__ . '/../temp',
+       'stat' => true,
+       'ebook-convert' => 'xvfb-run -a ebook-convert'
 ];
 
 include_once __DIR__ . '/../book/init.php';

i.e. it changes the ebook-convert command to xvfb-run -a ebook-convert.

This customization should happen in an instillation-specific config file. We should add such a thing.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Merged and deployed to staging and (after verification) to production, where I added in the above custom xvfb-run -a ebook-convert command to the new config.php file. I moved the old production deployment directory and reinstalled a fresh copy, just to be sure that we're getting the same code as everywhere else.

Everything seems to be functioning correctly. The only QA here is to see if anything's broken (beyond normal).

Only thing I noticed in doing this was that the logs are kept in the temp/ directory, but they're not really temporary. I've opened https://github.com/wsexport/tool/issues/168 to track this (it'll probably never come up again, so it's not exactly high priority).

dom_walden subscribed.

Everything seems to be functioning correctly. The only QA here is to see if anything's broken (beyond normal).

I have exported a few different ebooks, including one in each of the formats. They appear to be created OK.