This blog discusses installing Percona Monitoring and Management on Google Container Engine.

I am working with a client that is on Google Cloud Services (GCS) and wants to use Percona Monitoring and Management (PMM). They liked the idea of using Google Container Engine (GKE) to manage the docker container that pmm-server uses.

The regular install instructions are here: https://www.percona.com/doc/percona-monitoring-and-management/install.html

Since Google Container Engine runs on Kubernetes, we had to do some interesting changes to the server install instructions.

First, you will want to get the gcloud shell. This is done by clicking the gcloud shell button at the top right of your screen when logged into your GCS project.

Installing Percona Monitoring and Management

Once you are in the shell, you just need to run some commands to get up and running.

Let’s set our availability zone and region:

Then let’s set up our auth:

Now we are ready to go.

Normally, we create a persistent container called pmm-data to hold the data the server collects and survive container deletions and upgrades. For GCS, we will create persistent disks, and use the minimum (Google) recommended size for each.

Ignoring messages about disk formatting, we are ready to create our Kubernetes cluster:

You should now see something like:

Now that our container manager is up, we need to create 2 configs for the “pod” we are creating to run our container. One will be used only to initialize the server and move the container drives to the persistent disks and the second one will be the actual running server.

Then create it:

Now we need to move data to persistent disks:

Now recreate the pmm-server container with the actual configuration:

It’s up!

Now let’s get access to it by exposing it to the internet:

You can get more information on this by running:

To find the public IP of your PMM server, look under “EXTERNAL-IP”

That’s it, just visit the external IP in your browser and you should see the PMM landing page!

One of the things we didn’t resolve was being able to access the pmm-server container within the vpc. The client had to go through the open internet and hit PMM via the public IP. I hope to work on this some more and resolve this in the future.

I have also talked to our team about making mounts for persistent disks easier so that we can use less mounts and make the configuration and setup easier.

 

 

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Apurva Dave

Hi – if you’re deploying on google with kubernetes, did you consider using sysdig for monitoring? That would provide visibility into the entire infrastructure, containers, network, as well as application-specific metrics. https://www.sysdig.com

Also – it looks like your first paragraph got cut off.

Derek Perkins

Manjot – It would be awesome if you could update this setup to use kubernetes/helm + StatefulSets. That should be able to make it a one-command install.

dbamohsin

+1

Elisha Kramer

When I run:

kubectl create -f pmm-server-init.json

I get:

error: json: line 1: invalid character ‘Â’ looking for beginning of object key string

Manjot Singh

seems like an issue with copy and paste on your platform. did you try retyping it?

Diego

Same here… I tried saving the file locally and uploading but same error as @Elisha Kramer

Punter

How did you resolve this issue?