Edge Delta on Linux
4 minute read
Overview
You can install the Edge Delta fleet on a Linux-based operating system. These instructions are applicable to any Linux installations, including bare metal and virtualized setups
Release Package
The https://release.edgedelta.com/release/install.sh release package:
- Detects your architecture and operating system, and then
- Chooses and downloads the latest version of the Fleet self-extracting script, which includes the content to be extracted at the end of the script.
To check the package’s integrity, the script header will extract commands and content checksum. The script will fail if the content has been tempered with. For example, the v0.1.19/edgedelta-linux-amd64.shheader
includes:
CRCsum="1944320463"
MD5="a98b537444f18d97a06b428b9cb223ce"
If the package has not been tempered with, the script will:
- Extract the Fleet into a temporary directory,
- Set the apikey file with the given ED_API_KEY environment variable, and then
- Run
unix_install.sh
The unix_install.sh
command will copy the contents to /opt/edgedelta/agent/
, run the following commands to install Edge Delta as a system service, and start the service:
./edgedelta -s install
./edgedelta -s start
Standard Installation
Select the Linux template option while following these steps and execute the command with sudo
:
- Click Pipelines.
- Click New Fleet.
- Select Edge Fleet.
- Optionally, expand Advanced Fleet Configuration and select a pipeline with a configuration you want to duplicate.
- Click Continue.
- Select the appropriate template and click Continue.
- Specify a name to identify the Fleet.
- Click Generate Config.
- Execute the installation commands, they include the unique ID for the Fleet.
- Expand the namespaces and select the input sources you want to monitor.
- Select the Destination Outputs you want to send processed data to, such as the Edge Delta Observability Platform.
- Click Continue.
- Click View Dashboard.
The installation process will deploy Edge Delta into the /opt/edgedelta/agent/
path. Additionally, the edgedelta
system service will start automatically with default configurations.
The ED_ENV_VARS special variable can be used in the installation command to pass one or more persistent environment variables to the Fleet, which will run as the system service. To view a full list of variables that the fleet supports, see Environment Variables.
sudo ED_API_KEY=12345 \
ED_ENV_VARS="MY_VAR1=MY_VALUE_1,MY_VAR2=MY_VALUE_2" \
bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"
Install in a Custom Path
You can use the ED_INSTALL_PATH
environment variable to install the agent in a custom path rather than the default path. Add the environment variable to the installation instructions provided by the Edge Delta app, for example:
sudo ED_API_KEY=12345 \
ED_ENV_VARS="ED_INSTALL_PATH=/opt/custom/edgedelta/agent" \
bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"
SELinux Configuration in Enforcing Mode
To ensure compatibility with SELinux in enforcing mode, apply the following commands after the standard installation:
sudo semanage fcontext -a -t bin_t -f f /opt/edgedelta/agent/edgedelta
sudo restorecon -v /opt/edgedelta/agent/edgedelta
sudo systemctl restart edgedelta.service
(Alternative) Offline Installation
Instead of the Standard Installation, you can use an offline installation method. With this option, you do note need to use curl in a bash script on your production environment.
- Follow the steps for a Standard Installation on a non-production machine with the same architecture and OS as the target production machine.
- Compress the agent folder:
sudo tar -czvf agent_archive.tgz /opt/edgedelta
- Copy
agent_archive.tgz
to the target machine via SSH or other means. - Extract the archive under /opt/edgedelta:
sudo tar -xzvf agent_archive.tgz -C /
- Install and start the service:
sudo cd /opt/edgedelta/agent/
sudo ./edgedelta -s install
sudo ./edgedelta -s start
Set Memory Limits for the Fleet (Optional)
If the edgedelta
service reaches its memory limits it will restart. If you notice that the service restarts frequently, you can increase the limits. If you do not want to change your memory limits, you can enable memory profiling and contact support with a heapdump from the profiler. To learn more, see Troubleshoot Memory Limits.
When you set memory limits, a backup file (.bak) of the edgedelta.service will be created in case you need to revert your changes.
This command sets memory limits to 500MB for physical and 3GB for virtual:
sed -i.bak 's/^\[Service\]/\[Service\]\nMemoryLimit=500M\nMemorySwapMax=3G/g' /etc/systemd/system/edgedelta.service
YOu can verify that the limits are enabled:
memory.limit_in_bytes
displays the physical memory limit.
cat /sys/fs/cgroup/memory/system.slice/edgedelta.service/memory.limit_in_bytes
memory.memsw.limit_in_bytes
displays the virtual memory limit.
cat /sys/fs/cgroup/memory/system.slice/edgedelta.service/memory.memsw.limit_in_bytes
Upgrade the Fleet
To upgrade the Fleet, you run the installation command that you previously used to first deploy the Fleet.
Uninstall the Fleet
The following script uninstalls the fleet as the root user:
#!/bin/bash
set -uex
install_path="/opt/edgedelta/agent"
if [[ ! -z "${ED_INSTALL_PATH:-}" ]]; then
install_path="$ED_INSTALL_PATH"
fi
BITS=$(getconf LONG_BIT)
if [ "$BITS" == "32" ]; then
echo "This script does not support 32 bit OS. Contact info@edgedelta.com"
fi
echo "Stopping agent service"
sudo $install_path/edgedelta -s stop
echo "Removing agent service"
sudo $install_path/edgedelta -s uninstall
echo "Removing edgedelta folder"
sudo rm -rf $install_path
echo "Done"