APACHE OODT
Apache OODT Development with IntelliJ IDEA
Setting up Apache OODT development environment with IntelliJ IDEA
Apache OODT is a configurable middleware that allows data managing, processing, and archiving for any subject domain. It was introduced by the Jet Propulsion Laboratory, NASA in 1998 to conveniently manage the planetary data across a number of universities and data collection points. In the present, it is being developed as a top-level project of Apache Software Foundation.
This post will guide you through setting up the local development environment for Apache OODT with IntelliJ IDEA IDE.
0. Install and configure IntelliJ IDEA and Apache Tomcat
First of all, we should have IntelliJ IDEA and Apache Tomcat installed and configured on our computers. To download the IntelliJ IDEA, head over to the Jetbrains website. , download and run the suitable installer for your operating system. After it’s installed, open the project in the IntelliJ IDEA.
To download Apache Tomcat, go to the Tomcat downloads page and download one of the suitable files under the binary distributions section. Once the zip file is downloaded, extract it into a suitable location.
To test the Tomcat installation, change the directory to /bin
in a terminal and run catalina.bat start
(Windows) or catalina.sh start
(*NIX). Go to https://localhost:8080 and see whether it shows the following page. If yes, your Tomcat installation is complete.
1. Build and run the file manager component
File manager is one of the main components in Apache OODT. To run it, locate oodt/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManagerServerMain.java
in the IDE. Then click on the green arrow that is left to the main method of the Java class, to run the file manager server.
Well, you will be greeted with an error and that’s reasonable because we haven’t specified a port for the file manager to run. The file manager server expects the port to be passed as a program argument.
To supply program arguments, click the same green arrow again and select modify run configuration, the bottom option from the appearing menu.
Fill the program arguments field in the opening window with the value --portNum 9000
. The default port is 9000 but you are free to supply any available port number.
Also, add the following in the VM options field. If the VM options field is not visible, click the modify options dropdown and check Add VM options to enable it.
-D org.apache.oodt.cas.filemgr.properties=F:\oodt\filemgr\src\main\resources\filemgr.properties
After entering the above configurations, the modified run configuration window for the file manager component should look as follows. Click Apply and OK to confirm it, and then run the file manager server again. The file manager component will spin up successfully.
2. Build and run the workflow manager component
The workflow manager is another main component of Apache OODT. It helps non-programming people to provision workflows to process files. To run it, first, locate the file oodt/workflow/src/main/java/org/apache/oodt/cas/workflow/system/WorkflowManagerStarter.java
from within the IDE.
Before starting the workflow manager, make sure to modify its run configuration in the same way we did for the file manager, but with different values.
Add the following to the VM Options field.
-Dorg.apache.oodt.cas.workflow.properties=<your_project_location>\workflow\src\main\resources\workflow.properties
also, add --portNum 9001
to the program arguments field. Then click Apply, OK, and run WorkflowManagerStarter.java
.
3. Build and run the resource manager component
The resource manager is the OODT component that is responsible for the execution, monitoring, and tracking of jobs, storage, and networking resources for an underlying set of hardware resources. To run it, first, locate the file oodt/workflow/src/main/java/org/apache/oodt/cas/resource/system/ResourceManagerMain.java
from within the IDE.
Before starting the resource manager, make sure to modify its run configuration in the same way we did for the file manager, but with different values.
Add the following to the VM Options field.
-Dorg.apache.oodt.cas.resource.properties=<your_project_location>\resource\src\main\resources\resource.properties
also, add --portNum 9002
to the program arguments field. Then click Apply, OK, and run .ResourceManagerMain.java
.
4. Build and run the REST APIs
The webapp
directory consists of the REST APIs for the main OODT components. The existing OPSUI and the new React. js-based OPSUI consumes these APIs to display information and execute tasks such as fetching ingested products, executing workflows, etc.
Currently, OODT has the following REST APIs.
fmprod
- REST API for the file manager OODT componentwmservices
- REST API for the workflow manager OODT component
To run each API from within the IntelliJ IDEA, change directory to the corresponding folders and run mvn clean install
to build the projects. For example, If the fmprod
app is successfully built, you will see the following message on the terminal.
Then go to run -> edit configurations
and press the +
icon at the top left corner. In the appearing menu, select tomcat local
.
In the appearing window, fill in the server
tab as shown in the below screenshot.
Then switch to the deployment
tab and select artifacts to deploy. Finally, click apply and then OK.
Now select the tomcat configuration from the Select run/debug configuration
and run. The REST APIs will now be deployed.
Wrapping up
In this post, we discussed in detail, how to set up the development environment for Apache OODT with Tomcat and IntelliJ IDEA. Special thanks to Imesha Sudasingha and Nadeeshan Gimhana for their guidance. I hope this post was useful to you. If you encounter any problems while following this guide, please inform me in the responses.
Thanks for reading ❤️
References:
[1] https://oodt.apache.org/
[2]https://www.jetbrains.com/help/idea/run-debug-configuration-tomcat-server.html
[3]https://cwiki.apache.org/confluence/display/OODT/CAS+Product+Server+Web+Application+-+Installation+Guide