This is for
https://issues.jboss.org/browse/HAWKULAR-285 . I presume supporting
port-offsets is so we can run integration tests on different ports so they don't step
on other app servers running on the same machine.
I fixed this in the agent - it now gets address/port values the "official"
WildFly way via socket-binding-group/socket-binding (that is, we use the same
configuration mechanisms all other WildFly subsystems use). This also fixes the issue of
having to have ${jboss.bind.address} and ${jboss.http.port} variables in the agent's
"url" attribute. That's because the "url" attribute is no longer
required.
You will notice now the agent running in kettle doesn't configure any URL in
<storage-adapter>. That's because the default is to assume it is running
co-located with the server components, in which case the agent will look at the
<socket-binding> for "http" and use its address and port (defined in the
normal WildFly location down at the bottom of standalone.xml). So you can use port offsets
and it will work.
To support agents running external from the server components, there is a new attribute in
the agent's <storage-adapter> called "serverOutboundSocketBindingRef".
If this is set, you must have a <outbound-socket-binding> setting of the same name
in your socket-binding-group. This defines where your hawkular server is. The agent will
use those socket binding settings to know where to talk to Hawkular server components. For
example, if your agent has this:
<storage-adapter serverOutboundSocketBindingRef="hawkular" ... />
You need to tell WildFly (and hence the agent) about that outbound binding in the
socket-binding-group like this:
<socket-binding-group default-interface="public"
name="standard-sockets"
port-offset="${jboss.socket.binding.port-offset:0}">
...
<outbound-socket-binding name="hawkular">
<remote-destination host="your-external-hawkular-server-hostname"
port="8080"/>
</outbound-socket-binding>
...
When you do this, the agent will use
"http://your-external-hawkular-server-hostname:8080" as its URL to the hawkular
server.
This will get into kettle when this PR is merged:
https://github.com/hawkular/hawkular/pull/162