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.
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.
Step 1 – GCloud Developer Tools Setup
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
Step 2 – Deploying Metabase to GCP
Metabase docker images are on Dockerhub here.
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:
- hostname — eu.gcr.io
- projectname — krustysfunhouse
- tag — metabase
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
Step 3 – Compute Engine Instance
Create a Compute Engine instance:
– Specify the GCR image you’ve just uploaded:
- Specify vCPU and Memory (I used 1 vCPU and 3.75GB)
- Specify the region, I’ve used London (europe-west2-c) here.
n.b. You’ll have a container optimized OS by default.
Step 4 – Getting Access
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.
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…