OpenMetadata
Search…
Build the code & run tests

Prerequisites

  • Make sure you are using maven 3.5.x or higher and JDK 11 or higher.
  • Make sure you have a local instance of MySQL and ElasticSearch.
    • For an easy install of MySQL and ES, just install Docker on your local machine and run the following commands from the top-level directory
    1
    cd docker/local-metadata
    2
    docker-compose -f docker-compose-dev.yml up
    Copied!
  • Bootstrap MySQL with tables
    1. 1.
      Create a distribution as explained here
    2. 2.
      Extract the distribution tar.gz file and run the following command
    1
    cd open-metadata-<version>/bootstrap
    2
    sh bootstrap_storage.sh drop-create
    Copied!
  • Bootstrap ES with indexes and load sample data into MySQL
    1. 1.
      Run OpenMetadata service instances through IntelliJ IDEA following the instructions here
    2. 2.
      Once the logs indicate that the instance is up, run the following commands from the top-level directory
    1
    python3 -m venv /tmp/venv
    2
    source /tmp/venv/bin/activate
    3
    pip install -r ingestion/requirements.txt
    4
    make install_dev generate
    5
    cd ingestion
    6
    pip install -e '.[sample-data, elasticsearch]'
    7
    metadata ingest -c ./pipelines/sample_data.json
    8
    metadata ingest -c ./pipelines/sample_usage.json
    9
    metadata ingest -c ./pipelines/metadata_to_es.json
    Copied!
  • You are now ready to explore the app by going to http://localhost:8585 *If the web page doesn't work as intended, please take a look at the troubleshooting steps here

Building

The following commands must be run from the top-level directory.
mvn clean install
If you wish to skip the unit tests you can do this by adding -DskipTests to the command line.

Create a distribution (packaging)

You can create a distribution as follows.
1
$ mvn clean install
2
3
# Create the binary distribution.
4
$ cd dist && mvn package
Copied!
The binaries will be created at:
1
dist/target/open-metadata-<version>.pom
2
dist/target/open-metadata-<version>.tar.gz
Copied!

Run instance through IntelliJ IDEA

Add a new Run/Debug configuration like the below screenshot.
  1. 1.
    Click on Intellij - Run menu
  2. 2.
    Click on "Edit Configurations"
  3. 3.
    Click + sign and Select Application and make sure your config looks similar to the below image
Intellij Runtime Configuration

Add missing dependency

Right-click on catalog-rest-service
Click on "Open Module Settings"
Go to "Dependencies"
Click “+” at the bottom of the dialog box and click "Add"
Click on Library
In that list look for "jersey-client:2.25.1"
Select it and click "OK". Now run/debug the application.

Troubleshooting

  • If you see blank page at http://localhost:8585 , please check the logs at logs/openmetadata.log. You might be encountering one of the following errors:
    • connection refused or unreachable - please confirm that MySQL and ES are reachable outside of docker by running docker ps and checking that ports 3306 and 9200 are listening on 0.0.0.0
      • If ElasticSearch in Docker on Mac is crashing, try changing Preferences -> Resources -> Memory to 4GB
      • If ElasticSearch logs show high disk watermark [90%] exceeded, try changing Preferences -> Resources -> Disk Image Size to at least 16GB
    • Public Key Retrieval is not allowed - verify that the JDBC connect URL in conf/openmetadata.yaml is configured with the parameter allowPublicKeyRetrieval=true
    • Browser console shows javascript errors, try doing a clean build. Some npm packages may not have been built properly.

Coding Style

Last modified 4d ago