Deploying Metatron with the Fully Engineered Docker Image

Created with Sketch.

Deploying Metatron with the Fully Engineered Docker Image

0
(0)

Metatron Discovery is a very useful BI solution that contains from data preparation to end-user visualization, but because of that wide coverage, the required components are rather more than other independent solutions, so installation, configurations could be very tiresome.

Supporting clients of ours, I felt that if we could deploy as a docker image at least for the initial stage, it will probably be very convenient. After enough testing in my environment, there’s almost no probability that it will fail on the client environment. So I made a docker image that contains all components installed and configured. It contains Hadoop, Druid, Hive, and so on. You can run and test Metatron Discovery very quickly.

You should be aware that this image is not official and needs more memory and space compared to a well-installed environment. You shouldn’t use this in a production environment. If you want to, you’d better try AWS or Azure marketplace. (See https://metatron.app/category/metatron-discovery/public-cloud)

Instead, this image is a very nice playground on which you can configure carelessly, install whatever as you want, and so on. Compared to official images, you can handle the unknown exceptional cases better. Again, this image had originally been made for technical support.

Let’s get started.

Start Metatron docker instance

You should run the docker-machine. Configure memory more than 4GB in Preferences. (Important!)

You can run with the below command, but I don’t recommend this method.

sudo docker run -d -it —name teamsprint/metatron:3.4.0 —memory=“4g” \
           -p 18088:8088 \
           -p 18042:8042 \
           -p 18081:8081 \
           -p 18082:8082 \
           -p 18090:8090 \
           -p 18091:8091 \
           -p 18180:8180 \
           --privileged memory /usr/sbin/init

Instead, let’s use handy scripts that run / attach / destroy the instances.

$ git clone https://github.com/teamsprint/docker-metatron.git
$ cd docker-metatron
$ ./run.sh

The above commands will launch a docker instance of Metatron Discovery. You can check with the docker ps command.

$ sudo docker ps -a

Get into docker instance

After executing “run.sh” script, you’re already in the docker instance.

$ ./run.sh
# ^D
$ 

The instance will not terminate until you run “destroy.sh“. You can re-attach the instance very quickly.

$ ./attach.sh
#

Start Metatron Discovery Service

Most environment variables and configuration files are set well. Normally, you don’t need to modify them. Just run the all-in-one script.

# ./prepare-all-metatron.sh
(wait until prompt)
# cd $METATRON_HOME
# tail -f logs/metatron-*.out
…
Started MetatronDiscoveryApplication in 90.702 seconds (JVM running for 93.445)
(wait until above)
^C
# 

All other commands except “prepare-all-metatron.sh” are optional. You need to wait 2~3 minutes doing nothing. Let’s access to http://localhost:18180.

If you want to change the service port for any reason (like out-bound limit), you should edit “run.sh” script.

Then restart the instance.

# ^D
$ ./destroy
$ vi run.sh —> replace -p 18180:8180 into -p 8180:8180
$ ./run.sh
# ./prepare-all-metatron.sh
(wait for about two minutes)

Then connect to http://localhost:8180.

Data Migration for Continuous Service

All contents in a docker instance disappear when you shut down the instance. To avoid this, you should use an external database for the metadata (like MySQL). So, when you restart the docker instance for the binary patch or whatever, you should migrate all contents to the new docker instance: MySQL contents, uploaded files, configurations, etc.

I’ll cover this in another article later.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on your social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

One Response

  1. […] But, in this article, because we’re going to use the fully engineered docker image that contains preptool inside you don’t need to download the preptool manually. (Refer to https://metatron.app/2020/01/21/deploying-metatron-with-the-fully-engineered-docker-image/) […]

Leave a Reply

Your email address will not be published. Required fields are marked *