This is the REST Web Service for the LOCKSS content repository.
The master
branch is for stable releases and the develop
branch is for
ongoing development.
The LOCKSS cluster, including this project, is normally built and deployed using
the LOCKSS Installer, which uses kubernetes
.
You can find more information about the installation of the LOCKSS system in the LOCKSS system manual.
git clone -b develop ssh://github.com/lockss/laaws-repository-service.git
File
-> Import...
-> Maven
-> Existing Maven Projects
In the home directory of this project, where this README.md
file resides,
run mvn clean install
.
This will run the tests as a pre-requisite for the build.
The result of the build is a so-called "uber JAR" file which includes the project code plus all its dependencies and which can be located via the symbolic link at
./target/current-with-deps.jar
Run the
LOCKSS Development Scripts
project bin/runservice
script in the home directory of this project, where
this README.md
file resides.
The log is at ./logs/app.log
.
The API is documented at http://127.0.0.1:24610/swagger-ui.html.
The status of the web service may be obtained at http://127.0.0.1:24610/status.
The administration UI of the web service is at http://127.0.0.1:24611.
Assuming that the LOCKSS Repository service is running on host
reposervicehost
at port reposerviceport
and it has a collection
collectionid
:
-
Edit the OpenWayback file
wayback-webapp/src/main/webapp/WEB-INF/wayback.xml
:-
Comment out the
resourcefilelocationdb
bean:<!-- <bean id="resourcefilelocationdb" class="org.archive.wayback.resourcestore.locationdb.BDBResourceFileLocationDB"> <property name="bdbPath" value="${wayback.basedir}/file-db/db/" /> <property name="bdbName" value="DB1" /> <property name="logPath" value="${wayback.basedir}/file-db/db.log" /> </bean> -->
-
Comment out the
BDBCollection.xml
resource:<!-- <import resource="BDBCollection.xml"/> -->
-
Un-comment out the
RemoteCollection.xml
resource:<import resource="RemoteCollection.xml"/>
-
Change the reference of the
collection
property fromlocalbdbcollection
toremotecollection
:<property name="collection" ref="remotecollection" />
-
-
Edit the OpenWayback file
wayback-webapp/src/main/webapp/WEB-INF/RemoteCollection.xml
:-
Change the value of the
prefix
property fromhttp://wayback.archive-it.org/fileproxy/
tohttp://reposervicehost:reposerviceport/warcs/
:<property name="prefix" value="http://reposervicehost:reposerviceport/warcs/" />
-
Change the value of the
searchUrlBase
property fromhttp://wayback.archive-it.org/1055/xmlquery
tohttp://reposervicehost:reposerviceport/cdx/owb/collectionid
:<property name="searchUrlBase" value="http://reposervicehost:reposerviceport/cdx/owb/collectionid" />
-
Assuming that the authenticated user name is lockss-u
, the password of this
user is lockss-p
and that the home directory of the Tomcat 8 web
application server is /usr/share/tomcat8
:
-
Edit the Tomcat file
/usr/share/tomcat8/conf/tomcat-users.xml
:-
Right before the
</tomcat-users>
at the end of the file. add:<role rolename="wayback"/> <user username="lockss-u" password="lockss-p" roles="wayback"/>
-
-
Edit the OpenWayback file
wayback-webapp/src/main/webapp/WEB-INF/web.xml
:-
Un-comment out the
<security-role>
,<security-constraint>
,<login-config>
and<error-page>
elements at the end of the file. -
Change the value of the
url-pattern
property in theweb-resource-collection
property from/usersecure/*
to/wayback/*
:<url-pattern>/wayback/*</url-pattern>
-
Assuming that the LAAWS Repository service is running on host
reposervicehost
at port reposerviceport
and it has a collection
collectionid
:
- Edit the file
config.yaml
:-
After the definition of the
pywb
collection, add a new collectiondefinition:collectionid: archive_paths: http://reposervicehost:reposerviceport/warcs/ index: type: cdx api_url: http://reposervicehost:reposerviceport/cdx/pywb/collectionid?url={url}&matchType={matchType}&sort={sort}&closest={closest}&output={output}&fl={fl} replay_url: ""
-