dev setup question

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

dev setup question

javasoze
I followed instruction on: https://github.com/linkedin/glu/blob/master/1-QUICK-DEV-SETUP.md

I am trying to setup start an agent, I did (under 2):

cd agent/org.linkedin.glu.agent-server
gradle setup-2-2
cd ../..

There is an 'out' directory, but no dist under it.

Also, when will there be a binary distribution available.

Thanks

-John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dev setup question

frenchyan
Administrator
Hey John

You found a bug in the documentation. It is fixed now and should read:

###
Go to the dist devsetup folder

    cd out/build/agent/org.linkedin.glu.agent-server/install/devsetup
###

Note that you can use "gradle -i" to get more details about what is going on.

Thanks
Yan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dev setup question

javasoze
Thanks Yan! I was able to follow the rest of the instructions and have things running.

But don't know what to do next :) I think it is because I have 0 background with the grxxx technology stack, thus have no idea if I was building or running... So for me to move forward, it would be great to have a walk thru given a set of pre-built binaries.

Some suggestions:

Run a console, have a .sh file, e.g. bin/start-console.sh start/stop
Start an agent, e.g. bin/start-agent.sh start/stop

Simple as that, and hide the groovy/grail commands from me :)

-John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dev setup question

frenchyan
Administrator
I am glad to see that you could have it up and running.

I definitely have 2 things on my task list:

1) package so that you don't need to build it (this is essentially your suggestions) => no gradle, groovy or grails visible

2) add some standard glu scripts: for example a glu script that install a webapp into tomcat, a glu script that starts memcache...

In the meantime I would suggest the following:
* you can 'play' with the glu script used during the tutorial (if you followed the tutorial) and change the code that is in the various phases. Most likely what you will need is

shell.fetch => to download an artifact
shell.exec => to execute a shell script

You may want to check https://github.com/linkedin/glu/blob/master/agent/org.linkedin.glu.agent-impl/src/main/groovy/org/linkedin/glu/agent/impl/capabilities/ShellImpl.groovy

which contains the possible actions with parameters (I realize that the api is not up to date and I will fix it soon).

example:

class MyGluScript
{
  def root

def install = {
  def tgz = shell.fetch('file:///tmp/myartifact.tgz')
  root = shell.untar(tgz, mountPoint) // untar into a unique location
  shell.chmodPlusX(root.'bin/myshellScript.sh')
  log.info root
}

def start = {
  def output = shell.exec(root.'bin/myshellScript.sh', 'start')
  log.info output
}
}

Yan
Loading...