IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 242 and Version 243 of ippToPsps


Ignore:
Timestamp:
Apr 3, 2012, 9:17:29 AM (14 years ago)
Author:
rhenders
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ippToPsps

    v242 v243  
    256256== setupScratchDb.py ==
    257257
    258 This program simply sets up a scratch database ready for processing. Details of it's use can be found [wiki:ippToPsps#Settingupaloadingmachine here].
    259 
    260 
    261 = Setting up a loading machine =
    262 
    263 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}}}.
    264 
    265 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}}}:
    266 
    267 {{{
    268 /var/lib/mysql
    269 }}}
    270 
    271 was moved to:
    272 
    273 {{{
    274 /export/ipp005.0/mysql
    275 }}}
    276 
    277 In addition, it is prudent to decrease the default MySQL log-retention period from 90 days to 1 day. This is done is in
    278 
    279 {{{
    280 /etc/mysql/my.cnf
    281 }}}
    282 
    283 on the line
    284 
    285 {{{
    286 expire_logs_days                                = 90
    287 }}}
    288 
    289 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.
    290 
    291 {{{
    292 GRANT ALL PRIVILEGES ON *.* TO 'ipp'@'localhost' IDENTIFIED BY 'ipp' WITH GRANT OPTION;
    293 }}}
    294 
    295 Now disconnect then reconnect as {{{ipp}}} and create the scratch database.
    296 
    297 {{{
    298 CREATE DATABASE ipptopsps_scratch;
    299 }}}
    300 
    301 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:
    302 
    303 {{{
    304 ./run.sh setupScratchDb.py someConfig nameOfScratchDb
    305 }}}
    306 
    307 The choice of config here is not important, so use any.
    308 
    309 At the time of writing, scratch databases are set up on the following IPP hosts:
    310 
    311 {{{
    312 ipp005
    313 ipp006
    314 ipp007
    315 ipp033
    316 ipp034
    317 ipp045
    318 }}}
    319 
    320 {{{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.)
    321 
    322 
    323 
    324 
    325 
    326 
     258This program simply sets up a scratch database ready for processing. Details of it's use can be found [wiki:ippToPsps_ScratchDatabase#Settingupaloadingmachine here].
    327259
    328260