Skip to content
Sébastien Serre edited this page Sep 25, 2017 · 14 revisions

Build Sysmo Core

To interact with the server, you will need to download/install our fantastic Sysmo-operator UI user interface.

Dependencies

To build from sources, you will need the following dependencies:

  • Git
  • Java JDK version 7 minimum
  • A complete Erlang installation >= 19.0
  • A Go compiler >= 1.4
  • Ruby Rake

Sysmo is presently developed with Openjdk-1.8.0, Erlang-19.3.6 and Go-1.7.5. Other setup should work but are not tested.

Building

When the required dependencies are installed run the following commands:

$ git clone https://github.com/sysmo-nms/sysmo-core.git
$ cd sysmo-core
$ git submodule update --init
$ rake release
...

A new fresh release is created in the ._build/default/rel/sysmo directory. You can use the executable to test it from here:

$ ./_build/default/rel/sysmo/bin/sysmo usage
Usage: sysmo {start|start_boot <file>|foreground|stop|restart|reboot|ping|console|getpid|console_clean|console_boot <file>|attach|eval|remote_console|upgrade}
$ ./_build/default/rel/sysmo/bin/sysmo console

Type "q()." to quit the console.

Deploying

Runtime dependencies

Once built, the only runtime dependency is a Java-JRE >= 7.

Install

There is no "install" target, so extract the generated package archive to your install location ("/opt" for example).

$ rake pack
$ tar -C /opt -xzf _build/sysmo-x64.tgz

The following command will update the "admin" password, and generate a random Erlang Cookie (See the Erlang documentation concerning cookies if you want to know more about it).

$ /opt/sysmo/bin/sysmo_relutils --update_cookie --update_admin_password="secretpassword"
Permissions

The portable ping executable must have root privileges if Sysmo-core is executed from a non root user.

$ sudo chown root /opt/sysmo/utils/pping
$ sudo chmod 4755 /opt/sysmo/utils/pping

The user running the daemon must have read permission on /opt/sysmo and read-write permission on /opt/sysmo/var.

Start

$ /opt/sysmo/bin/sysmo start

Sysmo-Core Networking

These ports must be accessible from the outside in the following cases:

Sysmo-Operator clients accessing the application

Must be opened:

  • port 9758 (client TCP connexion),
  • port 9759 (web services and websocket).
Sysmo-Worker nodes offering ressources to the core server

These ports must be opened:

  • port 9760 (NChecks state server),
  • port 4369 (Erlang epmd),
  • port range 4370-4385 (used by erlang nodes connexion).

What's next

If you plan to have a huge number of elements to monitor, you can see the documentation for installing aditionnal workers at Deploying Sysmo Workers.

Development Mode

The common workflow when working on Sysmo-Core, is:

Modify erlang or java code, I actually use IntelliJ for both languages then,

Build a local debug release ("rake rel" is a shortcut to this)

$ rake debug_release

Start the server,

$ rake run
[...]

Or in one pass:

$ rake rel run

Note that:

  • The release is located at _build/debug/rel/sysmo/,
  • The logs are located at _build/debug/rel/sysmo/log/,
  • pping is not setuid so CheckICMP will raize a "permission denied error"

It is sometimes usefull to start the erlang vm without starting the application (for example, for starting each elements manualy), with the "console_clean" option:

$ ./_build/debug/rel/sysmo/bin/sysmo console_clean

Have fun!