Edge Delta on Docker
4 minute read
Overview
The Edge Delta pipeline can be installed using Docker. You can either run the Edge Delta image stored in the Edge Delta public repository with default settings or you can use a local configuration file. The Edge Delta pipeline is installed as a container, and it analyses logs and metrics from other containers on the host before streaming them to the configured destinations.
Create an Edge Delta Pipeline Configuration
Select the Docker template option in the following steps:
- Click Pipelines.
- Click New Pipeline.
- Select Edge.
- Select the appropriate environment template. If you select Kubernetes, specify a Deployment Type and a Cluster Name.
- Specify a name to identify the pipeline.
- Click Generate Deployment Command.
- Execute the installation commands, they include the unique ID for the pipeline.
- Click View Pipeline.
- Click View Sources Found and select the sources you want to monitor.
- Click Add Sources.
This onscreen command creates a container named Edge Delta, passes in the Pipeline ID required to connect your pipeline to your Edge Delta account on the web app, and installs the latest image located on the Edge Delta public repository. The following example shows the command in the instructions but with an example key 123456789.
docker run --rm -d --name edgedelta -v /var/run/docker.sock:/var/run/docker.sock:ro -e "ED_API_KEY=123456789" gcr.io/edgedelta/agent:latest
Alternatively, you can visit gcr.io/edgedelta/agent and choose a specific agent version.
Note: To route agent traffic through a proxy, add the
HTTP_PROXY,HTTPS_PROXY, orNO_PROXYenvironment variables to thedocker runcommand using the-eflag. See Proxy Configuration for detailed setup instructions and Environment Variables for all available variables.
Installing with Custom Settings
Using a Local Configuration File
If you have a local config.yaml file for the pipeline on the host, you can specify that file by adding the following parameter to the docker run command provided by the web app. In this example, you replace $PWD/config.yml with the absolute path of the local configuration file
-v $PWD/config.yml:/edgedelta/config.yml \
Specifying Resource Limits
The Edge Delta pipeline is a very lightweight resource. Nevertheless, you can limit the CPU or memory resources that the Edge Delta container consumes by adding the following parameter to the docker run command provided by the web app.
--cpus=".25" --memory="256m" \
In this instance the Edge Delta container is limited to one quarter of one CPU and a maximum of 256MB of RAM.
See here for other docker resource constraints that can be set.
Windows Containers on Windows Server 2022
When running the Edge Delta agent as a Windows container on Windows Server 2022, additional configuration is required to access the Docker engine and collect container statistics.
Prerequisites
- Windows Server 2022
- Docker Engine installed
- Edge Delta Pipeline ID (API Key)
Required Configuration
To successfully run the Edge Delta agent Windows container, you must:
- Mount the Docker named pipe to allow the container to communicate with the Docker engine
- Run as the NT Authority\System user to have sufficient privileges to access the Docker engine
Installation Command
The standard Docker installation command from the Edge Delta web app must be modified for Windows containers. Take the command provided in the web app and add the Windows-specific parameters shown below.
Standard command from Edge Delta web app (Linux):
docker run --rm -d --name edgedelta -v /var/run/docker.sock:/var/run/docker.sock:ro -e "ED_API_KEY=your-pipeline-id" -e "ED_API_ENDPOINT=https://api.edgedelta.com" -e "ED_DISABLE_SAMPLE_COLLECTOR=1" gcr.io/edgedelta/agent:latest
Modified command for Windows Server 2022:
docker run --rm -d --name edgedelta `
-v "\\.\pipe\docker_engine:\\.\pipe\docker_engine" `
-e "ED_API_KEY=your-pipeline-id" `
-e "ED_API_ENDPOINT=https://api.edgedelta.com" `
-e "ED_DISABLE_SAMPLE_COLLECTOR=1" `
--user "NT Authority\System" `
gcr.io/edgedelta/agent:latest
Replace your-pipeline-id with your actual Pipeline ID from the Edge Delta web app.
Windows-Specific Parameters
When adapting the Linux Docker command for Windows Server 2022, you must make these changes:
| Change | Purpose |
|---|---|
Replace -v /var/run/docker.sock:/var/run/docker.sock:ro with -v "\\.\pipe\docker_engine:\\.\pipe\docker_engine" | Windows uses a named pipe instead of a Unix socket to communicate with the Docker engine |
Add --user "NT Authority\System" | Runs the container with elevated system privileges required to access the Docker engine pipe on Windows |
Troubleshooting
Access Denied Error
If you encounter an error similar to:
failed to observe ping response from Docker server, err: error during connect:
in the default daemon configuration on Windows, the docker client must be run with
elevated privileges to connect: Head "http://%2F%2F.%2Fpipe%2Fdocker_engine/_ping":
open //./pipe/docker_engine: Access is denied
This indicates one or both of the following issues:
- The Docker named pipe is not mounted correctly
- The container is not running with sufficient privileges
Solution:
- Ensure both the
-v "\\.\pipe\docker_engine:\\.\pipe\docker_engine"volume mount and--user "NT Authority\System"parameters are included in your docker run command