Difference between revisions of "TheSchwartz Setup"

From Dreamwidth Notes
Jump to: navigation, search
m (categorize)
Line 1: Line 1:
 +
{{Expand|text=What jobs need to be run?+
 +
 
To run any jobs that require queueing, such as the journal content importer and the sending of email (if you have email set up to send through TheSchwartz), you'll need to set up TheSchwartz. This requires that you set up the database and define it in <code>etc/config-local.pl</code>.
 
To run any jobs that require queueing, such as the journal content importer and the sending of email (if you have email set up to send through TheSchwartz), you'll need to set up TheSchwartz. This requires that you set up the database and define it in <code>etc/config-local.pl</code>.
  
Line 40: Line 42:
  
 
The initial setup of TheSchwartz is now complete. To actually *use* TheSchwartz you'll need to run the worker for whatever jobs you need, and in the case of the importer you'll need to run the import scheduler too. More information on using the importer can be found at [[Importer Testing]].
 
The initial setup of TheSchwartz is now complete. To actually *use* TheSchwartz you'll need to run the worker for whatever jobs you need, and in the case of the importer you'll need to run the import scheduler too. More information on using the importer can be found at [[Importer Testing]].
 +
 +
{{Note|text=Until this guide is better filled out, a lot of stuff can be run with <tt>$LJHOME/bin/worker-manager --debug</tt>}}
  
 
[[Category: Dreamwidth Installation]]
 
[[Category: Dreamwidth Installation]]

Revision as of 18:47, 8 March 2009

{{Expand|text=What jobs need to be run?+

To run any jobs that require queueing, such as the journal content importer and the sending of email (if you have email set up to send through TheSchwartz), you'll need to set up TheSchwartz. This requires that you set up the database and define it in etc/config-local.pl.

In etc/config-local.pl, find the following block of code:

    # Schwartz DB configuration
    @THESCHWARTZ_DBS = (
            {
                dsn => 'dbi:mysql:dw_schwartz;host=localhost',
                user => 'dw',
                pass => $DW::PRIVATE::THESCHWARTZ_DBS{pass},
            },
        );

In this block of code, dw_schwartz represents the database name used by TheSchwartz, and dw represents the username. If you wish, you can change these to different values - but it's probably best not to use the same database as your main Dreamwidth installation uses, just in case.

(The rest of this page assumes that you're not changing these values.)

You first need to create the database. Run the following two commands, changing databasepass to whatever password you wish, and entering the MySQL root password when prompted:

echo "create database dw_schwartz" | mysql -uroot -p
echo "grant all on dw_schwartz.* to 'dw'@'localhost' identified by 'databasepass'" | mysql -uroot -p

Then, initialise the database, again entering the MySQL root password when prompted:

mysql -uroot -p dw_schwartz < $LJHOME/cvs/TheSchwartz/doc/schema.sql

Finally, edit etc/config-private.pl, uncomment the %THESCHWARTZ_DBS block, and enter your database password before the comma, in single quotes:

    %THESCHWARTZ_DBS = (
        pass => 'databasepass',
    );

The initial setup of TheSchwartz is now complete. To actually *use* TheSchwartz you'll need to run the worker for whatever jobs you need, and in the case of the importer you'll need to run the import scheduler too. More information on using the importer can be found at Importer Testing.

Note: Until this guide is better filled out, a lot of stuff can be run with $LJHOME/bin/worker-manager --debug