Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Set up tomcat server credentials for automatic deployment on build
    1. in your settings.xml file (~/.m2/settings.xml)  add the following to the servers element:

      Code Block
          <server>
            <id>tomcat-server</id>
            <username>tomcat</username>
            <password>password</password>
          </server>

Set up environment

...

variables

These variables are picked up by the application:

  1. duracloud.bridge.root.username - the username used for initializing the instance (default root).
  2. duracloud.bridge.root.password - the password used for initializing the instance (default rpw).
  3. duracloud.bridge.root.email
     - an email associated with the root account that will send email regarding bridge server events.
  4. duracloud.bridge.root.dir - a directory that will receive data as well as store non-database application state and settings.
    in the /etc/default/tomcat7 file add the following

Add the parameters to your JAVA_OPTS environmental variable

Code Block

...

JAVA_OPTS="$JAVA_OPTS -Dduracloud.bridge.root.username=<your username> -Dduracloud.bridge.root.password=<your password> -Dduracloud.bridge.root.email=<your email> -Dduracloud.bridge.root.dir=<your root dir>"

...

 

Build and deploy the source

Run a build of the Bridge software, which will perform a deployment. Alternatively, perform the build and copy the generated WAR file to your Tomcat webapps directory.

Code Block
cd snapshot

mvn clean install

...

Create the database

Using a mysql client create a database: 

...

First you'll need to create an init.json file using the values you setup in previous steps.

...

See the Bridge App REST API for a copy of the init JSON file.

Then execute the following curl command to pass the initialization params to the bridge.

Code Block
 curl -v -X  POST -d @/path/to/init.json \ 
                 -H "Content-Type: application/json"  \
                 -H "Accept:application/json" \
                 "https://<your bridge host:port>/bridge/init" \
                 -u <duracloud.bridge.root.username>:<duracloud.bridge.root.password> 

NB: For subsequent initalizations, flip Ensure that the "clean" parameter is set to false if you don't want to wipe your database on reinit. . If this is your original init, set "clean" to true.

Reinitializing 

If you wish to change any of your initialization parameters,  you must  first remove the persistent initialization params on the server by deleting the following file:  

...