Deployment
This section expands the process of deploying in a production environment. Make sure you are familiarized with the installation procedure first before attempting the described steps.
Web server
There a few options you will likely want to specify when deploying your RDP instance.
Server port
Set -Dserver.port=<port>
to adjust the port the embedded webserver is listening on.
Fast random number generation
Specify -Djava.security.egd=file:/dev/urandom
this if you receive logs such as: "Creation of SecureRandom instance
for session ID generation using [SHA1PRNG] took [235,853] milliseconds." The secure random calls may be blocking as
there is not enough entropy to feed them in /dev/random
.
Proxy configuration
Set -Dhttp.proxyHost
and -Dhttp.proxyPort
to perform HTTP accesses through a proxy.
Likewise, you can set up a proxy for FTP connections with -Dftp.proxyHost
and -Dftp.proxyPort
.
General steps
- Create a working directory for the web service:
mkdir -p /project/directory
- Move into that directory:
cd /project/directory
- Download the latest
release:
wget -O rdp-1.4.11.jar https://github.com/PavlidisLab/rdp/releases/download/v1.4.11/rdp-1.4.11.jar
- Create
application.properties
, and optionallyfaq.properties
andmessages.properties
if you want to customize messages. - Test your setup:
java -jar rdp-1.4.11.jar
- Log into the database and activate other organisms and organ systems (optional)
- Deploy using Systemd (see below) or a Docker container
Integration with systemd
If you are not using a container technology such as Docker, we recommend that you use a systemd service unit to deploy your RDP instance.
Create a file under /etc/systemd/system/rdp.service
with the following content:
[Unit]
Description=rdp
After=syslog.target
[Service]
User=tomcat
Group=tomcat
WorkingDirectory=/project/directory
ExecStart=/bin/java -Xms256m -Xmx3g -Dserver.port=<port> -Djava.security.egd=file:/dev/urandom -jar rdp-1.4.11.jar
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
- Start service:
systemctl start rdp.service
- View logs:
journalctl -f -u rdp.service
Apache
Create a standard virtual host section with the following proxies:
ProxyPass / http://localhost:<port>/
ProxyPassReverse / http://localhost:<port>/
More information
For custom cloud deployments see Spring Boot: Deploying to the Cloud .
To install as a system service see Spring Boot: Installing Spring Boot Applications .