Mistake on this page? Email us

Quick start with Red Hat

This guide shows you how to get started with Pelion Edge for Red Hat. At the end of this tutorial, you will have built Pelion Edge packages ready to be installed on Red Hat Enterprise Linux 8.

Prerequisites

Before you can build this package, you must have:

Build

  1. Clone distro-pelion-edge, and change the directory to the root of the repository:

    git clone https://github.com/PelionIoT/distro-pelion-edge
    cd distro-pelion-edge
    
  2. Copy the mbed_cloud_dev_credentials.c file in place, so the Edge developer mode package builds with your developer credentials:

    cp ~/Downloads/mbed_cloud_dev_credentials.c .
    
  3. Use the manifest tool to create update_default_resources.c:

    manifest-tool init -a <access-key> --vendor-id 42fa7b48-1a65-43aa-890f-8c704daade54 --class-id 42fa7b48-1a65-43aa-890f-8c704daade54 --force
    

    Note: Firmware-over-the-air update behavior is currently not defined.

  4. Answer the questions, or press Entr to skip them.

  5. Build all the Red Hat packages for AMD64 using Docker:

    ./build-env/bin/docker-run-env.sh rhel8 ./build-env/bin/build-all.sh --deps --install --build --source --arch=amd64
    

    Red Hat packages are available in ./build/deploy/rpm/rhel8.

  6. (Optional) To rebuild an individual package (for example, mbed-edge-core-devmode):

    ./build-env/bin/docker-run-env.sh rhel8 ./mbed-edge-core-devmode/rpm/build.sh --install --build --source
    

Troubleshooting

If you see:

  • An error that starts with permission denied while trying to connect to the docker daemon, make sure you have completed Docker's steps to managing Docker as a non-root user, including logging out and logging back in.
  • The error useradd: UID 0 is not unique, make sure you're not using sudo in your commands.
  • The error HTTP error (401 - Unauthorized): Invalid username or password, make sure you have a valid Red Hat subscription.

Please see the distro-pelion-edge README for more information and GitHub issues for solutions to common build errors.