The server is a typical servlet Java WAR; so, simply put it into a servlet container. The following is an improvised example on how this might be done in Ubuntu/Tomcat; if any other means or environments are flavored, knock yourself out. (Payara and Wildfly have been tested as well as Tomcat).
General recommendation: if RedDog’s server will be at a production environment, configure a load balancer or a reverse proxy to protect the server.
When configuring the balancer/proxy, the context must be the same as the server. E.g. if the backend server is at
example.com:8080/rdap, then the frontend service should be at
example.com/rdap(note that the server context is
sudo apt-get install openjdk-8-jre
# Ubuntu repositories aren't used because their Tomcat is rather old. # You will probably need to adapt this link because it keeps changing. # See www-us.apache.org/dist/tomcat/tomcat-8 wget www-us.apache.org/dist/tomcat/tomcat-8/v8.5.23/bin/apache-tomcat-8.5.23.tar.gz tar -xzvf apache-tomcat-8.5.23.tar.gz CATALINA_HOME=$(pwd)/apache-tomcat-8.5.23 JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
Install RedDog on Tomcat
mkdir $CATALINA_HOME/webapps/rdap cd $CATALINA_HOME/webapps/rdap # www.reddog.mx/server-download.html wget https://github.com/NICMx/releases/raw/master/RedDog/rdap-server-1.4.1.war jar -xvf rdap-server-1.4.1.war rm rdap-server-1.4.1.war
Add the data access implementation to the classpath
mv <path-to-your-implementation> WEB-INF/lib
mv ~/Downloads/rdap-sample-daa-impl-0.0.2.jar WEB-INF/lib
If classpath only contains one implementation and it includes a service provider configuration file, that’s all that it needs. Otherwise state the hub class of the intended implementation in the
echo "data-access-implementation = mx.nic.rdap.sample.SampleHub" > WEB-INF/data-access.properties
If the implementation requires configuration, now would be a good time to tweak it by adding more key-values to
data-access.properties. This file is rdap-server’s expected data access configuration file.
RedDog server is now running and serving data provided by the implementation.