Date: Thu, 28 Mar 2024 11:47:04 -0400 (EDT) Message-ID: <873314506.28233.1711640824127@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_28232_1875960877.1711640824127" ------=_Part_28232_1875960877.1711640824127 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
To set up this application we will assume that you have the following to= ols installed on the target instance:
You can download the source from https://github= .com/duracloud/snapshot.
git clo= ne https://github.com/duracloud/snapshot.git
The application needs a directory of sufficient size (depending on your = expected load) for storing application state files as well as receiving spa= ce data both from the DPN node as well as from DuraCloud. The tomcat = user must have read/write access to the directory.
The bridge application will attempt to write logs to /var/log/duracloud.= To make this possible, create that directory, and set permissions to allow= the bridge application to write to it.
sudo mk= dir /var/log/duracloud sudo chown tomcat /var/log/duracloud
in your settings.xml file (~/.m2/settings.xml) add the followi= ng to the servers element:
<= ;server> <id>tomcat-server</id> <username>tomcat</username> <password>password</password> </server>
These variables are picked up by the application:
duracloud.bridge.root.username - the username used for initializin= g the instance (default root).
duracloud.bridge.root.password - the password used for initializin= g the instance (default rpw).
duracloud.bridge.root.email - an email associated with the root ac= count 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.
duracloud.bridge.threads-per-job - max threads per job, recommende= d number is available CPU processors minus 1 (or fewer).
Add the parameters to your JAVA_OPTS environmental variable
JAVA_OP= TS=3D"$JAVA_OPTS -Dduracloud.bridge.root.username=3D<your username> -= Dduracloud.bridge.root.password=3D<your password> -Dduracloud.bridge.= root.email=3D<your email> -Dduracloud.bridge.root.dir=3D<your root= dir>"
Create a System environment variable to allow the AWS client to know you= r preferred region
export = AWS_REGION=3Dus-east-1
Run a build of the Bridge software, which will perform a deployment. Alt= ernatively, perform the build and copy the generated WAR file to your Tomca= t webapps directory.
cd snap= shot mvn clean install
Using a mysql client create a database:
CREATE = DATABASE `snapshot` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
Create the database tables u= sing the SQL script found in the DuraCloud baseline. After downloading = this file, run the following:
mysql -= -user [username] --password [password] snapshot --execute set @saved_cs_cli= ent=3D'utf8'; source snapshot_create-mysql.sql;
You will need to create a duracloud user with ROLE_ADMIN permissions on = the DuraCloud account which is being connected to the bridge in order for t= he bridge to read data from and write data to DuraCloud. This can be = done by your DuraCloud account administrator through https://= manage.duracloud.org/.
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 param= s to the bridge.
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.br= idge.root.password>
NB: The "clean" parameter should be set to true the very first time init= is called, as this creates all the needed database tables. It should be se= t to false in all other situations.
If you wish to change any of your initialization parameters, you m= ust first remove the persistent initialization params on the server b= y deleting the following file:
<duracloud.bridge.root.dir>/duracloud-bridge-init.dat. This encryp= ted file contains the credentials you used to initialize the app. It will b= e read as soon as tomcat starts up in order to allow the service to start u= p without needing further intialization (as in the case of, for example, an= unexpected server restart).