As it is relatively hard (not impossible) to do stuff like adding a
user
inside a (immutable) docker container or to edit standalone.xml to
enable the agent, we need to decide how we add the (default) user
to hawkular docker container and also if/how to enable the embedded
agent.
So I assume what you mean by "hard" is you can't CHANGE the docker image
after it is built. Right? Just making sure that is what you mean.
To enable the agent would involve running a jboss cli command:
./jboss-cli.sh --connect --controller=127.0.0.1 \
'/subsystem=hawkular-wildfly-agent/:write-attribute(name=enabled,value=true)'
Similar CLI commands to get the agent's credentials set up:
./jboss-cli.sh --connect --controller=127.0.0.1 \
/subsystem=hawkular-wildfly-agent/storage-adapter=default/:write-attribute(name=user,value=jdoe)
./jboss-cli.sh --connect --controller=127.0.0.1 \
/subsystem=hawkular-wildfly-agent/storage-adapter=default/:write-attribute(name=password,value=password)
You would have to restart the container once you do that to make the change take effect
(if we want this to happen without a restart, write a HWKAGENT JIRA, that is probably not
hard to get to work).
The more difficult part is getting the user to know to run that and where the user gets
jboss-cli.sh. I guess you can't run a script that is found inside a docker container?