Setting up Services to Start on Boot
Overview
There are several ways to setup services to start on boot. These include:
- Windows:
Startup
folder, ex:Âc:\ProgramData\Start Menu
- Windows: via the registry
- Windows: Task Scheduler
- Windows: NSSM
- Windows:Â SVC.EXE/SVCSTART.EXE
- Linux:
/etc/rc.local/
- Linux:
/etc/init.d/
SysV LSB-compliant scripts - Linux: systemd
.service
files - Linux/Windows: using Apache Commons Daemon to install JVM apps as a service.
- Linux/Windows: using YAJSW to install JVM apps as a service
The following instructions will focus on the 3rd, 7th, and 8th methods.
Those methods will be used to setup Syndeia Cloud and its dependency, Cassandra, to start on boot
Note, these instruction assume the user has installed Syndeia Cloud under syndeia-cloud-current
or created a symbolic link (symlink) named syndeia-cloud-current
pointing to the current installed version. For instructions on how to set this up, see Appendix D4.1 for Windows and Appendix D4.2 for Linux.
Windows 2012-R2
The following instructions describe how to setup the Syndeia Cloud service to only start after the Cassandra service has fully started and the port is available on Windows via Task Scheduler.
Local-node Cassandra
1. From your installation of Syndeia Cloud, import in the Start Cassandra on boot (UTF-16).xml
Task from <syndeia-cloud-home>/conf/Windows-Task-Scheduler
, ie: from CMD.EXE
, run schtasks /create /xml "Start Cassandra on boot (UTF-16).xml" /tn "Start Cassandra on boot"
.
2. From your installation of Syndeia Cloud, import in the Start Syndeia Cloud on boot with wait for local-node Cassandra (UTF-16).xml
Task from <syndeia-cloud-home>/conf/
, ie: from Windows-Task-Scheduler
CMD.EXE
, run schtasks /create /xml "Start Syndeia Cloud on boot with wait for local-node Cassandra (UTF-16).xml" /tn "Start Syndeia Cloud on boot"
.
If the above files are unavailable, see Appendix D4.3 to create the Tasks manually via the UI for a single-node Cassandra deployment.
Remote-node Cassandra
1. From your installation of Syndeia Cloud, import in the Start Cassandra on boot (UTF-16).xml
Task from <syndeia-cloud-home>/conf/Windows-Task-Scheduler
, ie: from CMD.EXE
, run schtasks /create /xml "Start Cassandra on boot (UTF-16).xml" /tn "Start Cassandra on boot"
.
2. From your installation of Syndeia Cloud, import in the Start Syndeia Cloud on boot with wait for remote-node Cassandra (UTF-16).xml
Task from <syndeia-cloud-home>/conf/Windows-Task-Scheduler
, ie: from CMD.EXE
, run schtasks /create /xml "Start Syndeia Cloud on boot with wait for remote-node Cassandra (UTF-16).xml" /tn "Start Syndeia Cloud on boot"
.
3. From your installation of Syndeia Cloud, edit the wait_for_cassandra_remote_port.ps1
script file in <syndeia-cloud-home>\bin
and replace server.domain
with the FQDN of your server, ex: cassandra.mycompany.com
, ie:
# Replace server.domain with your server FQDN/name do { $result = Test-NetConnection -ComputerName "server.domain" -Port 9042 -InformationLevel "Quiet"; } until ($result)
If the above files are unavailable, see Appendix D4.4 to create the Tasks manually via the UI for a multi-node Cassandra deployment.
Linux RHEL/Alma 8
The following instructions describe how to setup the Syndeia Cloud service to only start after the Cassandra service has fully started and the port is available on Linux RHEL/CentOS7 or machines with the systemd init system.
1. Run sudo systemctl enable /etc/systemd/system/sc-*
 To disable, run sudo systemctl disable /etc/systemd/system/sc-*