Not the answer you need?
Register and ask your own question!

How to install pmm-agent into docker container.

rnmkrrnmkr EntrantCurrent User Role Beginner
Hello, I'm trying to implement Percona Monitoring and Management system into my current Percona MySQL servers.
There is a docker image for pmm-server but there isn't one for pmm-agent. I've tried pmm agent by installing on ubuntu virtual machine and it works great! Now I'm wondering how can I do the same for docker. All of my Perconal Servers are running on kubernetes. So I can either install pmm-agent right into percona server dockerfile or I can use sidecar container for pmm-agent.
But it's not clear for me to how can I do this with dockerfile. All steps should be noninteractive, however right now I have to exec into container and run the initial configs. Any ideas?

Comments

  • rnmkrrnmkr Entrant Current User Role Beginner
    Oh well, I just know I can't even install pmm-server on docker. If I bind /var/lib/mysql to host path it doesn't work. Which means I can't use it on Kubernetes cluster.
    Only working solution is use no volumes at all or use it on docker volumes. I guess this software developers doesn't heard of docker or kubernetes.
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    Hi rnmkr

    Thank you for your feedback on PMM, and we're also happy to hear about your usage of Percona Server on Kuberntetes! Are you using an Operator, if so which? I'd be interested to know

    Regarding pmm-agent, are you referring to the command line tool pmm-admin ? We have a docker container for this: https://hub.docker.com/r/perconalab/pmm-client/tags/

    Regarding PMM Server we recently produced a build that ought ot work with OpenShift https://hub.docker.com/r/perconalab/pmm-server-openshift/tags/

    I'm not sure though that it will help you with the volumes mapping issue. What do you suggest we do in this case?

    I've also asked an Engineer to review this case and provide an opinion. Thanks !
  • rnmkrrnmkr Entrant Current User Role Beginner
    Hi rnmkr

    Thank you for your feedback on PMM, and we're also happy to hear about your usage of Percona Server on Kuberntetes! Are you using an Operator, if so which? I'd be interested to know

    Regarding pmm-agent, are you referring to the command line tool pmm-admin ? We have a docker container for this: https://hub.docker.com/r/perconalab/pmm-client/tags/

    Regarding PMM Server we recently produced a build that ought ot work with OpenShift https://hub.docker.com/r/perconalab/...penshift/tags/

    I'm not sure though that it will help you with the volumes mapping issue. What do you suggest we do in this case?

    I've also asked an Engineer to review this case and provide an opinion. Thanks !

    I'm not using any operator, what operator are you assuming of by the way?

    Oh thanks for the docker hub link. Yes that's the pmm-client https://www.percona.com/doc/percona-...pmm-admin.html right? Any documentation on how to use that? At least supported environment variables?

    I'm not sure openshift will work for me, haven't tried yet.

    This issue is not related to kubernetes directly. This bug is reproducable without kubernetes.
    Steps:
    1. pull percona/pmm-server image.
    2. run this command
    docker run -d \ -p 80:80 \ -v /my/sql/data:/var/lib/mysql \ -v /my/consul/data:/opt/consul-data \ -v /my/prometheus/data:/opt/prometheus/data \ -v /my/grafana/data:/var/lib/grafana \ --name pmm-server \ --restart always \ percona/pmm-server:latest assuming pmm-server's data will be saved at host machine's following locations. /my/sql/data, /my/consul/data, /my/prometheus/data, /my/grafana/data
    But it won't work. Check pmm-server log.

    Edit: Sorry my post format is broken when I save. Hope you will get my commands.
  • MykolaMykola Percona Percona Staff Role
    Hi rnmkr,

    if you need to run pmm-server in kubernetes, please use our helm chart - https://github.com/Percona-Lab/percona-openshift/tree/master/helm/helm-pmm-server
    keep in mind, pmm-server will run on 8443 port (not 80, not 433)

    if you want to run pmm-client in docker you can use https://hub.docker.com/r/perconalab/pmm-client/tags/ image
    variables are
    ​​​​​​​ - PMM_SERVER=pmm-server-service
    - PMM_USER=pmm
    - PMM_PASSWORD=pmm
    - DB_TYPE=mysql
    - DB_HOST=ps
    - DB_PORT=3306
    - DB_USER=root
    - DB_PASSWORD=secret

    you can find more examples of here - ​​​​​​​https://gist.github.com/delgod/f8d071d47dbaa57e7cad49bdb219b7d8
  • rnmkrrnmkr Entrant Current User Role Beginner
    Mykola Thanks for reply. I will definitely try out these docker images soon. Quick question, how do I use the helm charts? I mean what is the helm repo URL?
    Example, If I were to install prometheus operator I'd do something like this:
    # Install helm https://docs.helm.sh/using_helm/ then run: helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring helm install coreos/kube-prometheus --name kube-prometheus --namespace monitoring I couldn't find related information on the linked github.
  • MykolaMykola Percona Percona Staff Role
    please use commands below
    git clone https://github.com/Percona-Lab/percona-openshift.git
    cd percona-openshift/helm/helm-pmm-server/
    helm install --name monitoring --set platform=kubernetes .
    
  • alxqazalxqaz Entrant Inactive User Role Novice
    Mykola I have followed by Your instruction (openshift 3.11). It looks fine until container start. Do You have any idea what can be wrong?

    helm install --name monitoring --namespace=alsz-test . -f values.yaml

    PV&PVC look fine.
    NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
    pmmdata-monitoring-0 Bound test-pv 20Gi RWO test-nfs 10m

    Pod in Crash Loop Back-off

    Logs:
    + 1000700000 != 1000
    + sed -e 's^x:1000:^x:1000700000:^' /etc/passwd
    + cat /tmp/passwd
    bash: line 6: /etc/passwd: Permission denied
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.