Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Linux RHEL/CentOS7: Step 3, add note about how to manage systemd service file

Table of Contents
outlinetrue
absoluteUrltrue
stylenone

Setting up Services to Start on Boot

...

  1. Windows: Startup folder, ex: c:\ProgramData\Start Menu
  2. Windows: via the registry
  3. Windows: Task Scheduler
  4. Windows: NSSM
  5. Windows: SVC.EXE/SVCSTART.EXE
  6. Linux: /etc/rc.local/
  7. Linux: /etc/init.d/ SysV LSB-compliant scripts
  8. Linux: systemd .service files
  9. Linux/Windows: using Apache Commons Daemon to install JVM apps as a service.
  10. Linux/Windows: using YAJSW to install JVM apps as a service

The following instructions will focus on the 3rd, 7th, and 6th 8th methods.

Those methods will be used to setup Syndeia Cloud and its dependency, Cassandra, to start on boot

...

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 singlelocal-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 singlelocal-node Cassandra (UTF-16).xml" /tn "Start Syndeia Cloud on boot".

(info) 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 multiremote-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 multiremote-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:

Code Block
languagepowershell
themeRDark
# Replace server.domain with your server FQDN/name
do {
    $result = Test-NetConnection -ComputerName "cassandraserver.mycompany.comdomain" -Port 9042 -InformationLevel "Quiet";
} until ($result)

...

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.

...

Local-node Cassandra

1. From your installation of Syndeia Cloud, copy the syndeia-cloud.singlelocal-node_cassandra.service systemd .service file from <syndeia-cloud-home>/bin/init/confsystemd/ to /etc/systemd/system/ as syndeia-cloud.service, ie: sudo cp </opt/icx/syndeia-cloud-home>/conf3.2/bin/init/systemd/syndeia-cloud.singlelocal-node_cassandra.service /etc/systemd/system/syndeia-cloud.service.

...

2. Run sudo systemctl reload-daemon
3. Run sudo systemctl enable syndeia-cloud

...

(info) To (re)start, stop, or check the status of the syndeia-cloud service, use systemctl, ie:  sudo systemctl <action> syndeia-cloud ; where <action> = (re)start, stop, or status

...

Remote-node Cassandra

1. From your installation of Syndeia Cloud, copy the syndeia-cloud.multiremote-node_cassandra.service systemd .service file from <syndeia-cloud-home>/confbin/init/systemd/ to /etc/systemd/system/ as syndeia-cloud.service, ie: sudo cp </opt/icx/syndeia-cloud-home>/conf3.2/bin/init/systemd/syndeia-cloud.multiremote-node_cassandra.service /etc/systemd/system/syndeia-cloud.service

(info) If this file is unavailable, copy and paste the code from Appendix D4.5 into the above location and comment/uncomment out the relevant section for single or multi-node Cassandra.

2. From your installation of Syndeia Cloud, edit the line below the /etc/systemd/system/syndeia-cloud.service script file and replace server.domain with the FQDN of your server, ex: cassandra.mycompany.com, ie:

Code Block
languagepowershell
themeRDark
ExecStartPre=/bin/sh -c "echo 'Syndeia Cloud: Waiting until Cassandra port is up...';until echo test > /dev/tcp/server.domain/9042 ; do sleep 1; done;"

3. Run sudo systemctl reload-daemon
34. Run sudo systemctl enable syndeia-cloud

...

1. From your installation of Syndeia Cloud, copy the syndeia-cloud.init_script.bash LSB-compliant, SysV, init script from <syndeia-cloud-home>/bin/confinit/SysV/ to /etc/init.d/ as syndeia-cloud, ie: sudo cp </opt/icx/syndeia-cloud-home>/conf3.2/bin/init/SysV/syndeia-cloud.init_script.bash /etc/init.d/syndeia-cloud.

...