Version 3

    These instructions have been deprecated with the release of Nukes 1.1.

     

    -


    As of the Nukes 1.0 release, setting up the database that backs Nukes is a bit problematic. There is an installer that comes with Nukes that sets up a data source and tables, but it does not work consistently.

     

    The Nukes database is currently defined for MySQL, Hypersonic (HSQLDB) and Postgres. The database setup is done through running DDL against your database. The DDL is created through the main Nukes build process, and there is (potentially) DDL for each module. Here are the steps to get things running.

     

    • After unzipping the distribution, your distribution folder/directory will have a list of directories that are the modules of Nukes. Go to the build directory.

    • Make sure you have JBOSS_HOME set to your local JBoss 3.2.3 installation.

    • Run build in the build directory. This makes all of Nukes.

    • Set your database type in the local.properties file generated in the build directory. The line will look like:

    # Nukes target database, for now : hsqldb, mysql, postgresql are the possible values
    nukes.database=postgresql
    
    • After the build completes, you will have output directories under each module directory, ie.

    unzippedRoot
    + bb      (a module)
    ++ output
    +++ resources
    ++++ hsqldb
    ++++ mysql
    ++++ postgresql
    

    Within the lowest level directories outlined above, there is a setup.ddl that creates the database tables for the given module.

    • Create a new database

    • For MySQL, run prepare.ddl

      • When using MySQL 4.0.18, the prepare.ddl script will fail. You can edit prepare.ddlfile like this:

    1. Right after the first line, insert:

     

    DELETE from mysql.user where user='nukes' ;
    
    1. Change the GRANT line to:

     

    GRANT ALL ON nukes.* TO nukes@'localhost' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON nukes.* TO nukes@'localhost' WITH GRANT OPTION;
    
    • Run the relevant setup.ddls for the modules. The nukes module, which is the core, needs to be there, while the other modules are optional.

    • Create a datasource named NukesDS, relevant for your database type and installation in JBOSS_HOME/server/default/deploy.

    • Create a JBOSS_HOME/server/default/nukes directory.

    • In the nukes directory, run:

    build deploy-components
    build deploy
    
    • For any other modules you want, change to the module directory and run:

    build deploy