Skip to content

Downloading and Building Egeria Tutorial

Egeria is an open source project that is delivered both as source code as well as Maven Central Repository libraries.

This tutorial will guide you through the process of downloading the ODPi Egeria source code from GitHub and building it so that you can run it on your local machine.

Once you have downloaded Egeria, you can also use Kubernetes to start the lab infrastructure for the Hands-on Labs. This does not require you to build Egeria.

Already lost, or are the instructions below not detailed enough? Check out the Egeria Dojo, or consider jumping straight to the Hands-on Labs, which provide a pre-built environment for you and guided instructions on how to use different APIs.

Prerequisite Technology for Building Egeria

You will need a Java Development Kit (JDK) installed on your machine in order to build Egeria. There are various JDKs available, and you may even have one pre-installed on your system. You can check if java is already installed by running the command java -version from the command-line.

Java can be installed by:

  1. Downloading the OpenJDK 11 (LTS) HotSpot JVM from Adoptium.
  2. Running the installer that is downloaded.

Maven is the tool used to run the Egeria build. You can check if Maven installed by running the command mvn --version from the command-line. Ensure you are using version 3.5.0 or higher in order to build Egeria.

Maven can be installed:

  • On MacOS, by first installing the HomeBrew package manager and then running brew install maven from the command-line.
  • On Linux operating systems, by using your distribution's package manager (yum install maven, apt-get install maven, etc).
  • On Windows, you should use Windows Subsystem for Linux Version 2 or above, install an appropriate Linux distribution, and follow the instructions for Linux.

Git is an open source version control system used to store and manage Egeria's files. You need it installed on your machine to work with Egeria's git repositories stored on GitHub. You can check whether it is installed on your system by running git --version from the command-line.

Tutorial tasks

  1. Downloading the Egeria source from GitHub
  2. Building the Egeria source with Apache Maven

Downloading the Egeria Source from GitHub

The Egeria source is extracted from GitHub using the following git command:

$ git clone https://github.com/odpi/egeria.git
Cloning into 'egeria'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 50419 (delta 8), reused 29 (delta 7), pack-reused 50381
Receiving objects: 100% (50419/50419), 36.35 MiB | 5.23 MiB/s, done.
Resolving deltas: 100% (31704/31704), done.
Checking out files: 100% (6669/6669), done.

A new directory has been created with the ODPi Egeria source code. Change to the egeria directory.

$ cd egeria

You are now ready to build the egeria source.

Alternatively you can use Kubernetes to set up the infrastructure to run the Open Metadata Labs.

If you are working on the Dojo return to Day 1

Building the Egeria Source

When you download the egeria source from GitHub a new directory called egeria is created that contains all of the source and the build scripts.

The build scripts use Apache Maven to ensure the software is built in the correct order. If you change into the egeria directory, you will see a file called pom.xml. This is the file that controls the build.

Issue the following command from the egeria directory.

$ mvn clean install

The build can take 15-30 minutes depending on the speed and load on your machine. However eventually you will see the message:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:54 min
[INFO] Finished at: 2020-01-29T09:33:17Z
[INFO] Final Memory: 171M/3510M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0

This means you have completed this tutorial and are ready to choose the next step.

What next?

Back to top