Building DAQ-PROD on a Mercury system

This page describes how to checkout, build and deploy the DAQ-PROD meta-project as well as prepare to view portlets in the Portlet Harness. You must have a working and current Mercury system before you proceede.

  1. Create a workspace for DAQ-PROD
  2. Checkout and build DAQ-PROD
  3. Start/Stop JBoss
  4. Initialize the Hypersonic DB
  5. Remap component names
  6. Deploy/Undeploy DAQ-PROD
  7. DAQ-Control Webiface

  1. Create a workspace for DAQ-PROD
  2. Create a new dir for the DAQ-PROD workspace (so it doesn't conflict with other bfd/cvs projects you may be working on) and get set up to use it:

      $ mkdir DAQ-PROD_0231_ws
      $ cd DAQ-PROD_0231_ws
      $ bfd init $ICECUBE_TOOLS
      $ source        # or setup.csh if you use a csh-derived shell

  3. Checkout and build DAQ-PROD
  4. I assume you are running ssh-agent and loaded it with a key which your account on glacier trusts, as described here, though not specific to glacier.

      $ bfd co -r V00-03-21 DAQ-PROD
      $ ant -q lib.all

  5. Start/Stop JBoss
  6. To start JBoss on a merc system, open another terminal window and run the following command:

      $ jboss

    This will present the console.log to your terminal. The jmx-console can then be viewed at http://localhost:8080/jmx-console

    To stop JBoss run the following command in a different (the first) terminal window:

      $ nojboss

    If you accidentally start JBoss twice on your machine, the second one will complain because the first one is "in it's way". Use the ps command to find the process id of the JBoss processes and then use the kill command to stop them. Then start JBoss using the above jboss command.

  7. Initialize the Hypersonic DB
  8. With JBoss running (so the Hypersonic DB is running) run the program. From the top of your DAQ-PROD workspace:

      $ ./daq-db-init/

    If you see SQLExceptions, try running the command again, it should run without any errors.

    Strictly speaking, this is only needed if one of the *.sql files have been modified since the last time you initialized the DB. It doesn't hurt to re-initialize it, so feel free to do it if you have any doubt.

  9. Remap the components to hostnames
  10. This will reset some records in the database to better reflect the components and hostnames currently being worked on.

      $ cd DAQ-PROD/deployment/merc
      $ ./

    As with the daq-db-init script above, this one will not return any info if it was successful.

  11. Deploy/Undeploy DAQ-PROD
  12. To deploy DAQ-PROD into your JBoss deployment dir, use the script which is in the DAQ-PROD/deployment/merc dir. From the top of your DAQ-PROD workspace:

      $ ./ -tq

    The running JBoss will see the daq.ear file deployed into it's deploy directory and you should see the deployment of DAQ-PROD in your JBoss' console output.

    To undeploy use the -u flag of the script:

      $ -tqu

    The running JBoss will detect the removal of the daq.ear file and undeploy DAQ-PROD. Monitoring your deploy directory can be helpful in seeing what is (or is not) getting un/deployed.

    There are other useful flags which the script understands. Run with the -h flag to list them. Of note is the -r flag which will let you specify a single (or multiple components if specified more than once) to limit the re-building of all the components. Nice if you've only modified one of them and don't need to rebuild all the others.

  13. DAQ-Control Webiface
  14. To use the daq-control webiface interface to your DAQ-PROD build, drop this webiface .war file into your deployment dir and point your web browser at http://localhost:8080/daq-webiface

This page maintained by Keith Beattie
Page last modified: