remote agent in Tutorial example, failed to install

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

remote agent in Tutorial example, failed to install

linux168
Install Glu 5.3.1, run "./bin/tutorial.sh start", follow tutorial steps shown in the document, and everything works.
Modify sample-webapp-system.json to add one more agent, 'agent-B', mounting to /sample/i001.
agent-B is in another machine. run "./bin/agentcli.sh -n agent-B start" on the 'agent-B' machine.
Go to console, select and deploy 'agent-B'. Failed to install script for 'agent-B'. Msg is as follows:

Install script for [/sample/i001] on [agent-B] - 239ms
[+] org.linkedin.glu.agent.api.DuplicateMountPointException: /sample/i001

On 'agent-B' machine, I use wget to get following files w/o problem:
  * jetty-distribution-8.1.10.v20130312.tar.gz
  * org.linkedin.glu.samples.sample-webapp-5.3.1.war
  * org.linkedin.glu.script-jetty-5.3.1/JettyGluScript.groovy

What I am I missing? Why I got this:
    DuplicateMountPointException: /sample/i001
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: remote agent in Tutorial example, failed to install

frenchyan
Administrator

Tutorial uses local host. As pointed in another post you cannot mix local host and remote. Try to replace localhost with the actual machine name in the tutorial meta model

Yan

Reply | Threaded
Open this post in threaded view
|

Re: remote agent in Tutorial example, failed to install

linux168
Yes, I did that before I run './bin/tutorial.sh start'. Below is the meta model:
Note:
1) agnet-A is working fine but it is in the Console/zzKeeper machine.
2) /etc/hosts are all fixed so there is no issue for agent-B to contact console
3) don't know how to add agent-B in the 'agents' area. That is no agent-B in the meta model.
    maybe this is the problem. How do I add agent-B to the meta model file? Please Help!
4) gluConsole (shown below in consoles and zooKeeper) is the machine for hosting
    Console/zooKeeper and agent-A
    but gluAgent (shown below in agent) is the machine for hosting agent-B
In short how do I have agent-A and agent-B in "agents <<" section?

---------------- glu-meta-model.json.groovy --------------
fabrics[fabric] = [
  keys: keys,
  console: 'tutorialConsole',
  zooKeeperCluster: 'tutorialZooKeeperCluster'
]

agents << [
  name: 'agent-A',
  host: 'gluAgent',
  fabric: fabric
]

consoles << [
  name: 'tutorialConsole',
  host: 'gluConsole',
  plugins: [
    [
      fqcn: 'org.linkedin.glu.orchestration.engine.plugins.builtin.StreamFileContentPlugin'
    ]
  ],
]

zooKeeperClusters << [
  name: 'tutorialZooKeeperCluster',
  zooKeepers: [
    [
      version: zooKeeperVersion,
      host: 'gluConsole'
    ]
  ],
]
Reply | Threaded
Open this post in threaded view
|

Re: remote agent in Tutorial example, failed to install

frenchyan
Administrator
This is groovy notation. If you would rather use the json notation, you can always use the -J option of the setup tool which will generate the json output which you can then edit.

Otherwise in groovy, you simply add multiple "agents << [:]" statements:

agents << [ 
  name: 'agent-A', 
  host: 'gluAgent', 
  fabric: fabric 


agents << [ 
  name: 'agent-B', 
  host: 'gluAgent', 
  fabric: fabric 


That being said, I do *not* recommend to give agents different names unless you install them on the same machine. In general, you simply need to use the host field and the name of the agents is the host name.

Ex:
// for agent A
agents << [ 
  host: 'host.for.agentA', 
  fabric: fabric 


// for agent B
agents << [ 
  host: 'host.for.agentB', 
  fabric: fabric 


Yan