Skip to content

IDE Development Environment

gschueler edited this page Oct 18, 2012 · 1 revision

I use IntelliJ IDEA for development, it has pretty good integration with groovy/grails. You should also be able to use Eclipse or Spring's Groovy/Grails Tool Suite.

To run in a Debug/development mode, there are a few things you will want to do:

  1. Get the commandline build working smoothly. this can be via Gradle or Maven. See Building and Testing.

  2. After a build, copy the file rundeck-launcher/rundeck-jetty-server/build/libs/rundeck-jetty-server-1.4.4-dev.jar into the rundeckapp/lib directory.

    This provides the JAAS properties-file based login module you can use in development mode.
    Running via the grails run-app command will automatically use Jetty and be configured to use a default JAAS login configuration named "rundecklogin".

  3. Use these JVM parameters when running grails run-app:

     -XX:MaxPermSize=256m -Xmx512m -Xms256m -server -Djava.security.auth.login.config=web-app/WEB-INF/jaas.conf -Drundeck.config.location=$BASEDIR/server/config/rundeck-config.properties -Drdeck.base=$BASEDIR
    

To break this down,

  • $BASEDIR - This is the location of a development rundeck basedir, which can be empty to start with.
  • -Drdeck.base=$BASEDIR - This tells the app what the basedir is.
  • -Djava.security.auth.login.config=web-app/WEB-INF/jaas.conf - this defines the JAAS config file, pointing at a default version which is included in the source tree, and corresponds to the "rundecklogin" name I mentioned earlier.
  • -Drundeck.config.location=$BASEDIR/server/config/rundeck-config.properties - this rundeck config file should exist, it is the Grails config file.

As well, you can change the port and app context with these JVM parameters: -Dserver.port=4440 -Dgrails.app.context=/

Here is a minimal rundeck-config.properties file:

#rss.enabled if set to true enables RSS feeds that are public (non-authenticated)
grails.serverURL=http://myhostname:4440
dataSource.dbCreate = update
dataSource.url = jdbc:hsqldb:file:/path/to/basedir/server/data/grailsdb;shutdown=true

#note, make sure this is set to "true" if you are using Oracle or Mysql
rundeck.v14.rdbsupport=false

Finally, here is the IDEA Grails "Run/Debug" configuration that I use to run/debug the full app with a development basedir of /Users/greg/rundeck144d:

  • Command line:

    -Dserver.port=4440 -Dgrails.app.context=/ run-app

  • VM Options:

    -XX:MaxPermSize=256m -Xmx512m -Xms256m -server -Djava.security.auth.login.config=web-app/WEB-INF/jaas.conf -Drundeck.config.location=/Users/greg/rundeck144d/server/config/rundeck-config.properties -Drdeck.base=/Users/greg/rundeck144d