Am finally around to upgrading from 5.0.0 to 5.2.0. With 5.0.0 I have multiple agents (4) all running on the same host. How do I setup the meta-model in 5.2.0 to do this?
Part 2: I would like the console to run on a port other than 8080 (as that is so popular, it is probably not going to be available most places this will be installed). I hand customized 5.0.0 to run on my desired port - is this customizable in 5.2.0?
For running multiple agents on the same machine, you simply need to assign them different ports (and give them a name). Note that the agent has 2 ports but only one is required (the other one is +1 the first one), so in general you need to "space" them 2 apart.
In regards to part 2 yes it is configurable. Here is an example (from the test):
consoles << [
All the values have defaults so you only need to change them if you don't want new ones. "internal" (host, mainPort, and internalPath) are used by the console itself. "external" (externalPort, externalHost and externalPath) are used if you want to put the console in front of a load balancer or outside a firewall => you can specify a totally different host, port and even path.
If the only thing you want to change is the port (to 10000 for example) then simply do:
consoles << [
and don't mention the rest. Note that you can always use the "-J" option of the setup script which will show you all values including the defaults one that you do not specify.
configTokens are parameters that are only used by the component itself (like size of the VM, etc...) (the agent does not care at all what the size of the ZooKeeper VM is...)
If the documentation mentions mainPort as a configToken then this is a mistake. Please let me know where you saw it and I will fix it. It is either defined this way:
or (100% equivalent)
Note that the value is a number, not a string.
I don't understand this question: "Also, now that I have set the "Agent Name" can I have that used as the generated directory name? "
If you use a name for the agent, then the folder and/or zip file generated (when running setup) will have the name of the agent part of it. Isn't it what you want? There is currently no way to configure the name of the artifact generated, but if that becomes a requirement, please submit a feature request. I think that would make sense.
Yes I agree with the fact that configTemplates are very powerful :) The main point of configTemplates is to allow you to customize glu even further without having to build it yourself. Your custom configTemplates leave outside of glu and whenever there is a new release of glu, you simply apply your configTemplates on top of the new release.
Things that you can do with configTemplates
* tweak any file (whether it is a config file or whatever) that comes bundled with glu even if not part of the meta model or config replacement mechanism (ex: css files in the console, replace glu logo, etc...)
* replace jar files entirely with your own (ex: if you want to provide your own set of encrypting keys)
* add files to any component (ex: if you want to bundle more "stuff" served by the console or add your own README)
In the end, configTemplate is a built-in way to automate tweaking glu. Without this mechanism (and prior to 5.2.0) what you would do:
tar -zxvf org.linkedin.glu.agent-server-x.x.x.tgz
"tweak" the distribution (ex: cp myread README, edit bin/agentctl.sh, etc...)
tar -zcvf my-custom-agent-x-x-x.tgz org.linkedin.glu.agent-server-x.x.x
With 5.2.0, you automate this by creating the proper configTemplates and you simply run "setup.sh" and pointing to your own configTemplates => you can apply the same changes over and over with each glu release without having to manually tweak the distribution
was confusing (to me at least) with respect to configtokens. It says:
ZooKeeper uses 3 different ports (when used in a cluster): the client port (aka mainPort, default to 2181), the leader election port (default to 3888) and the quorum port (default to 2888)
which are all configurable:
Check the default templates for zookeeper-server in order to know which configTokens are used by the default templates.