Setting up IntelliJ to develop components for Egeria¶
This tutorial explains how to set up IntelliJ so that you can develop new connectors and clients for your organization.
For developers wishing to contribute to Egeria
Contributions to Egeria need to be made via a Pull Request (PR) from you own fork of the project. There are detailed instructions on how to do this in the Git and GitHub Tutorial
Prerequisite tasks¶
Tutorial tasks¶
- Install IntelliJ
- Create a project for your code
- Set up an OMAG Server Platform
- Create test servers
- Start and stop servers
Installing Intellij¶
Link to the download page and follow the instructions. Then start up IntelliJ and a wizard appears.
Create IntelliJ project¶
Either from start up wizard click on the New Project
button or from IntelliJ's top
From an IntelliJ window, select File->New Project
from the top menu bar.
Enter information about the project. In this example, the project is called egeria-extensions
, it is written in Java and being built with Maven.
Press the Create
button and the new project is opened.
Set up Java Level ...
Validate that the project is set up with the right level of Java - you need Java 17. Select File
and then Project Structure...
. When the wizard opens select Project
and ensure the SDK is Java 17.
If the SDK is not 17, click on the dropdown and change it to 17, and click OK to save it. If Java 17 is not listed, make sure you have Java 17 installed on your machine and retry.
Ensure you have enough memory ...
Update your memory settings for IntelliJ to ensure you have at least 2GB of memory. This is the option Change Memory Settings
that is under the Help
menu. In some editions it is nested under Diagnostics
.
Set up OMAG Server Platform in intelliJ¶
The next set of instructions makes it easy to start and stop an OMAG Server Platform from IntelliJ.
Select Edit Configurations
from the dropdown run menu.
Click on the +
sign in the top left of the wizard.
Select JAR Application
:
Fill in the properties based on the directory where you installed egeria. In this example, egeria was installed in directory /egeria-install/egeria-platform-5.0-distribution.tar.gz/
and so the settings are:
- Path to JAR:
{install directory}/assembly/platform/omag-server-platform-5.0.jar
- VM Options:
-Dloader.path=lib,extra
- Working Directory:
{install directory}/assembly/platform
Press OK
to save the configuration and EgeriaPlatform
appears in the dropdown run menu.
Press the green triangle to run the platform.
A new panel appears in the IntelliJ window showing the platform is starting up.
When you see the message OMAG server platform ready for more configuration
then the platform has initialized.
Egeria's assembly includes a utility called EgeriaPlatformReport
that queries the status of an OMAG Server Platform. It is useful to set up to check that your platform is running correctly.
Select Edit Configurations
to create another JAR Application
. This time call it PlatformReport
. The JAR file is called {install directory}/assembly/etc/reports/egeria-platform-report.jar
Leave the Working Directory
to default to your project directory. If you are using Version 4.3 of Egeria, set the VM Options to -Dstrict.ssl=false
; for release V5.0 and beyond, you can leave them blank.
When you click OK
, then PlatformReport
appears in the dropdown run menu. Press the green triangle to run the report and a new tab appears in the panel of the IntelliJ window where the platform is running.
Also notice that a new markdown file called egeria-platform-report.md
has appeared in your project files that includes the details of the platform report as a markdown file.
The platform report provides details of the current status of the platform. Each time you run the report, a new copy of egeria-platform-report.md
is created
If you open egeria-platform-report.md
you can see a formatted version of the report.
Create test servers¶
Egeria's assembly includes a utility for configuring servers. It is called ServerConfig
. Select Edit Configurations
and create another JAR Application
run configuration entry for ServerConfig
.
=== "V5.0" and beyond
When you click OK
, then ServerConfig
appears in the dropdown run menu. Press the green triangle to run the utility and a new tab appears in the panel of the IntelliJ window where the platform is running.
ServerConfig
prints out a menu of the different configuration options it supports.
Click in the ServerConfig run window and enter create-metadata-store test-metadata-store
and press enter.
This will create a new Metadata Access Store called test-metadata-store
.
You can select PlatformReport
in the dropdown run menu, and click on the green triangle to re-run the PlatformReport
. Notice that details of this new server are now included.
Start and stop servers¶
Egeria's assembly includes a utility called ServerOps
that makes it easy to start and stop servers on your OMAG Server Platform. Select Edit Configurations
and create another JAR Application
run configuration entry for ServerOps
.
=== "V5.0" and beyond
When you click OK
, then ServerOps
appears in the dropdown run menu. Press the green triangle to run the utility and a new tab appears in the panel of the IntelliJ window where the platform is running.
ServerOps
prints out a menu of the different operations it supports.
Click in the ServerOps run window and enter start test-metadata-store
and press enter.
ServerOps
returns with a list of the services that have been started.
What next?¶
Now that IntelliJ is set up, you can:
- Build a new connector.
- Build a client that calls Egeria.
The Developer Guide provides detailed information on developing with Egeria.
Raise an issue or comment below