Skip to content

Latest commit

 

History

History
168 lines (125 loc) · 5.13 KB

setup.md

File metadata and controls

168 lines (125 loc) · 5.13 KB

Setup

Contents

System Requirements
Dependencies
    Git
    Docker
    Tools
Download EdgeX Compose
Additional Installs
Next Steps

System Requirements

  • Intel™ Core® processor
  • Ubuntu 20.04.4 LTS
  • USB-compliant Camera

Dependencies

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

Install Git from the official repository as documented on the Git SCM site.

  1. Update installation repositories:

    sudo apt update
  2. Add the Git repository:

    sudo add-apt-repository ppa:git-core/ppa -y
  3. Install Git:

    sudo apt install git

Install Docker

Install Docker from the official repository as documented on the Docker site.

Verify Docker

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.

  1. Create Docker group:

    sudo groupadd docker

    NOTE: If the group already exists, groupadd outputs a message: groupadd: group docker already exists. This is OK.

  2. Add User to group:

    sudo usermod -aG docker $USER
  3. Refresh the group:

    newgrp docker 
  4. 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 Compose

Install Docker from the official repository as documented on the Docker Compose site. See the Linux tab.

  1. 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.

  2. Set permissions:

    sudo chmod +x /usr/local/bin/docker-compose

Install Tools

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.

Tool Descriptions

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

Download EdgeX Compose Repository

  1. Create a directory for the EdgeX compose repository:

    mkdir ~/edgex
  2. Change into newly created directory:

    cd ~/edgex
  3. Clone the EdgeX compose repository

    git clone https://github.com/edgexfoundry/edgex-compose.git

Get the Device USB Camera Source Code

  1. Change into the edgex directory:

    cd ~/edgex
  2. Clone the device-usb-camera repository:

    git clone https://github.com/edgexfoundry/device-usb-camera.git

Additional Installs

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

Next Steps

Build and run the software

License

Apache-2.0