Compiling Glu Source

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

Compiling Glu Source

plutoswan
I'm trying to compile the latest source from github with mixed success.

When running 'gradle test' from the command line, the whole thing compiles with one failed test (testDeserializationBackwardCompatibility), this I can live with. But I'm an intellij noob and I keep getting stuck importing it into the IDE. The error given is:

can't register given type of path 'SOURCE' because it is out content root. Content root: '/Users/<home>/<path>/glu/scripts/org.linkedin.glu.script-hello-world'. Given path: '/Users/<home>/<path>/glu/out/build/scripts/org.linkedin.glu.script-hello-world/src/main/groovy'

Obviously all the dependencies are resolved as it compiles from the command-line. I have a valid bintray api key. My .userConfig.properties is in my user home with a single entry of bintray.apiKey=<key>. I import the project via intellij 12 Ultimate, File > Import Project...   and then pick root build.gradle of the multi-project build. Is this correct or am I just way off?

thanks

Paul
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Glu Source

frenchyan
Administrator
Did you check the deployment setup documentation? http://pongasoft.github.io/glu/docs/latest/html/dev-setup.html

* To compile/test, you should use ./gradlew test at the root of the folder to make sure it is the proper version of gradle
* For IDEA support, run ./gradlew cleanIdea idea  and open the project created (.ipr) in IDEA. 

I have never try to import the build.gradle and unclear what IDEA does with it... this is why I use gradle to generate the .ipr project

Yan


On Wed, Jun 19, 2013 at 8:53 PM, plutoswan [via glu] <[hidden email]> wrote:
I'm trying to compile the latest source from github with mixed success.

When running 'gradle test' from the command line, the whole thing compiles with one failed test (testDeserializationBackwardCompatibility), this I can live with. But I'm an intellij noob and I keep getting stuck importing it into the IDE. The error given is:

can't register given type of path 'SOURCE' because it is out content root. Content root: '/Users/<home>/<path>/glu/scripts/org.linkedin.glu.script-hello-world'. Given path: '/Users/<home>/<path>/glu/out/build/scripts/org.linkedin.glu.script-hello-world/src/main/groovy'

Obviously all the dependencies are resolved as it compiles from the command-line. I have a valid bintray api key. My .userConfig.properties is in my user home with a single entry of bintray.apiKey=<key>. I import the project via intellij 12 Ultimate, File > Import Project...   and then pick root build.gradle of the multi-project build. Is this correct or am I just way off?

thanks

Paul


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Compiling-Glu-Source-tp4025838.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Compiling Glu Source

plutoswan
Yan,

 RTFM!!

  I skipped over that bit in the docs because it sits alongside production setup I think I thought that was how to setup glu in a development environment which I've already done. Maybe it's worth a rename? or maybe i'm just the only guy who skim reads stuff?* I'll follow those instructions and see how I get on.

I was going to see how easy a feature such as a global initParameters per fabric could be to implement. I've had a quick look at the delta stuff in the orchestration engine and i'm guessing it could be quite hard.

The need for such a feature is to reduce duplicated statements in our fabrics. We using them to deploy a cluster of apps which only differ really by hostname. They can get a bit unwieldly. This could maybe be solved with a parent project or something but it seems a little contrived.

Paul


*got to stop skim-reading stuff
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Glu Source

frenchyan
Administrator
In the glu feature I am currently working on (easy production setup), I have created a json model to represent the glu setup. Part of this work includes parsing the json model of course, but I have also added a "mini" dsl that lets you write groovy instead of json... with all the capabilities of a programming language vs a pure declarative language.

I was thinking adding the same capability to the glu model (the one you are talking about) as it is fairly easy to implement and I believe would help write more concise models.

Here is what the syntax (might look like):

glu-model.json.groovy

// you can define any value you want: it is a full blown groovy script!
def globalInitParameters = [ xxx: vvv, ....]

// you can use loops:
['host1', 'host2', 'host3'].each { agentName ->

  entries << [
    agent: agentName,
    mountPoint: "/mmm"
    initParameters: globalInitParameters
  ]

}

I really like the flexibility of this notation as it allows to write more compact models without having to use an external program to generate it: the program is the model!

Yan

Reply | Threaded
Open this post in threaded view
|

Re: Compiling Glu Source

plutoswan
Yan,

that feature looks pretty cool. I like the program is the model approach.

Our current setup has a level of indirection where we use dependency resolution to work out the latest versions of jars etc to calculate a json model using GString replacement. This is all done in a gradle task and I suppose it's not too unlike the feature you're working on. I'd be very interested to see this in action.