Metabase is a business intelligence tool for your organisation that plugs in various data-sources so you can explore data and build dashboards. I'll aim to provide a series of articles on provisioning and building this out for your organisation. This article is about getting up and running quickly.
There are multiple ways to get Metabase up and running on Google Cloud.
https://www.metabase.com/docs/latest/operations-guide/installing-metabase.html
You can install it locally on your Mac as well as popular cloud platforms. It's available as a JAR file and also as a Docker container.
I went via the Docker container route and Google Cloud Platform.
Make sure you have GCloud developer tools setup. You can do this via the instructions here.
After that, you'll need to login to your Google account and also configure Docker to work with your credentials. In my case I generated a new service account in GCP to access Google BigQuery (my chosen reporting database). I then downloaded the corresponding service account JSON file.
gcloud auth login
gcloud auth configure-docker
Metabase docker images are on Dockerhub here.
https://hub.docker.com/r/metabase/metabase/tags
However, I wanted these in Google Cloud Registry for performance and reliability reasons.
You can pull the Docker image using the following:
docker pull metabase/metabase:latest
Tag the docker image with the following:
docker tag metabase/metabase:latest eu.gcr.io/krustysfunhouse/metabase
Deploy the Docker image to Google Cloud Registry with the following
docker push eu.gcr.io/krustysfunhouse/metabase:latest
Create a Compute Engine instance:
- Specify the GCR image you've just uploaded:
eu.gcr.io/krustysfunhouse/metabase:latest
n.b. You'll have a container optimized OS by default.
Once that instance is provisioned you can login from gcloud via the console with the following:
gcloud beta compute ssh --zone "europe-west2-c" "metabasereporting" --project "krustysfunhouse"
Metabase runs as a Java app and starts-up on port 3000. If you want to get into installing Nginx or GCP Load Balancing that’s a different story. For this, I opened up access to port 3000. Add a new Firewall Rule to allow traffic to access tcp:3000 for now — example below. Then add this “name” to the machine VM instance as a network tag.
You should lock this down to your office IP ideally, or setup a VPN so that you access this securely. Once running, you will have a publically accessible instance that is subject to brute-force attack in terms of username/password.
By default, Metabase will make you specify a default email and password, but still this isn't production ready.
I'll look at the basics of building a dashboard in the next article, but hopefully that should be good enough to get you started.
I'm a Consulting CTO working as an architect and engineer with startups and scaleups. A large part of my career was spent working in analytics companies and data-heavy companies often with the aim of building/transforming data-platforms. You can find out more about me (and hire me for advice, fractional or interim work) here:
That's all for now...