Download / Installation-Guide /Docker
Running the Metatron Docker image
We provide docker image for easy-installation of Metatron Discovery and the druid customized engine. To run this docker image, you only need linux command window! For now, we support simple download for single mode of druid only. Please contact us if you specially need the distributed version.
Prerequisites
- Linux kernel
- More than 6G memory
- Docker: https://docs.docker.com/get-started/#docker-concepts
Metatron Docker repository
https://hub.docker.com/r/metatronapp/discovery/tags/
Execute the docker image
To run the docker image in quickstart mode(single-machine, non-clustered), execute the following command to run.
To access the logs and service of druid or mariadb in docker container, expose the service’s ports and log path.
To enter the container, if you want:
To stop the container, if you want:
To access Metatron Discovery, go to http://localhost:${HOST_DISCOVERY_PORT:=8180}. (The default admin user account is provided as Username: admin, PW: admin)
How to persist data in Metatron docker container
By default, the docker does not store data. For some reason when you need to redistribute containers, all the data is initialized. This can cause considerable stress, so we suggest ways to preserve Metatron data within docker environment.
There are two paths to be preserved in the container:
- /usr/local/druid-backup
- /usr/local/mysql-backup
So, if you want to persist your data, you have to add volume (-v) options as follow :
For instance, if you run a container with these options :
Then you can see the data on the host’s directory and now can re-use the data when you run a new container.
- If you are using docker on Mac OS, you have to set mount point in the ‘Preferences’ > ‘File Sharing’
One more important thing is the option for running Metatron Discovery application.
By default, Metatron Discovery run with –init option for docker container for initialize the database per every users. It is necessary for the first execution.
So, if you decide to keep the data, you must add a new environment variable from the next time you run it.
Except for the very first time, please be sure to include this setting.
Finally, you can run a container with these options for persist data.
- ‘PERSIST_DISCOVERY=TRUE’ option is required from the second run. It must be omitted for the first time in your entire environment.
At first, persist the data by just setting up the volume (-v), then add environment (-e) setting from the next run.