Install Loud ML with RPMedit

The RPM for Loud ML can be downloaded from our website or from our RPM repository. It can be used to install Loud ML on any RPM-based system such as OpenSuSE, SLES, Centos, Red Hat, and Oracle Enterprise.

Note

RPM install is not supported on distributions with old versions of RPM, such as SLES 11 and CentOS 5.

All stable versions of Loud ML can be found in our RPM repository

Import the Loud ML PGP Keyedit

We sign all of our packages with the Loud ML Signing Key (PGP key C0DCADA9, available from https://pgp.mit.edu) with fingerprint:

AA8C 857B F0D3 D5A1 B521  000A 2B30 B150 C0DC ADA9

Download and install the public signing key:

rpm --import http://loudml.s3-website-eu-west-1.amazonaws.com/repo/gpg/GPG-KEY-LOUDML

Install Python34edit

Ensure Python3 is installed on your system before installing the loudml packages. You can install Python3 with one of the following commands:

sudo yum install python34
sudo dnf install python34
sudo zypper install python34

Use yum on CentOS and older Red Hat based distributions.

Use dnf on Fedora and other newer Red Hat distributions.

Use zypper on OpenSUSE based distributions

Installing from the RPM repositoryedit

Create a file called loudml.repo in the /etc/yum.repos.d/ directory for RedHat based distributions, or in the /etc/zypp/repos.d/ directory for OpenSuSE based distributions, containing:

[loudml-1.x]
name=LoudML packages for Enterprise Linux 7 - $basearch
baseurl=http://loudml.s3-website-eu-west-1.amazonaws.com/repo/rpm/7/$basearch
gpgcheck=1
gpgkey=http://loudml.s3-website-eu-west-1.amazonaws.com/repo/gpg/GPG-KEY-LOUDML
enabled=1
autorefresh=1
type=rpm-md

And your repository is ready for use. You can now install Loud ML with one of the following commands:

sudo yum install loudml loudml-elastic loudml-influx
sudo dnf install loudml loudml-elastic loudml-influx
sudo zypper install loudml loudml-elastic loudml-influx

Use yum on CentOS and older Red Hat based distributions.

Use dnf on Fedora and other newer Red Hat distributions.

Use zypper on OpenSUSE based distributions

Download and install the RPM manuallyedit

The RPM for Loud ML v1.4.2 can be downloaded from the website and installed as follows:

wget http://loudml.s3-website-eu-west-1.amazonaws.com/repo/rpm/7/x86_64/Packages/loudml-1.4.2-1.el7.centos.x86_64.rpm
wget http://loudml.s3-website-eu-west-1.amazonaws.com/repo/rpm/7/x86_64/Packages/loudml-1.4.2-1.el7.centos.x86_64.rpm.sha512
shasum -a 512 -c loudml-1.4.2.rpm.sha512 
sudo rpm --install loudml-1.4.2.rpm

Compares the SHA of the downloaded RPM and the published checksum, which should output loudml-{version}.rpm: OK.

Note

On systemd-based distributions, the installation scripts will attempt to set kernel parameters (e.g., vm.max_map_count); you can skip this by masking the systemd-sysctl.service unit.

SysV init vs systemdedit

Loud ML is not started automatically after installation. How to start and stop Loud ML depends on whether your system uses SysV init or systemd (used by newer distributions). You can tell which is being used by running this command:

ps -p 1

Running Loud ML with SysV initedit

Use the chkconfig command to configure Loud ML to start automatically when the system boots up:

sudo chkconfig --add loudmld

Loud ML can be started and stopped using the service command:

sudo -i service loudmld start
sudo -i service loudmld stop

If Loud ML fails to start for any reason, it will print the reason for failure to STDOUT. Log files can be found in /var/log/loudml/.

Running Loud ML with systemdedit

To configure Loud ML to start automatically when the system boots up, run the following commands:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable loudmld.service

Loud ML can be started and stopped as follows:

sudo systemctl start loudmld.service
sudo systemctl stop loudmld.service

These commands provide no feedback as to whether Loud ML was started successfully or not. Instead, this information will be written in the log files located in /var/log/loudml/.

By default the Loud ML service doesn’t log information in the systemd journal. To enable journalctl logging, the --quiet option must be removed from the ExecStart command line in the loudmld.service file.

When systemd logging is enabled, the logging information are available using the journalctl commands:

To tail the journal:

sudo journalctl -f

To list journal entries for the loudmld service:

sudo journalctl --unit loudmld

To list journal entries for the loudmld service starting from a given time:

sudo journalctl --unit loudmld --since  "2017-01-01 09:11:13"

Check man journalctl or https://www.freedesktop.org/software/systemd/man/journalctl.html for more command line options.

Checking that Loud ML is runningedit

You can test that your Loud ML node is running by sending an HTTP request to port 8077 on localhost:

GET /

which should give you a response something like this:

{
  "version" : "1.4.2",
  "tagline" : "The Disruptive Machine Learning API"
}

Configuring Loud MLedit

Loud ML defaults to using /etc/loudml for runtime configuration. The ownership of this directory and all files in this directory are set to root:loudml on package installation and the directory has the setgid flag set so that any files and subdirectories created under /etc/loudml are created with this ownership as well. It is expected that this be maintained so that the loudmld process can read the files under this directory via the group permissions.

Loud ML loads its configuration from the /etc/loudml/config.yml file by default. The format of this configuration file is explained in Configuring Loud ML.

Loud ML loads and saves its runtime data from the /var/lib/loudml directory. The content of this directory must not be edited.

The RPM also has a system configuration file (/etc/sysconfig/loudml), which allows you to set the following parameters:

MAX_OPEN_FILES

Maximum number of open files, defaults to 65536.

LM_PATH_CONF

Configuration file directory (which needs to include config.yml, file); defaults to /etc/loudml.

RESTART_ON_UPGRADE

Configure restart on package upgrade, defaults to false. This means you will have to restart your Loud ML instance after installing a package manually.

Note

Distributions that use systemd require that system resource limits be configured via systemd rather than via the /etc/sysconfig/loudml file. See Systemd configuration for more information.

Directory layout of RPMedit

The RPM places config files, logs, and the data directory in the appropriate locations for an RPM-based system:

Type Description Default Location Setting

home

Loud ML home directory or $LM_HOME

/usr/share/loudml

conf

Configuration files including config.yml

/etc/loudml

LM_PATH_CONF

conf

Environment variables including heap size, file descriptors.

/etc/sysconfig/loudml

data

The location of the data files of each model defined on the node.

/var/lib/loudml

storage.path

Next stepsedit

You now have a test Loud ML environment set up. Before you start serious engineering go into production with Loud ML, you will need to do some additional setup: