Skip to content

iot-portal-device-management/self-host

Repository files navigation

IoT Portal Device Management is a web application that interacts with Intel In-Band Manageability to provide remote over-the-air (OTA) updates to IoT devices. It supports Firmware OTA (FOTA), Software OTA (SOTA), Application OTA (AOTA) and Configuration OTA (COTA).

  • Supports FOTA, SOTA, AOTA and COTA features.
  • Device categorization feature.
  • Device grouping feature.
  • Saved command feature.
  • Mass OTA update feature.
  • Robust Mass OTA background job processing.

📋 Requirements

These dependencies are free to use.

🔧 Installation

You can install IoT Portal Device Management using Docker containers on Linux distributions. Use the provided Bash scripts to get started quickly.

Linux

Installing Docker and Docker Compose

Install Docker Engine 20.10

curl -fsSL https://get.docker.com -o get-docker.sh
sudo VERSION=20.10 sh get-docker.sh

Optionally, manage Docker as a non-root user by following the instructions at Manage Docker as a non-root user.

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

Install Docker Compose 2.14.2

DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

Install IoT Portal Device Management

Clone the repository to your system:

git clone https://github.com/iot-portal-device-management/self-host

Navigate to the self-host directory and give it permission to execute:

cd self-host && chmod +x *.sh

Run the installation script. A ./iot-portal-device-management-data directory will be created.

./iotportaldevicemanagement.sh install 

The default email delivery service used is Mailtrap. You are free to use other email delivery services. Provide the required credentials e.g., APP_KEY (optional), DB_PASSWORD, REDIS_PASSWORD, MAIL_USERNAME, MAIL_PASSWORD, MQTT_AUTH_PASSWORD in ./iot-portal-device-management-data/deployment/.env.production file and run:

./iotportaldevicemanagement.sh offline-install 

Finally, start IoT Portal Device Management services.

./iotportaldevicemanagement.sh start 

Migrate the database for the first run.

./iotportaldevicemanagement.sh migrate-db 

Seed the database.

./iotportaldevicemanagement.sh seed-db 

To seed the database with sample data, run the command below. A random generated user will be created with the password defaulted to password.

ONLY TRY THIS ON DEVELOPMENT INSTANCE! THIS IS FOR YOU TO EXPERIMENT THE FEATURES WITHOUT ACTUALLY PROVISIONING A DEVICE.

./iotportaldevicemanagement.sh seed-db-sample 

By default, the script uses values in the .env.production file for deployment. You should replace those default credentials, e.g. APP_KEY, DB_PASSWORD, REDIS_PASSWORD, MAIL_USERNAME, MAIL_PASSWORD, MQTT_AUTH_PASSWORD etc. with your own randomly generated password for production deployment.

📖 Script Commands Reference

Command Description
install Start the online installer.
offline install Start the offline installer.
start Start all services.
restart Restart all services (same as start).
stop Stop all services.
rebuild Rebuild the images.
migrate-db Update/initialize the database.
seed-db Seed all required data for first run.
seed-db-sample Seed the database with sample data. (Development use only)
clear-db Clear the entire database. (Development use only)
uninstall Uninstall IoT Portal Device Management
help List all commands.

Use these commands cautiously. Some commands are intended for development purpose only.

⚒️ Intel® In-Band Manageability Integration

Read our Integration Guide to learn how to integrate the IoT Portal Device Management adapter into Intel® In-Band Manageability.

👏 Contributing

Thank you for considering contributing to the IoT Portal Device Management! PHPStorm is highly recommended if you are working on this project. Please commit any pull requests against the main branch.

📄 License

This project is open-sourced software licensed under the MIT License.