Installation, Configuration and Operation

Installation on Windows

Unzip the Odilon Server zip file in the directory where you want to install the executables
(data directories are elsewhere, defined in the configuration file odilon.properties, see below

Installation on Linux

Example:
We will install the server on /opt/odilon
Data will be in /opt/odilon-data

							
cd /opt
sudo wget http://odilon.io/resources/odilon-server-1.5-beta.tar.gz
							
							

Create Linux user and extract the server

							
sudo useradd -s /sbin/nologin -d /opt/odilon odilon
sudo chown -R odilon:odilon /opt/odilon-server-1.5-beta.tar.gz
sudo tar xvf /opt/odilon-server-1.5-beta.tar.gz
sudo chown -R odilon:odilon /opt/odilon
							
							

create data directory

							
sudo mkdir -p /opt/odilon-data
sudo chown -R odilon:odilon /opt/odilon-data
sudo chmod u+rxw /opt/odilon-data
							
							

Configure the Linux service

							
sudo vi /etc/systemd/system/odilon.service
							
							

The content of file odilon.service

							
[Unit]
Description=Odilon
Documentation=http://odilon.io
Wants=network-online.target
After=network-online.target

[Service]
# Environment must define the variable ODILON_HOME pointing to the installation directory
Environment="ODILON_HOME=/opt/odilon"

# ExecStart must point to startup script 
ExecStart=/opt/odilon/bin/start-service.sh

# WorkingDirectory must point to the installation directory
WorkingDirectory=/opt/odilon

User=odilon
Group=odilon

PermissionsStartOnly=true

# Let systemd restart this service only if it has ended with the clean exit code or signal.
Restart=on-success

StandardOutput=journal
StandardError=inherit

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0

# SIGTERM signal is used to stop Odilon
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0

[Install]
WantedBy=multi-user.target

							
							

Register the Linux service and startup odilon

							
# Enable odilon service
sudo systemctl enable odilon

# reload daemon
sudo systemctl daemon-reload

# Start odilon
sudo systemctl start odilon
							
							

Check status.
If there are errors you can check startup.log and odilon.log (default dir is /opt/odilon/logs)

							
# check status of the service
sudo systemctl status odilon

# the following command should display the info page in the console
# odilon default server (localhost) port (9234) and credentials (accessKey: odilon, secretKey:odilon)
# these parameters can be edited in /config/odilon.properties

sudo curl -u odilon:odilon localhost:9234/info
							
							

Example screenshot -> systemctl status odilon

Example screenshot -> curl

Directories

app/
A self-contained Odilon server.

bin/
Scripts to startup, manage and interact with Odilon instances.

config/
odilon.properties is is Odilon's main configuration file, Other config files (like log4j2.xml for error logging)

examples/
Sample Java classes to create buckets, upload and download files, list objects, and others.

logs/
logs directories

Configuration

Odilon.properties

Odilon configuration is defined in file ./config/odilon.properties
This is where you can set up server url and credentials (url, port, accessKey, SecretKey), and data storage (RAID level, data storage directories), and other parameters

Sample properties file:
odilon.properties

A bare minimum odilon.properties file could be something like this:

	
server.port=9234
accessKey=odilon
secretKey=odilon
redundancyLevel=RAID 0
dataStorage=c:/odilon-data/drive0

Linux config.sh

The file ./bin/config.sh contains parameters required for Odilon to run in Linux


# the directory where the java jvm 11 (or newer) is
# nota that in case you do not know where Java is in your server
# the following shell command should show it:
#
# readlink -f $(which java)
#
# also this command shoild list the JVMs installed
# update-java-alternatives -l
#
export JAVA_HOME="/usr/lib/jvm/jre"
			
					
					
# Linux user that must be used to run odilon
export APP_USER="odilon"
					
# standard jvm parameters
export ODILON_PROPS="
-Xbootclasspath/a:$ODILON_HOME/resources:$ODILON_HOME/config 
-Xms4G 
-Xmx12G
-Dwork=$ODILON_HOME/tmp/ 
Dlog-path=$ODILON_HOME/logs 
-Dlog4j.configurationFile=log4j2.xml 
-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Djava.net.preferIPv4Stack=true 
-Duser.timezone=America/New_York"

Startup and Shutdown

Windows
cd bin/
start.bat to startup the server
check.bat check if the server is running
stop.bat to shutdown the server

Linux
systemctl start odilon to startup the server
systemctl stop odilon to shutdown the server
systemctl status odilon check if the server status

Checking the info page

Odilon Server comes with an embedded web server. Point your web browser to http://127.0.0.1:9234/info to ensure your server has started successfully.
Example:

See sample info page


You can also check the server metrics at any time at /metricscolloquial

See sample metrics page


or using curl in Linux

							
# odilon default server (localhost) port (9234) and credentials (accessKey: odilon, secretKey:odilon)

# display the info page in the console
sudo curl -u odilon:odilon localhost:9234/info

# display the metrics page in the console
sudo curl -u odilon:odilon localhost:9234/metricscolloquial
							
							

Encryption at Rest

Odilon does not encrypt objects by default (from v0.95 beta). In order to store data encrypted you have to initialize the encryption service. The initialization process must be run only once, before starting using encryption:

Shutdown Odilon and execute the script ./bin/enable-encryption.sh (Linux) or .\bin\enable-encryption.bat (Windows).

Odilon will generate two AES keys.

  • Encryption Key
    The encrytion key must be added to the 'odilon.properties' file in variable 'encryption.key'. Example:
    encryption.key = add10ec4b2c1971c036f8132e4654d4e
  • Master Key
    The master key is used internally and it is secret, it is NOT required in 'odilon.properties' or anywhere else. However it may be required to restore the system in case some critical system files are accidental or intentionally deleted in the future, therefore it is recommended that you store it securely. (example 'Master Key -> 6a6cb6f8776f9fb61684dbd5cbe16e81')

The next step is to edit the file odilon.properties:

				
# The encryption key is provided by Odilon when initializing the encryption service using the 
# enable-encryption.sh (Linux) or enable-encryption.bat (Windows) script.
encryption.enabled = true
encryption.key = add10ec4b2c1971c036f8132e4654d4e
				
				

and start Odilon normally.

Version Control

To enable version control set the configuration variable server.versionControl to true in odilon.properties file

				
# default value is false
server.versionControl=true
				
				

Master - Standby configuration

Odilon supports Master - Standby Architecture for disaster recovery, high availability, archival, and ransomware protection. Data replication is done asynchronously using HTTP/S over the local network or the Internet.
Each Odilon (ie. master and standby) can have their own encryption, replication and other configurations.

MASTER SERVER

Include Standby server url and credentials in odilon.properties.
The following example connects to a standby server on localhost port 9211:


# Enable standby connection on the Master server with the following
# 
standby.enabled=true
standby.url=http://localhost
standby.port=9211
standby.accessKey=odilon
standby.secretKey=odilon

STANDBY SERVER

Set up the server in standby mode using the variable server.mode in file odilon.properties of the Standby server:

				
# This value must be added to the odilon.properties of the Standby server				
server.mode = standby
				
				

After restarting both servers, the master server will start a background process to replicate existing data and new operations will be propagated to the standby server asynchronously.

Java Development

Java Application Development with Odilon

Odilon SDK Javadoc

More resources

Odilon Server - GitHub

Odilon demo - YouTube video (4 min)

Odilon Software Architecture