Probes
systemd

Probe Deployment: systemd

This guide will walk you through deploying an IPMN probe using the precompiled binary and systemd.

Prerequisites

  • A registered probe in the IPMN App (opens in a new tab) with a unique Probe ID (UUID) and authentication token (SECRET).
  • A Linux system with systemd installed.

Deployment Steps

  1. Download the precompiled binary: Visit the probe releases (opens in a new tab) page and download the appropriate precompiled binary for your system.

  2. Make the binary executable: Move the binary to a suitable location, such as /usr/local/bin/, and make it executable with the following command:

    chmod +x /usr/local/bin/ipmn-probe
  3. Create a systemd service file: Create a new systemd service file at /etc/systemd/system/ipmn-probe.service with the following content:

    [Unit]
    Description=IPMN Probe
    After=network.target
     
    [Service]
    Environment="UUID=<Probe_UUID>"
    Environment="SECRET=<Authentication_Token>"
    ExecStart=/usr/local/bin/ipmn-probe
    Restart=always
    User=root
     
    [Install]
    WantedBy=multi-user.target

    Replace Probe_UUID and Authentication_Token with the Probe ID and authentication token you received when registering your probe.

  4. Reload systemd: Inform systemd of the new service file and enable it to start automatically at boot:

    sudo systemctl daemon-reload
    sudo systemctl enable ipmn-probe.service
  5. Start the IPMN probe: Start the IPMN probe service with the following command:

    sudo systemctl start ipmn-probe.service
  6. Verify the probe is running: Check the status of the IPMN probe service:

    sudo systemctl status ipmn-probe.service

    If everything is set up correctly, you should see the service running and active.

Updating the IPMN Probe

To update the IPMN probe to the latest version, follow these steps:

  1. Stop the IPMN probe service: Stop the running IPMN probe service with the following command:

    sudo systemctl stop ipmn-probe.service
  2. Download the latest IPMN probe binary: Download the latest precompiled IPMN probe binary from the releases (opens in a new tab) page.

  3. Replace the existing binary: Replace the existing IPMN probe binary with the new one you just downloaded. Ensure that the file permissions are set to make it executable:

    mv /path/to/new-ipmn-probe /usr/local/bin/ipmn-probe
    chmod +x /usr/local/bin/ipmn-probe
  4. Start the updated IPMN probe: Start the updated IPMN probe service with the following command:

    sudo systemctl start ipmn-probe.service
  5. Verify the updated probe is running: Check the status of the updated IPMN probe service:

    sudo systemctl status ipmn-probe.service

    You should see the service running and active with the updated binary.

Your IPMN probe is now deployed and running as a systemd service. The probe will execute assigned tasks and submit the results to the IPMN, contributing valuable data to the platform.