Review Environment Variables for Agent Installation

George Alpizar
George Alpizar
  • Updated

Overview

You can use this document to learn about the environment variable parameters that can be passed when you install and deploy the Edge Delta agent.


Review Frequently Used Environment Variables

Variable Description Value Example Value
ED_API_KEY

This variable pulls an agent's configuration details, which is generated via the Edge Delta App portal. 

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 0a3a6ca3-0df0-45f8-8ea2-d1329ee3de60
ED_WORKFLOWS

This variable uses a colon-separated list of workflow names to enable matching workflows. 

All other workflow names are disabled, in conjunction with the edWorkflowPrefixes parameter.

name:name:... workflow_1:workflow_2
ED_WORKFLOW_PREFIXES

This variable uses a colon-separated list of workflow prefixes to enable all matching workflows.

All other workflow are disabled, in conjunction with the edWorkflows parameter.

prefix:prefix:... workflow_prod_:workflow_cache_
ED_LEADER_ELECTION_ENABLED

This variable enables or disables agent leader election mechanism in Kubernetes. 

Enter 1 to enable agent leader election mechanism in a Kubernetes environment.

If not enabled, then the Kubernetes event ingestion will be disabled, even if this is activated through configuration.

0 or 1 1
HTTP_PROXY

This variable uses proxy details to route the agent's outbound traffic through an HTTP internal proxy.

domain:port

http://127.0.0.1:3128

127.0.0.1:3128

HTTPS_PROXY This variable uses proxy details to route the agent's outbound traffic through an HTTPS internal proxy. domain:port

https://127.0.0.1:3128

127.0.0.1:3128

NO_PROXY This variable disables the proxy for requests that hit a specific destination.  domain:port https://your-endpoint.com
STORE_PORT This variable uses a port number to expose agent metrics storage. port  6062

 


Review Example for Kubernetes (yml configuration)

The following example is a snippet pulled from Edge Delta's GitHub repository:

spec:
  containers:
  - name: edgedelta
    image: docker.io/edgedelta/agent:latest
    env:
      - name: ED_API_KEY
        valueFrom:
          secretKeyRef:
            key: ed-api-key
            name: ed-api-key
      - name: HTTPS_PROXY
        value: <your proxy details>

 

Note

The ED_API_KEY variable is not defined in the yaml as clear text.

The secret value should be defined using the Kubernetes secrets mechanism within the Kubernetes cluster.

Review the following example:

kubectl create secret generic ed-api-key --namespace=edgedelta --from-literal=ed-api-key="YOUR_API_KEY_VALUE"

Examples - Kubernetes (Helm Deployment)

  1. Download the values.yaml file.
  2. Edit the YAML file to configure the following optional parameters:
    • Enter a secret API key instead of clear text API key
    • Edit the frequently used environment variables 
    • Define one or more custom environment variables
    • One or more custom secret environment variables, which can be used as custom environment variables but also kept as a Kubernetes secret
  3. After the file is updated, follow the steps in the Install the Agent for Kubernetes with Helm document.
  4. After you create a namespace, you must also create secrets, based on the instructions in the YAML file. If not, then the agent will fail to start. 

Review Example for Linux / MacOSX

During installation, the ED_ENV_VARS variable is used when multiple environment variables are specified in a comma-separated format, such as variable1=value1,variable2=value2.

sudo ED_API_KEY=<your api key> \
ED_ENV_VARS="HTTPS_PROXY=<your proxy details>" \
bash -c "$(curl -L https://release.edgedelta.com/release/install.sh)"

Review Example for Docker

docker run --rm -d --name edgedelta \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e "ED_API_KEY=<your api key>" \
-e "HTTPS_PROXY=<your proxy details>" \
edgedelta/agent:latest

Review Example for Windows

On a Windows system, use the following command to define environment variables globally.

  • After you set a variable, the agent service will need to be restarted.  
[System.Environment]::SetEnvironmentVariable('HTTP_PROXY', '<your proxy details>',[System.EnvironmentVariableTarget]::Machine)

Share this document