System Requirements
Dependencies
Git
Docker
Tools
Download EdgeX Compose
Additional Installs
Next Steps
- Intel™ Core® processor
- Ubuntu 20.04.4 LTS
- USB-compliant Camera
The software has dependencies, including Git, Docker, Docker Compose, and assorted command line tools. Follow the instructions below to install any dependency that is not already installed.
Install Git from the official repository as documented on the Git SCM site.
-
Update installation repositories:
sudo apt update
-
Add the Git repository:
sudo add-apt-repository ppa:git-core/ppa -y
-
Install Git:
sudo apt install git
Install Docker from the official repository as documented on the Docker site.
To enable running Docker commands without the preface of sudo, add the user to the Docker group. Then run Docker with the hello-world
test.
-
Create Docker group:
sudo groupadd docker
NOTE: If the group already exists,
groupadd
outputs a message: groupadd: groupdocker
already exists. This is OK. -
Add User to group:
sudo usermod -aG docker $USER
-
Refresh the group:
newgrp docker
-
To verify the Docker installation, run
hello-world
:docker run hello-world
A Hello from Docker! greeting indicates successful installation.
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
Install Docker from the official repository as documented on the Docker Compose site. See the Linux tab.
-
Download current stable Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
NOTE: When this guide was created, version 1.29.2 was current.
-
Set permissions:
sudo chmod +x /usr/local/bin/docker-compose
Install the build, media streaming, and parsing tools:
sudo apt install build-essential jq curl
NOTE: The device service ONLY works on Linux with kernel v5.10 or higher.
The table below lists command line tools this guide uses to help with EdgeX configuration and device setup.
Tool | Description | Note |
---|---|---|
curl | Allows the user to connect to services such as EdgeX. | Use curl to get transfer information either to or from this service. In the tutorial, use curl to communicate with the EdgeX API. The call will return a JSON object. |
jq | Parses the JSON object returned from the curl requests. |
The jq command includes parameters that are used to parse and format data. In this tutorial, the jq command has been configured to return and format appropriate data for each curl command that is piped into it. |
Table 1: Command Line Tools
-
Create a directory for the EdgeX compose repository:
mkdir ~/edgex
-
Change into newly created directory:
cd ~/edgex
-
Clone the EdgeX compose repository
git clone https://github.com/edgexfoundry/edgex-compose.git
-
Change into the edgex directory:
cd ~/edgex
-
Clone the device-usb-camera repository:
git clone https://github.com/edgexfoundry/device-usb-camera.git
If you get an error like this:
.../[email protected]/v4l2/capability.go:48:33: could not determine kind of name for C.V4L2_CAP_IO_MC
.../[email protected]/v4l2/capability.go:46:33: could not determine kind of name for C.V4L2_CAP_META_OUTPUT
You are missing the appropriate kernel headers needed by the github.com/vladimirvivien/go4vl
module
One possible solution is to manually download and install a more recent version of the libc-dev for your OS.
In the case of Ubuntu 20.04, one is not available in the normal repositories, so you can get it via these steps:
wget https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/bootstrap/+build/20950478/+files/linux-libc-dev_5.10.0-14.15_amd64.deb
sudo dpkg -i linux-libc-dev_5.10.0-14.15_amd64.deb