| | 12 | |
| | 13 | == Setting up a loading machine == |
| | 14 | |
| | 15 | Each instance of {{{loader.py}}} uses a 'scratch' MySQL database on {{{localhost}}} while processing. So, to do any loading, a local MySQL server should be up-and-running with a database created as the {{{ipp}}} user for use by {{{ippToPsps}}}. The default name for this is {{{ipptopsps_scratch}}}. |
| | 16 | |
| | 17 | Because {{{ippToPsps}}} uses this local database as a scratch database, there are large number of inserts and deletions, meaning large log files. For this reason, it is important to configure MySQL to store its data on a local partition, and not {{{/var}}} as is the default. For example, on {{{ipp005}}}: |
| | 18 | |
| | 19 | {{{ |
| | 20 | /var/lib/mysql |
| | 21 | }}} |
| | 22 | |
| | 23 | was moved to: |
| | 24 | |
| | 25 | {{{ |
| | 26 | /export/ipp005.0/mysql |
| | 27 | }}} |
| | 28 | |
| | 29 | In addition, it is prudent to decrease the default MySQL log-retention period from 90 days to 1 day. This is done is in |
| | 30 | |
| | 31 | {{{ |
| | 32 | /etc/mysql/my.cnf |
| | 33 | }}} |
| | 34 | |
| | 35 | on the line |
| | 36 | |
| | 37 | {{{ |
| | 38 | expire_logs_days = 90 |
| | 39 | }}} |
| | 40 | |
| | 41 | You will need (if it is not done already) to create an {{{ipp}}} user. Connect to the local MySQL server as root then to the following. |
| | 42 | |
| | 43 | {{{ |
| | 44 | GRANT ALL PRIVILEGES ON *.* TO 'ipp'@'localhost' IDENTIFIED BY 'ipp' WITH GRANT OPTION; |
| | 45 | }}} |
| | 46 | |
| | 47 | Now disconnect then reconnect as {{{ipp}}} and create the scratch database. |
| | 48 | |
| | 49 | {{{ |
| | 50 | CREATE DATABASE ipptopsps_scratch; |
| | 51 | }}} |
| | 52 | |
| | 53 | Finally, you need to setup the scratch database with the initialization tables and stored procedures necessary for processing. To do this, use the {{{setupScratchDb.py}}} program, like this: |
| | 54 | |
| | 55 | {{{ |
| | 56 | ./run.sh setupScratchDb.py someConfig nameOfScratchDb |
| | 57 | }}} |
| | 58 | |
| | 59 | The choice of config here is not important, so use any. |
| | 60 | |
| | 61 | At the time of writing, scratch databases are set up on the following IPP hosts: |
| | 62 | |
| | 63 | {{{ |
| | 64 | ipp005 |
| | 65 | ipp006 |
| | 66 | ipp007 |
| | 67 | ipp033 |
| | 68 | ipp034 |
| | 69 | ipp045 |
| | 70 | }}} |
| | 71 | |
| | 72 | {{{ipp005}}} and {{{ipp045}}} in fact have ''three'' scratch databases each, so three clients can potentially be run on these machines. This is particularly useful on {{{ipp005}}} as this is where the DVO databases are currently stored, so clients running on the same machine have a much higher throughput. ({{{ipp045}}} used to host a backup 3pi DVO database.) |
| | 73 | |
| | 74 | |