<<

SEAD Virtual Archive Documentation Release 1.0

SEAD Virtual Archive Team

September 17, 2014

Contents

1 Codeset 1 1.1 Pre-requisites...... 1 1.2 Build Code...... 1 1.3 Pre-requisites...... 1 1.4 Build...... 2 1.5 Test Cases...... 3

2 Indices and tables 5

i ii CHAPTER 1

Codeset

The code works with and substantially extends the Data Conservancy Services code base.

1.1 Pre-requisites

Before setting up the Virtual Archive service, please complete the following tasks: • Creating an ACR account: (Not needed for local bag upload) Please request an account in Active Content Repository • Build requirements: For building code please use maven and jdk (1.7.x) Please setup latest version of Apache Tomcat Once tomcat is setup, please copy Hibernate jar and mysql-connector jar into the into the lib folder inside tomcat folder. • Increase the stack size as with JAVA_OPTS environment variable for jvm and to also allow encoding of slash and backslash as shown below: export JAVA_OPTS="-Xss512m -Xms512m -Xmx1024m -XX:MaxPermSize=1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"

• In tomcat/conf/server., in Connector set maxHttpHeaderSize to 65536. This allows for large registry re- quests, needed for POST calls for insert or updates on entities with large number of properties:

• Install curl: yum install curl or apt-get install curl

1.2 Build Code

1.3 Pre-requisites

• Before building the code, please copy the settings.xml file from maven/conf folder in the git repository into your maven folder. • Setting up Database: Please follow instructions in SEAD-VA-extensions/dcs-access/sead-access-ui/README file

1 SEAD Virtual Archive Documentation, Release 1.0

1.4 Build

• Build Registry Module: Please follow README instructions in sead-registry module • Build Komadu Module: Please follow instructions from Komadu github site • Build RO REST Service (Please ensure port numbers are right in ro-subsystem- service/src/main/resources/org/seadva/data/lifecycle/service/Config.properties): $ cd SEAD-VA-extensions/services/ro-subsystem/ $ mvn clean install -DskipTests (copy ro-subsystem-service/target/ro-x.x.x.war into tomcat/webapps/ro.war) $ mvn test

• Build BagIt Service: Copy ‘acrInstances.xml ‘ into resources folder [src/main/resources/org/seadva//util/acrInstances.xml] $ mvn clean -DskipTests (Please note that some test cases that depend on ACR credentials will not succeed if ACR credentials are not set correctly) Copy bagItRestService/target/bagit-x.x.x.war into tomcat/webapps/bagit.war

• Build Backend Workflow Module: $ cd dcs-integration/sead-workflow-integration $ mvn clean $ mvn package -DskipTests $ mvn test (Run this step, after you have updated the values in the property file mentioned in the note below)

Note: If you are using tomcat, please rename the war to sead-wf.war and copy to webapp folder. Make changes to the values in the following files • default.properties • sead-wf/WEB-INF/classes/RepositoryCredentials.xml The end points enabled would include: • Deposit Status Servlet: http://localhost:8080/sead-wf/content/sipDeposit/{sipId} • SIP Deposit Servlet: http://localhost:8080/sead-wf/deposit/sip (POST method) • Query Servlet: http://localhost:8080/sead-wf/deposit/squery?q=title:eel (sample query) • Data Stream Servlet: http://localhost:8080/sead-wf/deposit/datastream/

• Build the Front End: $ cd dcs-access/sead-access-ui $ mvn clean compile gwt:compile package (Rename the generated war file to sead-access.war and copy the war file into tomcat webapps folder)

Note: • To open in gwt-dev mode in eclipse, install GWT plugin for eclipse. • Import project as maven project. Right click->Properties->Google ->Web Application -> check ‘This project has a war directory’ • -> browse src/main/webapp ->Web Toolkit -> check ‘Use Google web toolkit’ • Click Ok

2 Chapter 1. Codeset SEAD Virtual Archive Documentation, Release 1.0

Once the war file is deployed, the following configuration files needs to be updated: - webapps/sead-access/sead_access/Config.properties - webapps/sead-access/WEB-INF/classes/DBConfig.properties - webapps/sead-access/WEB-INF/classes/acrInstances.xml

• Running the Service: Once the installation is complete, access the UI at ‘Sead Virtual Archive ‘_

Faceted Browsing is available on the left pane under ‘Data Search’ tab. Data can be ingested into Virtual Archive using the ‘Upload Data’ tab after the user haslogged in.

1.5 Test Cases

• Admin Login: To login, the database was initialized with admin username as ‘[email protected]‘ and password as ‘password’. • Creating new user: The resgister button is used to register a new user. When logged in as ‘Admin’ (eg: [email protected]), an ‘Administration’ tab is visible, where the admin can select a role for a new user and approve the user. • Google Login: A user can register using Google Login. If it is the first time a user logs in using Google, they need to be approved by the admin before they are able to ingest data sets into Virtual Archive. • Ingesting datasets: In the ‘Upload Data’ tab, please login using admin credentials or any other login that was created. Now select “Nced Project” and click on “View Collections to Publish”. 20 datasets in this case will displayed that can be published.

1.5. Test Cases 3 SEAD Virtual Archive Documentation, Release 1.0

4 Chapter 1. Codeset CHAPTER 2

Indices and tables

• genindex • modindex • search

5