Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["debian:12", "debian:11", "ubuntu:22.04", "ubuntu:20.04"]
os: ["debian:12", "debian:11", "ubuntu:22.04", "ubuntu:20.04", "ubuntu:24.04"]
arch: [amd64, arm64]
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-latest' }}
container:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
### VisualStudio 2017
.vs/

### Temporary workspace files
.workspace/

### GDB debugger
.gdbinit
.gdb_history
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ option (ADUC_ENABLE_E2E_TESTING "Enable e2e test pipeline settings" OFF)
option (ADUC_ENABLE_SRVC_E2E_TESTING "Enable service side test agent settings" OFF)
option (ADUC_ROOTKEY_PKG_DOWNLOAD_WITH_CURL
"Use Curl to download the Rootkey Package instead of DeliveryOptimization agent" OFF)
option (ADUC_BUILD_WITH_DELIVERY_OPTIMIZATION
"Build with Delivery Optimization support" ON)
option (ADUC_ENABLE_CONSOLE_LOG "Enable console logging" ON)
option (ADUC_ENABLE_FILE_LOG "Enable file logging" ON)

Expand Down
124 changes: 36 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,61 @@
# What is Device Update for IoT Hub?
# Device Update for IoT Hub

Device Update for IoT Hub is a service that enables you to deploy over-the-air updates (OTA) for your IoT devices.
Device Update for IoT Hub is an end-to-end platform for deploying over-the-air updates (OTA) to your IoT devices—from tiny sensors to gateway-level devices.

Device Update for IoT Hub is an end-to-end platform that customers can use to publish, distribute, and manage over-the-air updates for everything from tiny sensors to gateway-level devices.
## Key Features

Device Update for IoT Hub also provides controls on how to manage the deployment updates so you are always in control of when and how devices are updated. Device Update for IoT Hub also provides reporting capabilities so you are always up to date on the state of your devices via integration with IoT Hub.
* **Integrated Management** - Update management UX integrated with Azure IoT Hub
* **Controlled Rollout** - Gradual update deployment through device grouping and scheduling
* **Flexible APIs** - Programmatic APIs for automation and custom portal experiences
* **Fleet Visibility** - At-a-glance compliance and status views across heterogeneous device fleets
* **Resilient Updates** - Support for A/B updates with seamless rollback
* **Access Control** - Subscription and role-based access controls via Azure portal
* **Offline Support** - On-premise content cache and Nested Edge support for disconnected devices
* **Comprehensive Reporting** - Detailed update management and reporting tools

Device Update for IoT Hub features provide a powerful and flexible experience, including:
## Supported Platforms

* Update management UX integrated with Azure IoT Hub
* Gradual update rollout through device grouping and update scheduling controls
* Programmatic APIs to enable automation and custom portal experiences
* At-a-glance update compliance and status views across heterogenous device fleets
* Support for resilient device updates (A/B) to deliver seamless rollback
* Subscription and role-based access controls available through the Azure.com portal
* On-premise content cache and Nested Edge support to enable updating cloud disconnected devices
* Detailed update management and reporting tools

## Reference agent

