One Ring Install

Installing One Ring is as simple as any Java EE web app, and simpler than most. Here's the quick way to get running with Tomcat:

- These builds work with Java 7. Make sure you have Java 7 installed.- If you haven't installed tomcat before, I recommend downloading the .zip package including tomcat below and just unpacking it to get started.

Edit rules in your editor and copy to the One Ring servers rules directory - by default at [server home directory]/.OneRing/rules

Go to the web interface, click the rules menu link, then click the update menu item to read the new rule sets into the engine

If you are installing on Windows you need to create a c:\tmp directory (or d:\tmp). The complete set of RuleSets are copied into rules.groovy in \tmp to assist with debugging. (This will be fixed shortly https://github.com/nerdErg/One-Ring/issues/4)

If you've installed it on any other server please consider writing up how you did it to share here :-)

Configuration

There is one configuration option: rulesDirectory, which tells One Ring where to load the rules from.You can set the directory in a configuration file or via JNDI. To set it in JNDI make a context .xml file in the [tomcat home]/conf/Catalina/localhost/ directory called rulesEngine.xml that looks like this:

To use a configuration file you need to create a properties file called oneRing.properties then tell the web app where to find it by setting a system environment variable called ONE_RING_CONFIG, e.g.

# export ONE_RING_CONFIG=/[path to the file]/oneRing.properties

In the oneRing.properties file you only need one line:

oneRing.rules.directory=[some path to rules dir]/testRules

Recommended Setup

We started out with One Ring editing the rules and storing them in the HSQL database, however this doesn't provide a robust control over changes and the ability to test and transfer. We decided to fall back on the existing infrastructure we use every day to develop software, Version Controlled files. This lets us use our IDE or favourite editor to edit the rules, save the latest version in our (D)VCS, use our Continuous Integration server to test and possibly deploy the rules, and helps with deployment. So out went the editor and we split out the rules engine so that it can be used in the IDE or and script with jUnit to test your rules.

We recommend you set-up something like this:-

On your development system (rule designer) install an IDE or editor that understands groovy

Associate files with the extension ".ruleset" with Groovy in your IDE

Create a Groovy (or Java) project with a source directory for your rules

Copy the engine.jar to the projects lib directory

Create a Git (or mercurial) repository for your rules

Create a unit test file like the following to test your rules

Once you have written and tested your rules push them to a central repository (like Github or Bitbucket or you own private repo). From the central repository your CI server can pull down the rules and test them. You can then go to your test One Ring server, change to the rules directory and pull the changes in. Then its simply a matter of updating the rules via the web interfaces "update" menu link. You can automate all of this via Jenkins (CI server).

Once you're happy with the tests you can push or pull the rule changes to your production server and "update" it.

What do we do?

We are skilled creators of software that solve your problems.

What is nerdErg about?

nerdErg is about making your life easier. In short these statements sum up what we reckon:

Things should work like we humans want to work.

People have brains, so software should not be dumbed down or complexed up.

It should just bloody work, no really, I want it to just bloody work!

Call it as it is. No one is perfect, and conditions, thoughts, fashion change, that's good, let it be.