...
Code Block |
---|
git clone https://github.com/duracloud/snapshot.git |
Setup Bridge Root Directory
The application needs a directory of sufficient size (depending on your expected load) for storing application state files as well as receiving space data both from the DPN node as well as from DuraCloud. The tomcat user must have read/write access to the directory.
Setup Tomcat
- Set up tomcat server credentials for automatic deployment on build
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 with the following settings:
duracloud.bridge.root.username - the username used for initializing the instance (default root).
duracloud.bridge.root.password - the password used for initializing the instance (default rpw).
duracloud.bridge.root.email - an email associated with the root account that will send email regarding bridge server events.
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 parameters to your JAVA_OPTS environmental variable
Code Block JAVA_OPTS="$JAVA_OPTS -Dduracloud.bridge.root.password=<your password> -Dduracloud.bridge.root.email=<your email> -Dduracloud.bridge.root.dir=<your root dir>"
...
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 the "clean" parameter to false if you don't want to wipe your database on reinit.
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:
<duracloud.bridge.root.dir>/duracloud-bridge-init.dat. This encrypted file contains the credentials you used to initialize the app. It will be read as soon as tomcat starts up in order to allow the service to start up without needing further intialization (as in the case of, for example, an unexpected server restart).