Run resilient-circuits as a service

Configure resilient-circuits to run it as a systemd service.

Optionally, you can set up resilient-circuits as a systemd service to start automatically at system boot:

  1. Open a terminal session, log in to IBM Resilient with SSH, and create a systemd service configuration file for resilient-circuits:

    vi /etc/systemd/system/resilient_circuits.service
  2. Populate the empty file with the following details:

    The following service configuration file example assumes that:

    • You log in to IBM Resilient with the resadmin user.

    • The IBM Resilient app.config file is stored in the default location: /home/resadmin/.resilient

    • All examples feature mock values.
      Make sure paths and other values you set in the service configuration file are relevant to your environment.

    [Unit]
    Description=Resilient Circuits Service
    After=resilient.service
    Requires=resilient.service
     
    [Service]
    Type=simple
    User=resadmin
    WorkingDirectory=/home/resadmin
    ExecStart=/usr/local/bin/resilient-circuits run
    Restart=always
    TimeoutSec=10
    Environment=APP_CONFIG_
    FILE=/home/resadmin/.resilient/app.config
    Environment=APP_LOCK_FILE=/home/resadmin/.resilient/resilient_circuits.lock
     
    [Install]
    WantedBy=multi-user.target
  3. Assign read and write permissions to the resadmin user and the resadmin group, and read-only permission to other users and groups:

    sudo chmod 664 /etc/systemd/system/resilient_circuits.service
  4. Enable the resilient-circuits service to automatically start at system boot:

    systemctl enable resilient_circuits
  5. Reboot the system to start the service automatically.