Install Mac Agent
  • Dark
    Light

Install Mac Agent

  • Dark
    Light

Overview

You can use this document to learn how to install the Edge Delta agent for your Mac-based operating system.

Note

Before you deploy the agent, we recommend that you review the Review Agent Requirements document.


Step 1: Create a Configuration and Download the Agent

  1. In the Edge Delta App, on the left-side navigation, click Data Pipeline , and then click Agent Settings.
  2. Click Create Configuration.
  3. Select macOS.
  4. Click Save.
  5. In the table, locate the newly created configuration, then click the corresponding vertical green ellipses, and then click Deploy Instructions.
  6. Click macOS.
  7. In the window that appears, copy the command.
    • This window also displays your API key. Copy this key for a later step.

Step 2: Install the Agent

There are 2 ways to install the agent:

  • Option 1: Standard Installation

    • With this option, you will install the agent via cURL in a bash script.
    • This installation is the standard and recommended way to install the agent.
  • Option 2: Offline Installation

    • With this option, you will not use cURL in a bash script on your production environment.
    • You can use this installation method if you have security concerns.

Option 1: Standard Installation

  1. Open a terminal, and paste the command you copied from Step
    • If you are not running as root, then you may be asked to enter the sudo password.
  2. The installation process will deploy Edge Delta into the /opt/edgedelta/agent/ path. Additionally, the edgedelta system service will start automatically with default configurations.
Note

The ED_ENV_VARS special variable is used in the installation command to pass one or more persistent environment variables to the agent, which will run as the system service:

sudo ED_API_KEY=<your api key> \ 
ED_ENV_VARS="MY_VAR1=MY_VALUE_1,MY_VAR2=MY_VALUE_2" \ 
bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"
Note

To view a full list of variables that the agent supports, see Review Environment Variables for Agent Installation.

Note

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 agent self-extracting script, which includes the content to be extracted at the end of the script.

The script's content and extractable scripts are available for inspection at https://release.edgedelta.com/release/install.sh.

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, then the script will:

  • Extract the agent into a temporary directory, then
  • Set the apikey file with the given ED_API_KEY environment variable, and then
  • Run unix_install.sh.
    • This command will copy the content to /opt/edgedelta/agent/and then run the following commands to install edgedelta as a system service and start the service:
      • /edgedelta -s install
      • ./edgedelta -s start

Option 2: Offline Installation

  1. Follow the steps outlined in Option 1 in a non-production machine with the same architecture and OS as the target production machine.
  2. Use the following command to compress the agent folder:

    sudo tar -czvf agent_archive.tgz /opt/edgedelta
    
  3. Copy agent_archive.tgz to the target machine via SSH or other means.
  4. Use the following command to extract the archive under /opt/edgedelta :

    sudo tar -xzvf agent_archive.tgz -C /
    
  5. Use the following commands to install and starts the service:

    sudo cd /opt/edgedelta/agent/sudo 
    ./edgedelta -s installsudo 
    ./edgedelta -s start
    

Troubleshoot the Agent

DescriptionCommand

To check the status of the agent, run the following command:

sudo su
launchctl list edgedelta

To check the agent's log file for any errors that may indicate an issue with the agent, configuration, or deployment settings, run the following command on the Edge Delta service log file path:

cat /var/log/edgedelta/edgedelta.log

To check the agent's configuration file to ensure the configuration does not contain any issue, run the following command on the configuration file path:

cat /opt/edgedelta/agent/config.yml

View Your Agent Version

  1. In the Edge Delta App, on the left-side navigation, click Data Pipeline, and then click Pipeline Status.
  2. Navigate to the Active Agents table.
  3. Review the Agent Version column for your corresponding agent.

Upgrade the Agent

To upgrade the agent, you must run the installation command that you previously used to first deploy the agent.

This action will cause the agent to restart (essentially reinstall). The upgrade process will take 30 seconds or less to complete.

To locate the installation command:

  1. In the Edge Delta App, on the left-side navigation, click Data Pipeline, and then click Agent Settings.
  2. Locate the desired agent configuration, then under Actions , click the vertical ellipses, and then Deploy Instructions.
  3. Click macOS.
  4. Copy and run the command on your command line.

Uninstall the Agent

To uninstall the agent as the root user, review the following script:

#!/bin/bash
set -uex

BITS=$(getconf LONG_BIT)
if [ "$BITS" ==  "32" ]; then
  echo "This script does not support 32 bit OS. Contact info@edgedelta.com"
fi

echo "Removing agent service"
sudo /opt/edgedelta/agent/edgedelta -s uninstall 

echo "Removing agent folder"
sudo rm -rf /opt/edgedelta/agent/

echo "Done"

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.