Difference between revisions of "Monitoring and Management of Percona XtraDB"
| Line 32: | Line 32: | ||
===Start the percona/pmm-server container=== | ===Start the percona/pmm-server container=== | ||
| − | Now that we have the image available we are going to create the pmm-data container using the | + | Now that we have the image available we are going to create the pmm-data container and start it using the scripts below |
| + | |||
| + | Script to create the container | ||
#!/bin/bash | #!/bin/bash | ||
| Line 42: | Line 44: | ||
--name pmm-data \ | --name pmm-data \ | ||
percona/pmm-server:latest /bin/true | percona/pmm-server:latest /bin/true | ||
| + | |||
| + | Script to start the container | ||
| + | |||
| + | #!/bin/bash | ||
| + | docker run -d \ | ||
| + | -p 80:80 \ | ||
| + | --volumes-from pmm-data \ | ||
| + | --name pmm-server \ | ||
| + | --restart always \ | ||
| + | percona/pmm-server:latest | ||
Revision as of 22:43, 9 May 2018
For this tutorial, we will install Percona Monitoring and Management server (PMM server) on a separate node and pmm-client on each database node
Prerequisites
We have three (3) different ways of running PMM server 1- Running PMM server via Docker 2- Running PMM server as a Virtual Appliance 3- Running PMM server Using AWS Marketplace
For the purpose of this tutorial, we we be running PMM server via Docker. So you will need node running Docker. I will not convert the installation of docker in this tutorial.
Getting the PMM server up and running
Download the percona/pmm-server image
Login to your docker node and run
docker images
output
root@docker2001:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest ae513a47849c 9 days ago 109MB ubuntu latest 0458a4468cbc 3 months ago 112MB
In my case i have only 2 images no percona/pmm-server image. Lets go ahead and download the percona/pmm-server images by issuing the command
docker pull percona/pmm-server:latest
Now if we run again the commande "docker images" we should see the percona/pmm-server image
Output
root@docker2001:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest ae513a47849c 9 days ago 109MB percona/pmm-server latest 62f64eeb6eec 2 weeks ago 842MB ubuntu latest 0458a4468cbc 3 months ago 112MB
Start the percona/pmm-server container
Now that we have the image available we are going to create the pmm-data container and start it using the scripts below
Script to create the container
#!/bin/bash docker create \ -v /opt/prometheus/data \ -v /opt/consul-data \ -v /var/lib/mysql \ -v /var/lib/grafana \ --name pmm-data \ percona/pmm-server:latest /bin/true
Script to start the container
#!/bin/bash docker run -d \ -p 80:80 \ --volumes-from pmm-data \ --name pmm-server \ --restart always \ percona/pmm-server:latest