Skip to content

Directory Layout

This section describes the default Kura directory layout that is created upon installation. The default installation directory is as follows:

/opt/eclipse

The kura sub-directory is a logical link on the actual Kura release directory:

kura -> /opt/eclipse/kura_3.0.0_raspberry-pi-2
kura_3.0.0_raspberry-pi-2

Kura File Structure

The idea behind the Kura file and folder structure is to separate user and framework configuration files, that is files that can be modified by the user to customize Kura behavior and files that are used by Kura to persist configurations. Moreover, some files are generated at runtime by Kura (i.e. database) and they are kept in specific folders.

The user, console, log4j and packages directories contain files that can be modified by the user (i.e. the configuration for the logging or custom Kura properties). The framework folder keeps the configuration files used by Kura and that shouldn't be modified by the user. The data directory is used to persist files that are generated by Kura. Finally, the plugins folder contains all the jar files needed by Kura. All of the Kura files are located within /opt/eclipse/kura folder using the structure shown in the following table:

Directory Description
bin Scripts that start Kura.
console This folder contains files that are used to customise the Kura Web UI appearance.
data Data files generated by the Kura runtime.
data/persistance Embedded Database files.
packages Deployment package files that are not part of the standard Kura framework, but are installed at a later time.
framework Configuration data for Kura framework. The user shouldn't directly modify these files.
log Log file from the latest Kura installation.
log4j Logger framework configuration
plugins All of the libraries and Kura specific jar files needed for the framework execution.
user Configuration files generated by the user or by Kura at runtime. These files can be modified by the user to customise the Kura behavior.
user/snapshots XML snapshot files; up to 10 successive configurations including the original.
user/security Files used by Kura to configure security.
.data Backup files needed to restore factory configuration

Log Files

Kura regularly updates two log files in the /var/log directory:

  • /var/log/kura-console.log - stores the standard console output of the application. This log file contains the eventual errors that are thrown upon Kura startup.

  • /var/log/kura.log - stores all of the logging information from Kura bundles. The logger levels are defined in the log4j.xml configuration file as shown below:

/opt/eclpse/kura/user/log4j.xml

The default logger level in this file is set to INFO. This level may be modified for the whole application or for a specific package as shown in the following example:

<Loggers>
    <Logger name="org.eclipse" level="info" additivity="false">
        <AppenderRef ref="RollingFile"/>
    </Logger>

    <Logger name="org.eclipse.kura.net.admin" level="debug" additivity="false">
        <AppenderRef ref="RollingFile"/>
    </Logger>

    <Root level="info">
        <AppenderRef ref="RollingFile"/>
    </Root>
</Loggers>

In this example, the logger level is set to DEBUG only for the net.admin bundle. Additionally, more specific, properties may be defined as required for your particular logging needs. The logger levels are hierarchical, so that those in a deeper level of the hierarchy will apply; otherwise, the more general logger level will override them.

Once the logger levels are modified as needed and the log4j.xml configuration file is saved, Kura automatically loads the new configuration. By default Kura checks the file every 30 seconds.