1. broker – An AMQP message broker, which defaults to Apache Qpid
  2. database – Database used to store internal settings and configuration
  3. webserver – webserver for the CycleServer platform and installed plugins

The default command for managing these services is the cycle_server script that you can find at the base of your CycleServer install. The basic commands that it supports are:

  • start – start all services if they are not already started
  • stop – stop all services
  • restart – restart all services
  • status – status of services

You can also manage individual services using the start, stop, and restart commands. For example you can choose to restart the broker but not the database nor the webserver:

$ ./cycle_server restart broker

The ./cycle_server script also provides the more advanced command execute which can be used to run queries against the datastore.

CycleServer System Settings

Before you get started with plugin development, there are some CycleServer settings that will make debugging easier. Log in to the CycleServer UI, click the ‘admin > System Settings’ link in the upper right-hand corner of the screen, then in the lower left-hand corner click ‘Show All’. Change the following settings:

  • common.execution_mode – set to ‘devel’.
  • Logging level – set to ‘DEBUG’

The main configuration file for CycleServer installation is ./config/cycle_server.properties.

Once these changes are complete, restart CycleServer by issuing the following commands:

./cycle_server restart webserver

The primary log file for CycleServer is logs/cycle_server.log

Configuring Your Environment

Components for CycleServer are built using a build tool called Gradle. Note that CycleServer depends on Gradle 2.0 or greater. While other build systems may be used to develop plugins, Gradle is the recommended tool for building plugins and components. CycleServer provides a plugin to Gradle to build components in the standard format.

  1. Make sure you have the JDK 8 installed. Note that the JRE is not sufficient. You can download the correct version for your platform from Oracle.

    Note

    Java 8 is short for Java 1.8. The installation directory will typically contain a version like 1.8.x.

  2. Make sure $JAVA_HOME (or %JAVA_HOME% for Windows) is set correctly. This means that you can run the following command:

    $JAVA_HOME/bin/javac
    
  3. Download Gradle and install it according to the instructions.

  4. From the root directory of your CycleServer install ($CS_HOME), run util/devel initialize. This creates an initialization script in $CS_HOME/.gradle/init.d that configures Gradle to build Cycle components. The file $CS_HOME/.gradle/init.d/cycle_component.gradle should be copied to ~/.gradle/init.d/.

  5. Gradle needs to know the location of your CycleServer installation to build against the libraries. Create a file named ~/.gradle/gradle.properties with the following line:

    CS_HOME=/path/to/your/CycleServer