Clarify Docker Setup for PMM Agent/Client
Opened this issue · 2 comments
I'm trying to setup the PMM client/agent with docker for the first time. Setting up the server with docker was pretty straightforward, but I feel like the client setup documentation is quite confusing.
In the last part of the relevant section the following is given:
Run the container to start PMM Agent in setup mode.
[...]
You can now add services with pmm-admin by prefixing commands with docker exec pmm-client.
Isn't there missing something in between? How do I run the container without the setup mode? If I just restart the container, it complains that the associated node name is already registered. If I remove all environment vars from the call, it fails after complaining that you should run a setup. I tried setting PMM_AGENT_SETUP
from 1
to 0
, but that didn't help either.
Furthermore, the next section after the Install -> Docker
one is once again Register
. That doesn't make sense, does it? Shouldn't the latter affect only the non-docker ways of installing?
Maybe I'm just missing something obvious. Support for clarification is appreciated very much!
More or less I got it running by reducing the first command to
docker run \
--rm \
--name pmm-client \
-e PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml \
--volumes-from pmm-client-data \
percona/pmm-client:2
(having dropped most environment variables)
and then registering independently of the above call
docker exec pmm-admin config --server-insecure-tls --server-url=https://admin:admin@X.X.X.X:443
Not sure whether that's a suggested combination.
I guess it makes sense to clarify the documentation either or.
@Johnson145 I'm facing the same issue as you, I agree that the documentation is lacking some steps.
I also noticed that many folder are owned by root, but the container runs as user 1002 pmm-agent. So inside the container I encounter a lot of permission denied.
When we say: PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml to where this relative path point to? In my logs I saw this:
Loading configuration file /usr/local/percona/pmm2/config/pmm-agent.yaml. component=main
But the file is empty.