Skip to content

Commit

Permalink
Update Dunfell branch to IoT Edge version 1.2.6.
Browse files Browse the repository at this point in the history
Create all the recipes needed to integrate the iotedge runtime
version 1.2.6. It include the recipes for the daemon and the
identity-service.
This version has been tested with the following DPS methods:
- Symmectric key
- TPM

It build the last official release :
'https://github.com/Azure/iotedge/releases/tag/1.2.6'

Ref: Azure#63
  • Loading branch information
pierrickcurt committed Jan 5, 2022
1 parent a10eaf6 commit 190bedd
Show file tree
Hide file tree
Showing 37 changed files with 2,769 additions and 692 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This layer depends on:
```
URI: git://github.com/meta-rust/meta-rust.git
branch: master
revision: 7ff669d8cedd83a2d3efb73073a63b0a7efffddc
revision: 25ee517ae26581ca8d5f569c6e38cba6ff4a7d3e
prio: default
```

Expand Down
1 change: 1 addition & 0 deletions recipes-core/aziot-cli/aziot-cli-1.2.6.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export VERSION = "1.2.6"
10 changes: 10 additions & 0 deletions recipes-core/aziot-cli/aziot-cli.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DEPENDS += "openssl "

export OPENSSL_DIR = "${STAGING_EXECPREFIXDIR}"
export LIBIOTHSM_NOBUILD="On"

do_install () {
# Binaries
install -d "${D}${bindir}"
install -m 755 "${WORKDIR}/build/target/${TARGET_SYS}/release/iotedge" ${D}${bindir}/iotedge
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 8c40fae9f235c005fc241f09cec9ea982c183b2a Mon Sep 17 00:00:00 2001
From: Pierrick Curt <pierrick.curt@rtone.fr>
Date: Mon, 26 Apr 2021 18:39:51 +0000
Subject: [PATCH] Fix edgelet/iotedge code

---
edgelet/iotedge/src/check/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/edgelet/iotedge/src/check/mod.rs b/edgelet/iotedge/src/check/mod.rs
index 44b5df5c2..041fdc6d5 100644
--- a/edgelet/iotedge/src/check/mod.rs
+++ b/edgelet/iotedge/src/check/mod.rs
@@ -237,7 +237,7 @@ impl Check {
description: String,
result: CheckResult,
additional_info: serde_json::Value,
- };
+ }

let mut checks: BTreeMap<String, CheckOutputSerializable> = Default::default();

--
2.17.1

1 change: 1 addition & 0 deletions recipes-core/aziot-cli/aziot-cli_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SRC_URI += "file://0001-Fix-edgelet-iotedge-code.patch"
355 changes: 355 additions & 0 deletions recipes-core/aziot-cli/aziot-cli_1.2.6.bb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions recipes-core/aziot-daemon/aziot-daemon-1.2.6.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export VERSION = "1.2.6"
45 changes: 45 additions & 0 deletions recipes-core/aziot-daemon/aziot-daemon.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
DEPENDS += "openssl virtual/docker aziot-cli aziotd"
RDEPENDS_${PN} += "docker aziot-cli aziotd"

inherit systemd
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
SYSTEMD_SERVICE_${PN} = "aziot-edged.service"

SRC_URI += "file://aziot-edged.service \
"

do_install () {
# Binaries
install -d "${D}${bindir}"

install -m 755 "${WORKDIR}/build/target/${TARGET_SYS}/release/aziot-edged" ${D}${bindir}/aziot-edged

# Config file
install -d "${D}${sysconfdir}/aziot"
install -d "${D}${sysconfdir}/aziot/edged"
install -d "${D}${sysconfdir}/aziot/edged/config.d"

# Data dir
install -d -o iotedge -g iotedge "${D}${localstatedir}/lib/iotedge"

if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/aziot-edged.service ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/git/edgelet/contrib/systemd/debian/aziot-edged.workload.socket ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/git/edgelet/contrib/systemd/debian/aziot-edged.mgmt.socket ${D}${systemd_unitdir}/system
else
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/git/edgelet/contrib/debian/iotedge.init ${D}${sysconfdir}/init.d/iotedge
fi
}

inherit useradd
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "-r -u 15580 -g iotedge -G docker -s /bin/false -d ${localstatedir}/lib/iotedge iotedge"
GROUPADD_PARAM_${PN} = "-r -g 15580 iotedge"

FILES_${PN} += " \
${systemd_unitdir}/system/* \
${localstatedir}/lib/iotedge \
${sysconfdir}/aziot/ \
"
19 changes: 19 additions & 0 deletions recipes-core/aziot-daemon/aziot-daemon/aziot-edged.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Azure IoT Edge daemon
After=docker.service aziot-edged.workload.socket aziot-edged.mgmt.socket
Requires=aziot-edged.workload.socket aziot-edged.mgmt.socket
Wants=docker.service
Documentation=man:aziot-edged(8)

[Service]
ExecStart=/usr/bin/aziot-edged
KillMode=process
TimeoutStartSec=600
TimeoutStopSec=40
Restart=on-failure
RestartPreventExitStatus=153
RestartSec=5

[Install]
WantedBy=multi-user.target
Also=aziot-edged.workload.socket aziot-edged.mgmt.socket
Loading

0 comments on commit 190bedd

Please sign in to comment.