Deploying Percona Monitoring and Management 2 Without Access to the Internet
Normally it is quite easy to deploy Percona Monitoring and Management (PMM) Server as a Docker container as per the official documentation. However, when working in very restrictive environments, it is possible the server doesn’t have access to the public Internet, so pulling the image from the Docker hub is not possible. Fortunately, there are a few workarounds to get past this problem.
As previously described by Agustin for PMM 1, one way is to Docker pull and save the image somewhere else. Here I will show you another way to do it that doesn’t require a separate server running Docker, and also provide updated instructions for PMM 2.
1. Download the PMM Server image directly from the Percona website. Select the desired Version and choose ‘Server – Docker Image’ from the drop-down box, for example:
2. Copy the downloaded .docker file to the PMM server, for example via SCP:
scp -i my_private_key pmm-server-2.11.1.docker my_user@my_secure_server:
3. Load the image to the local Docker repository on your PMM server
sudo docker load < pmm-server-2.11.1.docker
4. Create the persistent data container. Normally we would use percona/pmm-server:2 as the image tag, but since we loaded a specific version we need to specify it as follows:
sudo docker create \ -v /srv \ --name pmm-data \ percona/pmm-server:2.11.1 \ /bin/true
5. If this is a production deployment, it is a good idea to move the data container to a dedicated volume.
6. Create the server container (again, specifying the image version we have loaded before):
sudo docker run \ --detach \ --restart always \ --publish 80:80 \ --publish 443:443 \ --volumes-from pmm-data \ --name pmm-server \ percona/pmm-server:2.11.1
7. Verify PMM Server installation by visiting server_hostname:80 or server_hostname:443 and reset the admin password. The default user/password is admin/admin.
All that is left now is to install the clients and start using your brand new Percona Monitoring and Management instance. If you have questions or run into trouble, feel free to reach out to us at the Percona Forums.
by Ivan Groenewold via Percona Database Performance Blog