CTC Server SetupNewThis content is new.
The CTC Server (CAESES Task Controller) is a modular system designed to extend CAESES with advanced job scheduling capabilities.
Currently, the CTC server comes with the Slurm Bridge module, which replaced the SSH resource manager. Its main purpose is to act as a SLURM (Simple Linux Utility for Resource Management) bridge, enabling CAESES to:
- Submit jobs to Slurm queues
- Monitor job states
- Cancel jobs
- Allow monitoring of jobs via a lightweight web interface
Prerequisites
- CAESES version: 5.4.0 or higher
- Operating systems: Linux
- SLURM version: 20.x or newer (for Slurm Bridge module)
- Network: HTTP connectivity between CAESES and CTC Server
- Permissions: User account with SLURM command execution rights (
squeue,sbatch,scancel,scontrol)
Installation (Linux)
-
Download the CTC server from our website.
-
Extract the provided
.tar.gzpackage.tar -xvzf ctc-server-x.y.z.tar.gzcd ctc-server-x.y.z/bin -
The executable is located in the
bin/directory. -
All required dependencies are bundled with the package.
Systemd Service Setup (Linux)
You can run the CTC Server as a background service using systemd.
-
Create a new systemd service file:
sudo nano /etc/systemd/system/ctc-server.service -
Add the following content (adjust
<ctc-installation-path>and<user>accordingly):ctc-server.service[Unit]Description=CTC ServerAfter=network.target[Service]Type=simpleExecStart=/<ctc-installation-path>/bin/ctcserverWorkingDirectory=/<ctc-installation-path>/Restart=on-failureUser=<user># Make the Slurm binaries (sbatch/squeue) and configuration available to the service.# Adjust the paths to match your Slurm installation.Environment=PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbinEnvironment=SLURM_CONF=/etc/slurm/slurm.conf[Install]WantedBy=multi-user.targetSlurm environment is requiredThe
Environment=PATH=...andEnvironment=SLURM_CONF=...lines are essential when the CTC Server submits jobs to Slurm. systemd starts services with a minimal environment that does not include the Slurm binaries (sbatch/squeue) onPATHor theSLURM_CONFvariable, so the server cannot reach Slurm without them.Environment=PATH=...replaces the entirePATHrather than extending it, so the value must contain both the Slurmbindirectory and the standard system directories. Run the following in a shell that can submit jobs to generate a ready-to-paste line with the Slurm location prepended to the system's standardPATH:echo "Environment=PATH=$(dirname "$(which sbatch)"):$(getconf PATH)"Look up the configuration path the same way with
scontrol show config | grep SLURM_CONF, then copy both values into the unit. -
Reload systemd and enable the service:
sudo systemctl daemon-reloadsudo systemctl enable ctc-serversudo systemctl start ctc-server -
Verify the status:
systemctl status ctc-server
Configuration
The CTC Server uses an INI configuration file, typically called ctcconfig.ini.
- File format:
.ini - Default location:
bin/folder in the installation directory (same folder as the executable)
[Core]
datadir=/mnt/data/shared/
port=5170
bind_address=0.0.0.0
logpath=/mnt/data/shared/log/
logkeep=30
numLogs=1000
[DB]
name=ctcserver.db
Parameters
[Core]
datadir/core-data-dir- Base directory used by the CTC Server to manage runtime data.
- Default:
<installation_dir>/data/
port- Port on which the web interface is served.
- Default:
5170
bind_address- Address/interface the web server binds to.
- Example:
127.0.0.1(local only), or0.0.0.0(all interfaces)
[DB]
name- Name of the SQLite database file used by the server.
- Default:
ctcserver.db - Stores:
- Job counter
- Mapping of CAESES job IDs ↔ Slurm job IDs (for crash recovery)
- Other runtime configuration data
Security Considerations
The CTC Server ships with default credentials (username: admin, password: admin). You should change the default password immediately after installation to prevent unauthorized access.
Authentication
The CTC Server uses JWT (JSON Web Token) based authentication for both the web interface and API access:
- All API endpoints require authentication
- Sessions expire after 1 hour of inactivity
- Default credentials:
admin/admin - Password can be changed via the web interface
Logs
Logging behavior is controlled by the following parameters:
logpath- Log files are stored under the directory specified in
Core/logpath. If no path is specified, logs will be stored in a folder calledlogslocated in thebin/directory alongside the executable.
- Log files are stored under the directory specified in
logkeep- Number of days logs are retained before deletion, is configured via
Core/logkeep
- Number of days logs are retained before deletion, is configured via
numLogs- Maximum number of log files to keep before rotation/deletion.
Local database (DB/name) complements logs by storing job counters and mappings.
Architecture
The CTC Server is designed with a modular architecture:
- Core functionality includes authentication, web interface, database management, and logging
- Task controller modules provide specific capabilities (e.g., Slurm Bridge for SLURM integration)
Additional task controller modules will be added in future releases to extend functionality beyond Slurm.