Skip to content

Appliance

This section outlines how to install the Linux appliance from scratch.

We opt to use Ubuntu in this guide. If you prefer to use any other distribution please contact support and discuss any pitfalls to be aware off.

Hardware requirements

Ubuntu Server 24.04 LTS is used as the basis for the InfraSonar appliance.

When using a virtual machine we suggest using these specifications:

  • CPU: 2 CPU
  • Memory: 2 GB memory
  • Disk: 50 GB HDD
  • Name: infrasonar-appliance

VMWare specifics

  • Compatibility: Compatible with: ESXi 6.5 and later VM version 13
  • Guest OS Family: Linux
  • Guest OS Version: Ubuntu Linux (64-bit)

Ubuntu Installation steps

You can download the required Ubuntu Server 24.04 LTS ISO here.

Boot from the Ubuntu Server 24.04 LTS ISO and then follow these steps:

  1. First step is to boot from the Ubuntu ISO or from a bootable USB stick.
  2. Select your language: English.
  3. If prompted to to update to the new installer please do so.
  4. Keyboard configuration: (feel free to change to your situation)
    1. Layout: English (US).
    2. Variant: English (US).
  5. Choose the type of install: Ubuntu server (minimized)
  6. Network configuration: choose the appropriate network configuration for your environment
  7. Proxy address: enter a proxy address if your environment uses a proxy, otherwise leave empty.
  8. Mirror address: keep as it is, unless you know what you are doing.
  9. Guided storage configuration:
    1. Select: Use an entire disk.
    2. Deselect: Set up this disk as an LVM group.
  10. Storage configuration:
  11. Review the file system summary and select: Done.
  12. Confirm destructive action, by clicking: Continue.
  13. Profile setup: (feel free to pick your own username and server name)
    1. Your name: sysadmin.
    2. Your server's name: infrasonar-appliance.
    3. Pick a username: sysdmin.
    4. Choose a password:
    5. Confirm your password:
  14. SSH Setup:
    1. Select: Install OpenSSH Server.
    2. Import SSH identity: Usually no, but feel free to enter your own.
  15. Featured Server Snaps: do not select any server snaps.
  16. If the installation is ready, select: Reboot now.

InfraSonar installation steps

Login to the appliance using SSH to perform the post installation steps.

ssh sysadmin@<server-ip>

Note all steps below can be easily executed using our quick deploy script:

sudo /bin/bash -c "$(curl -fsSL https://deploy.infrasonar.com)"

Do not run this script on an existing Linux system

Our quick deploy script is meant to be used on a clean Ubuntu server installation. Using it on an existing system can cause unexpected results!

Manual InfraSonar installation

Upgrade

First step is to update and upgrade your Ubuntu installation so we are current before proceeding.

sudo apt update
sudo apt upgrade
sudo reboot

VMware tools

Optional

When running on a VMware hypervisor it is recommended to install open-vm-tools.

# Update the APT package index.
sudo apt update
# Install open VMware tools.
sudo apt install -y open-vm-tools

Miscellaneous tools

sudo apt install -y vim nano cron dnsutils snmp iputils-ping curl snmpd tmate jq

The above command installs a list of useful tools:

  • vim, VI text editor.
  • nano, text editor.
  • cron, task schedular.
  • dnsutils, handy tool for debugging dns issues.
  • snmp, snmpd daemon used to monitor the Linux operating system.
  • iputils-ping, tools for debugging network issues.
  • curl, command-line downloader
  • tmate, teamviewer like solution used to offer remote support on request.

SNMPD

As we use the default community string public and only require the snmpd daemon to listen on localhost, no further configuration is required.

# Read-only access to everyone to the systemonly view
rocommunity  public default
rocommunity6 public default -V systemonly

Docker installation

All InfraSonar components run as Docker containers and are orchestrated using docker-compose.

The official Docker engine installation instructions can be found here.

sudo curl -sSL https://get.docker.com | bash

Unattended updates

As we want the InfraSonar appliance to be zero maintenance, we configure unattended updates and allow the appliance to reboot when necessary at 2:00 CET.

Create the following script as /root/ubuntu_update.bash:

ubuntu_update.bash
#!/bin/bash

# Log file for updates
LOG_FILE="/var/log/ubuntu_automatic_updates.log"

# Function to perform the updates
perform_updates() {
  echo "$(date): Starting automatic updates..." >> "$LOG_FILE"

  # Update package lists
  apt update >> "$LOG_FILE" 2>&1

  # Upgrade installed packages (including new packages if needed)
  apt upgrade -y >> "$LOG_FILE" 2>&1

  # Dist-upgrade to handle distribution upgrades if available (use cautiously)
  # apt dist-upgrade -y >> "$LOG_FILE" 2>&1  # Uncomment if you want dist-upgrades

  # Autoremove to remove unused packages
  apt autoremove -y >> "$LOG_FILE" 2>&1

  # Autoclean to remove old downloaded package files
  apt autoclean -y >> "$LOG_FILE" 2>&1

  # Check if a reboot is required
  if [ -f /var/run/reboot-required ]; then
    echo "$(date): Reboot required. Rebooting..." >> "$LOG_FILE"
    # Remove the lock file
    rm /tmp/ubuntu_automatic_updates.lock
    reboot
  else
    echo "$(date): No reboot required." >> "$LOG_FILE"
  fi

  echo "$(date): Automatic updates completed." >> "$LOG_FILE"
}


# Check if the script is already running
if [ -f /tmp/ubuntu_automatic_updates.lock ]; then
  echo "$(date): Automatic updates already running. Exiting." >> "$LOG_FILE"
  exit 1
fi

# Create a lock file
touch /tmp/ubuntu_automatic_updates.lock

# Perform the updates
perform_updates

# Remove the lock file
rm /tmp/ubuntu_automatic_updates.lock

exit 0

Add this script to crontab of user root like this:

sudo sh -c '(crontab -l ; echo "0 2 * * * /root/ubuntu_update.bash") | crontab -'

Note using sudo crontab -e you can edit the schedule to your liking.

InfraSonar installer

Our InfraSonar installer is available on GitHub

The following command ensure download and execution of our latest installer:

cd $(mktemp -d)
wget -q -O appliance-installer-linux-amd64.tar.gz $(wget -q -O - https://api.github.com/repos/infrasonar/appliance-installer/releases/latest  |  jq -r '.assets[] | select(.name | contains ("linux")) | .browser_download_url')
tar -xzvf appliance-installer-linux-amd64.tar.gz
sudo ./appliance-installer

Follow the prompts from the installer, this will look something like this:

Installation Path (enter path or press Enter for default: /etc/infrasonar)

Please provide a token for the Agentcore (container token with `CoreConnect` permissions):
<your token appears here>
Please provide a token for the agents (container token with `Read`, `InsertCheckData`, `AssetManagement` and `API` permissions):
<your token appears here>

################################################################################

  The appliance for zone 0 will be deployed in the '/etc/infrasonar' directory

################################################################################

Do you want to continue? (yes/no)
yes
Please be patient, this may take a while...