Building

If you want to deploy the OCD Service to a server, the service must first be build. There are two basic alternatives. Either you directly build the project on the machine where it should be deployed, or you build it on some other machine and then move the files to their designated location. You will have to execute the jar target in order to create the service jar. Please refer to Build Process for more information. Make sure you also generate the user agents for any required user accounts through the target by altering the gradle build file accordingly and running the jar target, if needed.

Additional Aspects

There are a few additional aspects that should be taken under consideration. First of all, there are several project folders which do not need to be deployed. After completing the build, only the following resources are relevant for the service execution, any others may be removed.

  • bin directory
  • etc directory (without ant_configuration and ivy in the old ant build)
  • lib directory
  • log directory
  • ocd directory (without ivy in the old ant build, test and yGuard)
  • service directory (in the case of a public deployment, the standard service jar must be replaced by the obfuscated one
  • LICENSE
  • NOTICE
  • README.md
  • (ocd.conf in the old and build)

Also, when deploying on a Linux system, make sure with chmod +x <filename> that the execution of all relevant scripts and programs is allowed. Please refer to Project Structure for more information.

Remember also that the Security Policy Files of the JRE being used on the server will in some cases have to be changed, please refer to the LAS2peer Template Project for more information.