| Build | Status |
|------------------- |--------|
| Ubuntu 22.04 AMD64 | [![Ubuntu 22.04 Build Status](https://dev.azure.com/azure-device-update/adu-linux-client/_apis/build/status/Azure.iot-hub-device-update?branchName=main)](https://dev.azure.com/azure-device-update/adu-linux-client/_build/latest?definitionId=27&branchName=main)|

## Getting started

* [Device Update for IoT Hub](https://aka.ms/iot-hub-device-update-docs)
* [Getting Started with Device Update Agent](./docs/agent-reference)
* More details on building the agent here: [How to build agent code](./docs/agent-reference/how-to-build-agent-code.md)
| Platform | Status | Notes |
|------------------- |--------|-------|
| Ubuntu 20.04 AMD64 | ✓ Supported | With Delivery Optimization |
| Ubuntu 22.04 AMD64 | [![Ubuntu 22.04 Build Status](https://dev.azure.com/azure-device-update/adu-linux-client/_apis/build/status/Azure.iot-hub-device-update?branchName=main)](https://dev.azure.com/azure-device-update/adu-linux-client/_build/latest?definitionId=27&branchName=main)| Primary development platform |
| Ubuntu 24.04 AMD64 | ✓ Supported | curl downloader only (DO not available) |
| Debian 11 (Bullseye) AMD64 | ✓ Supported | With Delivery Optimization |
| Debian 12 (Bookworm) AMD64 | ✓ Supported | With Delivery Optimization |

## Quick Start

### Build and Install
For users familiar with the build process:

```sh
./scripts/install-deps.sh -a
./scripts/build.sh -c -u --build-packages
cd out
sudo cmake --build . --target install
sudo apt install ./out/deviceupdate-agent_*.deb
```

### Incremental Build
> **Note**: For detailed build instructions, troubleshooting, and advanced options, see [How to Build the Agent](./docs/agent-reference/how-to-build-agent-code.md)

```sh
cd out
ninja
```
## Documentation

### Run Tests
* **[Device Update for IoT Hub Documentation](https://aka.ms/iot-hub-device-update-docs)** - Official service documentation
* **[Getting Started with the Agent](./docs/agent-reference)** - Agent overview and reference
* **[Building the Agent](./docs/agent-reference/how-to-build-agent-code.md)** - Detailed build instructions
* **[Running the Agent](./docs/agent-reference/how-to-run-agent.md)** - Deployment and configuration
* **[Troubleshooting Guide](./docs/how-to-troubleshoot-guide.md)** - Common issues and solutions

```sh
cd out
ctest
```
## Contributing

or, alternatively:
This project welcomes contributions and suggestions. See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.

```sh
ninja test
```
## Security

### Run tests under valgrind memcheck
See [SECURITY.md](./SECURITY.md) for information on reporting security issues.

To install Valgrind:
```sh
# Install from apt (Ubuntu 22.04 or newer recommended)
sudo apt-get install valgrind
## License

# Or use install-deps.sh
./scripts/install-deps.sh --install-valgrind apt
This project is licensed under the MIT License - see [LICENSE](./LICENSE) for details.

# Build from source (version 3.23.0)
./scripts/install-deps.sh --install-valgrind source
```
## Support

Ensure /usr/bin/valgrind is a valid symlink
e.g. `sudo ln -s /opt/valgrind.3.19.0/bin/valgrind /usr/bin/valgrind`
For support options, see [SUPPORT.md](./SUPPORT.md).

```sh
cd out
ctest -T memcheck
```

Results will be in `out/Testing/Temporary/MemoryChecker.*.log`

#### Run specific tests under valgrind

```sh
cd out
# Run a specific test
ctest -R <test_name> -T memcheck

# Run tests matching a pattern
ctest -R ".*device_properties.*" -T memcheck

# Run with verbose output
ctest -R <test_name> -T memcheck -V
```

#### Run individual test binary directly with valgrind

```sh
# Run with full leak check
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./path/to/test_binary

# With verbose output and log file
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
--verbose --log-file=valgrind-output.log ./path/to/test_binary

# With child process tracking
valgrind --leak-check=full --trace-children=yes ./path/to/test_binary
```
30 changes: 16 additions & 14 deletions cmake/agentRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,23 @@ function (target_link_digital_twin_client target scope)
endfunction (target_link_digital_twin_client)

function (target_link_dosdk target scope)
if (NOT WIN32)
find_package (deliveryoptimization_sdk CONFIG REQUIRED)
target_link_libraries (${target} ${scope} Microsoft::deliveryoptimization)
else ()
if (CMAKE_GENERATOR_PLATFORM STREQUAL "")
set (DO_CLIENT_INSTALL_FOLDER "${VCPKG_INSTALLED_DIR}/do-client")
if (ADUC_BUILD_WITH_DELIVERY_OPTIMIZATION)
if (NOT WIN32)
find_package (deliveryoptimization_sdk CONFIG REQUIRED)
target_link_libraries (${target} ${scope} Microsoft::deliveryoptimization)
else ()
# Different install folder if cross-compiling - see build.ps1
set (DO_CLIENT_INSTALL_FOLDER
"${VCPKG_INSTALLED_DIR}/do-client-${CMAKE_GENERATOR_PLATFORM}")
endif ()
if (CMAKE_GENERATOR_PLATFORM STREQUAL "")
set (DO_CLIENT_INSTALL_FOLDER "${VCPKG_INSTALLED_DIR}/do-client")
else ()
# Different install folder if cross-compiling - see build.ps1
set (DO_CLIENT_INSTALL_FOLDER
"${VCPKG_INSTALLED_DIR}/do-client-${CMAKE_GENERATOR_PLATFORM}")
endif ()

target_include_directories (${target} ${scope} ${DO_CLIENT_INSTALL_FOLDER}/sdk-cpp/include)
target_link_directories (${target} PUBLIC
${DO_CLIENT_INSTALL_FOLDER}/cmake/sdk-cpp/${CMAKE_BUILD_TYPE})
target_link_libraries (${target} ${scope} deliveryoptimization)
target_include_directories (${target} ${scope} ${DO_CLIENT_INSTALL_FOLDER}/sdk-cpp/include)
target_link_directories (${target} PUBLIC
${DO_CLIENT_INSTALL_FOLDER}/cmake/sdk-cpp/${CMAKE_BUILD_TYPE})
target_link_libraries (${target} ${scope} deliveryoptimization)
endif ()
endif ()
endfunction (target_link_dosdk)
Loading