Skip to content

getmetamapper/metamapper-setup

Repository files navigation

Metamapper Setup

CircleCI latest version discord

Official bootstrap for spinning up your own Metamapper instance with Docker and Docker-Compose.

Setup

To get started, we recommend you fork this repo and run the following command:

./setup.sh

Once the bootstrap has completed, you should be able to run:

docker-compose up -d

Then you can access the web UI from whatever port (default: 5050) is specified in your gunicorn.py configuration.

Environment Variables

METAMAPPER_IMAGE (default: getmetamapper/metamapper)

We publish to two separate Docker Hub repositories during our build process.

getmetamapper/metamapper

Stable builds are published as point releases to getmetamapper/metamapper. We recommend this as your starting point when deploying your own Metamapper instance.

You can specify what image of Metamapper you want to install with the METAMAPPER_IMAGE variable.

METAMAPPER_IMAGE=getmetamapper/metamapper METAMAPPER_VERSION=latest ./setup.sh

getmetamapper/preview

We also maintain a development image at metamapper/preview. These builds contain the latest – but potentially unstable – features available. Use this if you want to be on the bleeding edge and help us debug our codebase before an official release.

Preview releases are tagged with the first 7 characters of the last commit hash.

METAMAPPER_VERSION (default: latest)

You can specify what version of Metamapper you want to install with the METAMAPPER_VERSION variable:

METAMAPPER_IMAGE=getmetamapper/preview METAMAPPER_VERSION=35b182c ./setup.sh

Configuring Metamapper

The conf module

We offer some configuration files to some of the libraries that Metamapper uses to function. These files are generated and placed in the conf directory as part of setup.sh script.

gunicorn.py

Metamapper uses gunicorn to serve web requests. You can customize any aspect of Gunicorn via the gunicorn.py configuration file.

celery.py

Metamapper uses celery to handle async task processing. You can customize the Celery configuration via the celery.py configuration file.

settings.py

Metamapper is a Django application. Much of the configuration is done in the django.conf.settings module.

You can override any setting in this file using the settings.py file generated during the installation process. However, do this with extreme caution, as it could break your build.

The contrib module

Code that is added into this module is added directly into the Metamapper source code on your Docker image. This means that it is accessible by different parts of the application.

For example, Metamapper uses Elasticsearch for quickly searching all of your data assets.

You could, however, roll out your own search backend, place it in the contrib module, and update the reference to that module using the METAMAPPER_SEARCH_BACKEND environment variable. Regardless of what happens behind the scenes, it should work as expected as long as the backend exposes the same abstract interface.

We currently expose the following backends as configurable:

Environment Variable Description
METAMAPPER_SEARCH_BACKEND Handles searching data assets, such as tables, and their annotations
METAMAPPER_FILE_STORAGE_BACKEND Handles file uploads to different cloud providers
METAMAPPER_EMAIL_BACKEND Handles email notification deliveries

requirements.txt

We provide an empty requirements.txt that you can update with an dependencies that your contrib module needs. It is automatically installed via pip at the end of the Docker build process:

RUN if [ -s /usr/local/metamapper/metamapper/requirements.txt ]; \
    then pip install -r /usr/local/metamapper/metamapper/requirements.txt; fi

Resources